From b139a0c12fb1482aaa1330464dd04c0b06c373fe Mon Sep 17 00:00:00 2001 From: g Date: Fri, 2 Jan 2004 18:45:43 +0000 Subject: [PATCH] Don't add an accelerator to function less menu items. git-svn-id: file:///srv/svn/gliv/trunk@199 dbf4865f-1ec6-0310-8412-f61adeb1ccb1 committer: g --- src/menus.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/menus.c b/src/menus.c index 2377531..64100a8 100644 --- a/src/menus.c +++ b/src/menus.c @@ -111,8 +111,10 @@ static GtkMenuItem *add_menu_item(GtkMenuShell * menu, menu_item = GTK_MENU_ITEM(gtk_menu_item_new_with_mnemonic(menu_item_name)); gtk_menu_shell_append(menu, GTK_WIDGET(menu_item)); - if (func) - g_signal_connect_swapped(menu_item, "activate", func, data); + if (!func) + return menu_item; + + g_signal_connect_swapped(menu_item, "activate", func, data); mod = (key >= GDK_A && key <= GDK_Z) ? GDK_SHIFT_MASK : 0; -- 2.11.4.GIT