Update of /cvsroot/gaim/gaim/src
In directory usw-pr-cvs1:/tmp/cvs-serv6509
Modified Files:
module.c plugins.c ui.h
Log Message:
don't ask
Index: module.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/module.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- module.c 2001/10/09 22:14:56 1.10
+++ module.c 2001/10/12 22:31:12 1.11
@@ -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);
}
Index: plugins.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/plugins.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- plugins.c 2001/10/01 15:49:04 1.84
+++ plugins.c 2001/10/12 22:31:12 1.85
@@ -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;
Index: ui.h
===================================================================
RCS file: /cvsroot/gaim/gaim/src/ui.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- ui.h 2001/10/12 21:12:56 1.7
+++ ui.h 2001/10/12 22:31:12 1.8
@@ -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 */
|