changeset 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 6100cb11bae8
children 7b88cc6c3f7a 96f0f6af5da2
files pidgin/gtkstatusbox.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
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,