# HG changeset patch # User Eric Warmenhoven # Date 1002925872 0 # Node ID 2c1950c5544aa7a8476d19edb43bc38539384a3f # Parent 1b7a1133962dd208fa136f461a5973a9caf44670 [gaim-migrate @ 2507] don't ask committer: Tailor Script diff -r 1b7a1133962d -r 2c1950c5544a src/module.c --- a/src/module.c Fri Oct 12 21:12:56 2001 +0000 +++ b/src/module.c Fri Oct 12 22:31:12 2001 +0000 @@ -174,6 +174,29 @@ void gaim_plugin_unload(GModule *handle) { + GList *pl = plugins; + struct gaim_plugin *p; + void (*gaim_plugin_remove)(); + + while (pl) { + p = pl->data; + if (p->handle == handle) + break; + pl = pl->next; + } + if (!pl) + return; + + debug_printf("Unloading %s\n", g_module_name(p->handle)); + + if (g_module_symbol(p->handle, "gaim_plugin_remove", (gpointer *)&gaim_plugin_remove)) + (*gaim_plugin_remove)(); + plugin_remove_callbacks(p->handle); + plugins = g_list_remove(plugins, p); + g_free(p); + /* XXX CUI need to tell UI what happened, but not like this */ + update_show_plugins(); + g_timeout_add(5000, unload_timeout, handle); } diff -r 1b7a1133962d -r 2c1950c5544a src/plugins.c --- a/src/plugins.c Fri Oct 12 21:12:56 2001 +0000 +++ b/src/plugins.c Fri Oct 12 22:31:12 2001 +0000 @@ -88,7 +88,7 @@ static void load_file(GtkWidget *, gpointer); static void load_which_plugin(GtkWidget *, gpointer); static void list_clicked(GtkWidget *, struct gaim_plugin *); -static void update_show_plugins(); +void update_show_plugins(); static void hide_plugins(GtkWidget *, gpointer); /* ------------------ Code Below ---------------------------- */ @@ -283,7 +283,7 @@ gtk_widget_show(plugwindow); } -static void update_show_plugins() +void update_show_plugins() { GList *plugs = plugins; struct gaim_plugin *p; diff -r 1b7a1133962d -r 2c1950c5544a src/protocols/msn/msn.c --- a/src/protocols/msn/msn.c Fri Oct 12 21:12:56 2001 +0000 +++ b/src/protocols/msn/msn.c Fri Oct 12 22:31:12 2001 +0000 @@ -619,7 +619,7 @@ signoff(gc); return; } - debug_printf("S: %s", buf); + debug_printf("MSN S: %s", buf); g_strchomp(buf); if (!g_strncasecmp(buf, "ADD", 3)) { @@ -982,7 +982,7 @@ signoff(gc); return; } - debug_printf("S: %s", buf); + debug_printf("MSN S: %s", buf); g_strchomp(buf); if (!g_strncasecmp(buf, "VER", 3)) { diff -r 1b7a1133962d -r 2c1950c5544a src/ui.h --- a/src/ui.h Fri Oct 12 21:12:56 2001 +0000 +++ b/src/ui.h Fri Oct 12 22:31:12 2001 +0000 @@ -401,6 +401,7 @@ /* Functions in plugins.c */ #ifdef GAIM_PLUGINS extern void show_plugins(GtkWidget *, gpointer); +extern void update_show_plugins(); /* this is a hack and will be removed */ #endif /* Functions in prefs.c */