PsppireImportAssistant: Proceed to next page when a file is double clicked
authorJohn Darrington <john@darrington.wattle.id.au>
Sun, 19 Jul 2020 09:35:56 +0000 (11:35 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sun, 16 Aug 2020 07:01:26 +0000 (09:01 +0200)
src/ui/gui/psppire-import-assistant.c

index 84de028c25a53351bbd24abaae745647b6faab68..a968431d865bf043759adbdafc8368c5c504cfa4 100644 (file)
@@ -655,6 +655,11 @@ chooser_page_reset (PsppireImportAssistant *ia, GtkWidget *page)
 }
 
 
+static void
+on_file_activated (GtkFileChooser *chooser, PsppireImportAssistant *ia)
+{
+  gtk_assistant_next_page (GTK_ASSISTANT (ia));
+}
 
 static void
 chooser_page_create (PsppireImportAssistant *ia)
@@ -663,6 +668,8 @@ chooser_page_create (PsppireImportAssistant *ia)
 
   GtkWidget *chooser = gtk_file_chooser_widget_new (GTK_FILE_CHOOSER_ACTION_OPEN);
 
+  g_signal_connect (chooser, "file-activated", G_CALLBACK (on_file_activated), ia);
+
   g_object_set_data (G_OBJECT (chooser), "on-forward", chooser_page_leave);
   g_object_set_data (G_OBJECT (chooser), "on-reset",   chooser_page_reset);
   g_object_set_data (G_OBJECT (chooser), "on-entering",chooser_page_enter);