Don't proxy button-open to action_data_open.
authorJohn Darrington <john@darrington.wattle.id.au>
Fri, 13 Mar 2009 00:35:48 +0000 (09:35 +0900)
committerJohn Darrington <john@darrington.wattle.id.au>
Fri, 13 Mar 2009 00:35:48 +0000 (09:35 +0900)
Connect to the clicked signal instead, because we
don't want the icon, label etc. to assume that of
the action.  Closes bug #25817

src/ui/gui/psppire-data-window.c

index ccfa9ad1c3073bae0c6d0c6878c4e37cb7f6eb20..5d35551a09345598c020c72a4c10e560de359b46 100644 (file)
@@ -1101,8 +1101,10 @@ psppire_data_window_init (PsppireDataWindow *de)
 
 
   {
+    GtkWidget *toolbarbutton = get_widget_assert (de->builder, "button-open");
+
     GtkAction *action_data_open =
-      resolve_action (de->builder, "file_open_data", "button-open");
+      resolve_action (de->builder, "file_open_data", NULL);
 
     g_object_set (action_data_open,
                  "tooltip",  _("Open a data file"),
@@ -1111,6 +1113,9 @@ psppire_data_window_init (PsppireDataWindow *de)
 
     g_signal_connect (action_data_open, "activate",
                      G_CALLBACK (open_data_dialog), de);
+
+    g_signal_connect_swapped (toolbarbutton, "clicked",
+                     G_CALLBACK (gtk_action_activate), action_data_open);
   }