# HG changeset patch # User Sadrul Habib Chowdhury # Date 1211413951 0 # Node ID 78dad8135c7219795e8f1ad0c2620649be4c2648 # Parent 99ef50c8da9142195f7f34992d2f583f57be38fa Disable the 'remove custom icon' item from the menu if a custom icon isn't set. diff -r 99ef50c8da91 -r 78dad8135c72 pidgin/gtkblist.c --- a/pidgin/gtkblist.c Wed May 21 17:56:20 2008 +0000 +++ b/pidgin/gtkblist.c Wed May 21 23:52:31 2008 +0000 @@ -1558,13 +1558,17 @@ static void add_buddy_icon_menu_items(GtkWidget *menu, PurpleBlistNode *node) { + GtkWidget *item; + pidgin_new_item_from_stock(menu, _("Set Custom Icon"), NULL, G_CALLBACK(set_node_custom_icon), node, 0, 0, NULL); - pidgin_new_item_from_stock(menu, _("Remove Custom Icon"), NULL, + item = pidgin_new_item_from_stock(menu, _("Remove Custom Icon"), NULL, G_CALLBACK(remove_node_custom_icon), node, 0, 0, NULL); + if (!purple_buddy_icons_node_has_custom_icon(node)) + gtk_widget_set_sensitive(item, FALSE); } static GtkWidget *