Mercurial > pidgin.yaz
changeset 11038:aedd557f46dd
[gaim-migrate @ 12935]
Patch #1223447 from Richard Laager
"This patch sets the sensitivity to FALSE (i.e. it greys out the menu option) of any buddy node action where callback is NULL. This is so that plugins can put an item in the right-click menu and grey it out selectively instead of being forced to either offer the option or not."
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Thu, 30 Jun 2005 04:16:15 +0000 |
parents | 57e36a4ff107 |
children | 34d2aac7b34f |
files | src/gtkblist.c |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkblist.c Thu Jun 30 04:02:39 2005 +0000 +++ b/src/gtkblist.c Thu Jun 30 04:16:15 2005 +0000 @@ -1152,10 +1152,14 @@ *dup_separator = FALSE; menuitem = gtk_menu_item_new_with_mnemonic(act->label); - g_object_set_data(G_OBJECT(menuitem), "gaimcallback", - act); - g_signal_connect(G_OBJECT(menuitem), "activate", - G_CALLBACK(blist_node_menu_cb), node); + if (act->callback != NULL) { + g_object_set_data(G_OBJECT(menuitem), "gaimcallback", + act); + g_signal_connect(G_OBJECT(menuitem), "activate", + G_CALLBACK(blist_node_menu_cb), node); + } else { + gtk_widget_set_sensitive(menuitem, FALSE); + } gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); } else { GtkWidget *submenu = NULL;