Index: src/gaim-xmms-remote.c =================================================================== RCS file: /cvsroot/guifications/gaim-xmms-remote/src/gaim-xmms-remote.c,v retrieving revision 1.30 diff -u -p -r1.30 gaim-xmms-remote.c --- src/gaim-xmms-remote.c 26 Oct 2004 07:29:06 -0000 1.30 +++ src/gaim-xmms-remote.c 6 Nov 2004 01:12:00 -0000 @@ -57,7 +57,6 @@ static GList *buttons = NULL; static GtkIconFactory *icon_factory; static GaimCmdId gxr_cmd; -static guint button_type_cb_id; /******************************************************************************* * Callbacks @@ -855,17 +854,19 @@ gxr_load(GaimPlugin *plugin) { gaim_signal_connect(conv_handle, "deleting-conversation", plugin, GAIM_CALLBACK(gxr_conv_destroyed_cb), NULL); - button_type_cb_id = gaim_prefs_connect_callback( + gaim_prefs_connect_callback(plugin, "/gaim/gtk/conversations/button_type", gxr_button_type_changed_cb, NULL); - gaim_prefs_connect_callback("/plugins/gtk/amc_grim/gaim-xmms-remote/im", - gxr_button_show_cb, - GINT_TO_POINTER(GAIM_CONV_IM)); - - gaim_prefs_connect_callback("/plugins/gtk/amc_grim/gaim-xmms-remote/chat", - gxr_button_show_cb, - GINT_TO_POINTER(GAIM_CONV_CHAT)); + gaim_prefs_connect_callback(plugin, + "/plugins/gtk/amc_grim/gaim-xmms-remote/im", + gxr_button_show_cb, + GINT_TO_POINTER(GAIM_CONV_IM)); + + gaim_prefs_connect_callback(plugin, + "/plugins/gtk/amc_grim/gaim-xmms-remote/chat", + gxr_button_show_cb, + GINT_TO_POINTER(GAIM_CONV_CHAT)); if(gaim_prefs_get_bool("/plugins/gtk/amc_grim/gaim-xmms-remote/im")) gxr_show_buttons(GAIM_CONV_IM); @@ -886,7 +887,11 @@ gxr_load(GaimPlugin *plugin) { static gboolean gxr_unload(GaimPlugin *plugin) { - gaim_prefs_disconnect_callback(button_type_cb_id); + gaim_prefs_disconnect_by_handle(plugin); + + /* remove our buttons */ + gxr_hide_buttons(GAIM_CONV_IM); + gxr_hide_buttons(GAIM_CONV_CHAT); /* remove our buttons */ gxr_hide_buttons(GAIM_CONV_IM); @@ -897,6 +902,7 @@ gxr_unload(GaimPlugin *plugin) { /* remove our popup menu item */ gaim_conversation_foreach(gxr_disconnect_popup_cb); + /* remove our icons */ gtk_icon_factory_remove_default(icon_factory);