pidgin: 2a337fc2: Disable 'Remove' when no icon set.

sadrul at pidgin.im sadrul at pidgin.im
Thu Oct 29 21:46:09 EDT 2009


-----------------------------------------------------------------
Revision: 2a337fc21125a25203efca7d15ea3002fa8e35fb
Ancestor: a6a24344139c15a41f921484531dfbdef99247c7
Author: sadrul at pidgin.im
Date: 2009-10-30T01:41:49
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/2a337fc21125a25203efca7d15ea3002fa8e35fb

Modified files:
        pidgin/gtkstatusbox.c

ChangeLog: 

Disable 'Remove' when no icon set.

-------------- next part --------------
============================================================
--- pidgin/gtkstatusbox.c	941ac3af893463be7bfe18f5fbc5f4e90e616725
+++ pidgin/gtkstatusbox.c	ea7f05c6a6a0e8120e4b7ab0a12fec612a9dd581
@@ -312,6 +312,7 @@ icon_box_press_cb(GtkWidget *widget, Gdk
 {
 	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 @@ icon_box_press_cb(GtkWidget *widget, Gdk
 		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,


More information about the Commits mailing list