summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-28 22:24:20 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-28 22:24:20 (EDT)
commit9403217518ff7cec87920cf135586921b448636e (patch)
tree05f1f8be4505c93cb62f4485ae0adffcf9e49a66
parent748e41095ff5d13789e33395de2f14a98cbc0feb (diff)
downloadmarquee-9403217518ff7cec87920cf135586921b448636e.zip
marquee-9403217518ff7cec87920cf135586921b448636e.tar.gz
marquee-9403217518ff7cec87920cf135586921b448636e.tar.bz2
mq_web_view_open(), mq_web_view_save(): Move gtk_widget_show_all() call to end
Otherwise, the save chooser's extra widget children are invisible.
-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);
}