# HG changeset patch # User Kevin Stange # Date 1187424997 0 # Node ID 770b04e551a7c77a443f0bbaec100117c622885f # Parent 5e39506a0e3bb58d1c1470a080db6edad49ff797 If you have the buddy notes plugin loaded, when you right click a chat's infopane, it will show an empty Send To menu along with the "Edit Note" menu item, because the logic assumes that if there are additional menu items, a Send To menu is implicit. This fixes that. diff -r 5e39506a0e3b -r 770b04e551a7 pidgin/gtkconv.c --- a/pidgin/gtkconv.c Sat Aug 18 05:57:52 2007 +0000 +++ b/pidgin/gtkconv.c Sat Aug 18 08:16:37 2007 +0000 @@ -7805,25 +7805,20 @@ if (e->button == 3) { /* Right click was pressed. Popup the Send To menu. */ GtkWidget *menu = gtk_menu_new(), *sub; + gboolean populated = populate_menu_with_options(menu, gtkconv, TRUE); sub = gtk_menu_item_get_submenu(GTK_MENU_ITEM(gtkconv->win->menu.send_to)); - if (populate_menu_with_options(menu, gtkconv, TRUE)) - pidgin_separator(menu); - else if (!sub || - !GTK_WIDGET_IS_SENSITIVE(gtkconv->win->menu.send_to)) { - gtk_widget_destroy(menu); - return FALSE; - } else { - menu = sub; - sub = NULL; - } - - if (sub) { + if (sub && GTK_WIDGET_IS_SENSITIVE(gtkconv->win->menu.send_to)) { GtkWidget *item = gtk_menu_item_new_with_mnemonic(_("_Send To")); + if (populated) + pidgin_separator(menu); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), sub); gtk_widget_show(item); gtk_widget_show_all(sub); + } else if (!populated) { + gtk_widget_destroy(menu); + return FALSE; } gtk_widget_show_all(menu);