pidgin.next.minor: 2d26512f: Disable the 'remove custom icon' item fr...

sadrul at pidgin.im sadrul at pidgin.im
Wed May 21 20:10:40 EDT 2008


-----------------------------------------------------------------
Revision: 2d26512f6d23159e95543a30b6193e9099f4ce99
Ancestor: 07fc1ad334326d74e31bc239fc0064b83c4c6086
Author: sadrul at pidgin.im
Date: 2008-05-21T23:52:31
Branch: im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/2d26512f6d23159e95543a30b6193e9099f4ce99

Modified files:
        pidgin/gtkblist.c

ChangeLog: 

Disable the 'remove custom icon' item from the menu if a custom icon isn't set.

-------------- next part --------------
============================================================
--- pidgin/gtkblist.c	53231dbad75f6e2ac05a5e97fc651abda7de8cec
+++ pidgin/gtkblist.c	8c27fe3f9df82f326e2a42f8911fa6ea0b5de1a1
@@ -1558,13 +1558,17 @@ add_buddy_icon_menu_items(GtkWidget *men
 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 *


More information about the Commits mailing list