# HG changeset patch # User Sadrul Habib Chowdhury # Date 1256866909 0 # Node ID 61fd49ad0def5b0bb162efceba5115a4227d58cb # Parent 6100cb11bae8350fecaf3d36421ab1edc1e422d7 Disable 'Remove' when no icon set. diff -r 6100cb11bae8 -r 61fd49ad0def pidgin/gtkstatusbox.c --- a/pidgin/gtkstatusbox.c Fri Oct 30 01:32:28 2009 +0000 +++ b/pidgin/gtkstatusbox.c Fri Oct 30 01:41:49 2009 +0000 @@ -312,6 +312,7 @@ { if (event->button == 3) { GtkWidget *menu_item; + const char *path; if (box->icon_box_menu) gtk_widget_destroy(box->icon_box_menu); @@ -325,7 +326,8 @@ menu_item = pidgin_new_item_from_stock(box->icon_box_menu, _("Remove"), GTK_STOCK_REMOVE, G_CALLBACK(remove_buddy_icon_cb), box, 0, 0, NULL); - if (purple_prefs_get_path(PIDGIN_PREFS_ROOT "/accounts/buddyicon") == NULL) + if (!(path = purple_prefs_get_path(PIDGIN_PREFS_ROOT "/accounts/buddyicon")) + || !*path) gtk_widget_set_sensitive(menu_item, FALSE); gtk_menu_popup(GTK_MENU(box->icon_box_menu), NULL, NULL, NULL, NULL,