diff pidgin/gtkstatusbox.c @ 28835:61fd49ad0def

Disable 'Remove' when no icon set.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 30 Oct 2009 01:41:49 +0000
parents a5c7229981be
children 5c2bbeef2eb8 e3206d6da6c7
line wrap: on
line diff
--- 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,