aboutsummaryrefslogtreecommitdiff
path: root/src/gui_import.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-02-26 10:48:09 +0100
committerThomas White <taw@physics.org>2021-02-26 10:48:09 +0100
commitadcea8ed5e4ca28e440448ed95e8a643a1286fb0 (patch)
tree36fba9367f12eebcd3aa144e43ef27e0bc20e94e /src/gui_import.c
parent287cea3cb2bbb0df81802c3009fec1e9528dde95 (diff)
GUI: Delay connecting signals until entire import window is ready
Diffstat (limited to 'src/gui_import.c')
-rw-r--r--src/gui_import.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/gui_import.c b/src/gui_import.c
index d257f746..11d5f7f2 100644
--- a/src/gui_import.c
+++ b/src/gui_import.c
@@ -467,8 +467,6 @@ gint import_sig(GtkWidget *widget, struct crystfelproject *proj)
"Select an individual file");
gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(ctx->indiv),
FALSE, FALSE, 4.0);
- g_signal_connect(ctx->indiv, "toggled",
- G_CALLBACK(finddata_typetoggle_sig), ctx);
ctx->indiv_chooser = gtk_file_chooser_button_new("Select file",
GTK_FILE_CHOOSER_ACTION_OPEN);
gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(ctx->indiv_chooser),
@@ -481,8 +479,6 @@ gint import_sig(GtkWidget *widget, struct crystfelproject *proj)
"Read a list of files");
gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(ctx->list),
FALSE, FALSE, 4.0);
- g_signal_connect(ctx->list, "toggled",
- G_CALLBACK(finddata_typetoggle_sig), ctx);
ctx->list_chooser = gtk_file_chooser_button_new("Select the list of filenames",
GTK_FILE_CHOOSER_ACTION_OPEN);
gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(ctx->list_chooser),
@@ -496,8 +492,6 @@ gint import_sig(GtkWidget *widget, struct crystfelproject *proj)
"Search for files in folder");
gtk_box_pack_start(GTK_BOX(hbox), GTK_WIDGET(ctx->search),
FALSE, FALSE, 4.0);
- g_signal_connect(ctx->search, "toggled",
- G_CALLBACK(finddata_typetoggle_sig), ctx);
ctx->search_chooser = gtk_file_chooser_button_new("Select a folder",
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
if ( proj->data_top_folder != NULL ) {
@@ -593,6 +587,15 @@ gint import_sig(GtkWidget *widget, struct crystfelproject *proj)
ctx->dump_results);
gtk_widget_set_sensitive(ctx->dump_results, FALSE);
+ g_signal_connect(ctx->indiv, "toggled",
+ G_CALLBACK(finddata_typetoggle_sig), ctx);
+ g_signal_connect(ctx->list, "toggled",
+ G_CALLBACK(finddata_typetoggle_sig), ctx);
+ g_signal_connect(ctx->search, "toggled",
+ G_CALLBACK(finddata_typetoggle_sig), ctx);
+ g_signal_connect(ctx->stream, "toggled",
+ G_CALLBACK(finddata_typetoggle_sig), ctx);
+
g_signal_connect(dialog, "response",
G_CALLBACK(finddata_response_sig), ctx);