--- yahoo_im_buzz.c.orig 2004-10-12 07:34:55.000000000 -0400 +++ yahoo_im_buzz.c 2004-10-12 07:49:41.000000000 -0400 @@ -46,7 +46,7 @@ /* but I can't see any other way of doing it */ #include "protocols/yahoo/yahoo.h" -static GList *buttons; +static GList *buttons = NULL; static GtkIconFactory *icon_factory; static guint button_type_cb_id, im_button_show_cb_id; static GaimCmdId yib_cmd; @@ -93,11 +93,16 @@ GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION(conv); GaimConversationType type = gaim_conversation_get_type(conv); GtkWidget *button = NULL ; + GaimAccount *account; + const char *prpl_id; - if(type != GAIM_CONV_IM && type != GAIM_CONV_CHAT) + if(type != GAIM_CONV_IM || !gaim_prefs_get_bool("/plugins/gtk/bleet/yahoo-im/bell")) return; - if(type == GAIM_CONV_IM && - !gaim_prefs_get_bool("/plugins/gtk/bleet/yahoo-im/bell")) + + account = gaim_conversation_get_account(conv); + prpl_id = gaim_account_get_protocol_id(account); + + if (strcmp("prpl-yahoo", prpl_id)) return; button = gaim_gtkconv_button_new(YIB_STOCK_BELL, "Bell", "Yahoo-IM-Bell", @@ -176,7 +181,7 @@ GaimConversation *conv; GaimGtkConversation *gtkconv; GtkWidget *button; - GList *l; + GList *l, *tmp = NULL; for(l = buttons; l != NULL; l = l->next) { button = GTK_WIDGET(l->data); @@ -192,7 +197,10 @@ gtk_size_group_add_widget(gtkconv->sg, button); gtk_widget_show(button); g_object_set_data(G_OBJECT(button), "conv", conv); + tmp = g_list_append(tmp, (gpointer)button); } + g_list_free(buttons); + buttons = tmp; } static void @@ -364,7 +372,8 @@ /* register our command */ yib_cmd = gaim_cmd_register("bell", "", GAIM_CMD_P_PLUGIN, - GAIM_CMD_FLAG_IM | GAIM_CMD_FLAG_ALLOW_WRONG_ARGS, NULL, + GAIM_CMD_FLAG_IM | GAIM_CMD_FLAG_ALLOW_WRONG_ARGS | + GAIM_CMD_FLAG_PRPL_ONLY, "prpl-yahoo", yib_cmd_cb, help, NULL); /* hijack the popup menus in the imhtmls */