Mercurial > pidgin.yaz
changeset 23164:78dad8135c72
Disable the 'remove custom icon' item from the menu if a custom icon isn't set.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 21 May 2008 23:52:31 +0000 |
parents | 99ef50c8da91 |
children | 1db2bc34ea61 |
files | pidgin/gtkblist.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 *