From: John Darrington Date: Thu, 8 May 2008 00:37:12 +0000 (+0000) Subject: Don't use gtk_action_connect_proxy for popup menu items which X-Git-Tag: sav-api~1029 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc8cf051d40159539cf7eb67e6932f9ec05bc6fb;p=pspp Don't use gtk_action_connect_proxy for popup menu items which have labels with mnemonics --- diff --git a/src/ui/gui/ChangeLog b/src/ui/gui/ChangeLog index 2110403dab..a57fb286f8 100644 --- a/src/ui/gui/ChangeLog +++ b/src/ui/gui/ChangeLog @@ -1,3 +1,10 @@ +2008-05-08 John Darrington + + * data-editor.c: In popup menus, connect the Insert Variable and + Insert Case callbacks manually, instead of relying on + gtk_action_connect_proxy, as the latter connects a label with a + mnemonic which is inappropriate. + 2008-05-06 Ben Pfaff Bug #23127. Reviewed by John Darrington. Tested by Jason Stover, diff --git a/src/ui/gui/data-editor.c b/src/ui/gui/data-editor.c index b4da5b9f49..9ca7511e17 100644 --- a/src/ui/gui/data-editor.c +++ b/src/ui/gui/data-editor.c @@ -1506,9 +1506,6 @@ create_data_sheet_variable_popup_menu (struct data_editor *de) GtkWidget *clear_variable = gtk_menu_item_new_with_label (_("Clear")); - gtk_action_connect_proxy (de->insert_variable, - insert_variable ); - gtk_action_connect_proxy (de->delete_variables, clear_variable ); @@ -1539,6 +1536,11 @@ create_data_sheet_variable_popup_menu (struct data_editor *de) G_CALLBACK (psppire_data_editor_sort_descending), de->data_editor); + g_signal_connect_swapped (G_OBJECT (insert_variable), "activate", + G_CALLBACK (gtk_action_activate), + de->insert_variable); + + gtk_menu_shell_append (GTK_MENU_SHELL (menu), sort_descending); gtk_widget_show_all (menu); @@ -1559,16 +1561,16 @@ create_data_sheet_cases_popup_menu (struct data_editor *de) gtk_menu_item_new_with_label (_("Clear")); - gtk_action_connect_proxy (de->insert_case, - insert_case); - - gtk_action_connect_proxy (de->delete_cases, delete_case); gtk_menu_shell_append (GTK_MENU_SHELL (menu), insert_case); + g_signal_connect_swapped (G_OBJECT (insert_case), "activate", + G_CALLBACK (gtk_action_activate), + de->insert_case); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new ());