summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/web-view.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/web-view.c b/src/web-view.c
index 4ac0244..37654a6 100644
--- a/src/web-view.c
+++ b/src/web-view.c
@@ -872,9 +872,6 @@ mq_web_view_open(MqWebView *web_view)
"_Cancel", GTK_RESPONSE_CANCEL,
"_Open", GTK_RESPONSE_ACCEPT,
NULL);
- g_signal_connect(dialog, "response",
- G_CALLBACK(open_response_cb), web_view);
- gtk_widget_show_all(dialog);
chooser = GTK_FILE_CHOOSER(dialog);
dir = mq_config_get_string(web_view->config, "directories.open-file");
@@ -886,6 +883,10 @@ mq_web_view_open(MqWebView *web_view)
g_free(dir);
add_chooser_filters(chooser);
+
+ g_signal_connect(dialog, "response",
+ G_CALLBACK(open_response_cb), web_view);
+ gtk_widget_show_all(dialog);
}
static void
@@ -955,9 +956,6 @@ mq_web_view_save(MqWebView *web_view)
"_Cancel", GTK_RESPONSE_CANCEL,
"_Save", GTK_RESPONSE_ACCEPT,
NULL);
- g_signal_connect(dialog, "response",
- G_CALLBACK(save_response_cb), web_view);
- gtk_widget_show_all(dialog);
chooser = GTK_FILE_CHOOSER(dialog);
gtk_file_chooser_set_do_overwrite_confirmation(chooser, TRUE);
@@ -988,4 +986,8 @@ mq_web_view_save(MqWebView *web_view)
FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(type_box), type_combo_box, FALSE, FALSE, 0);
gtk_file_chooser_set_extra_widget(chooser, type_box);
+
+ g_signal_connect(dialog, "response",
+ G_CALLBACK(save_response_cb), web_view);
+ gtk_widget_show_all(dialog);
}