Mercurial > pidgin
changeset 2494:2c1950c5544a
[gaim-migrate @ 2507]
don't ask
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 12 Oct 2001 22:31:12 +0000 |
parents | 1b7a1133962d |
children | b46e8a80da4f |
files | src/module.c src/plugins.c src/protocols/msn/msn.c src/ui.h |
diffstat | 4 files changed, 28 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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); }
--- 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;
--- 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)) {
--- 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 */