Don't use gtk_action_connect_proxy for popup menu items which
authorJohn Darrington <john@darrington.wattle.id.au>
Thu, 8 May 2008 00:37:12 +0000 (00:37 +0000)
committerJohn Darrington <john@darrington.wattle.id.au>
Thu, 8 May 2008 00:37:12 +0000 (00:37 +0000)
have labels with mnemonics

src/ui/gui/ChangeLog
src/ui/gui/data-editor.c

index 2110403dab781e3c69b63fdc7ffb4210c0608643..a57fb286f8e9840b5a02eafc658f6678beb5b70b 100644 (file)
@@ -1,3 +1,10 @@
+2008-05-08  John Darrington <john@darrington.wattle.id.au>
+
+       * 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  <blp@gnu.org>
 
        Bug #23127.  Reviewed by John Darrington.  Tested by Jason Stover,
index b4da5b9f49bc2a8e94ad14bb702baaecac2fdc09..9ca7511e17d8eaf1dde47ab63b1cdd403fbf35b3 100644 (file)
@@ -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 ());