From: Lars Ingebrigtsen Date: Sun, 28 Jul 2019 10:49:30 +0000 (+0200) Subject: Always set the state of the "Show hidden files" gtk button X-Git-Tag: emacs-27.0.90~1817^2~56 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=09b204142ee49b4d613b5590460f868bdc929b90;p=emacs.git Always set the state of the "Show hidden files" gtk button * src/gtkutil.c (xg_get_file_with_chooser): Always set the state of the "Show hidden files" button (bug#23977). If not, the visible state and the actual state get out of sync. --- diff --git a/src/gtkutil.c b/src/gtkutil.c index 1d15aec253e..16d765533a7 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -2035,11 +2035,11 @@ xg_get_file_with_chooser (struct frame *f, gtk_widget_show (wbox); wtoggle = gtk_check_button_new_with_label ("Show hidden files."); - if (x_gtk_show_hidden_files) - { - g_object_set (G_OBJECT (filewin), "show-hidden", TRUE, NULL); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wtoggle), TRUE); - } + g_object_set (G_OBJECT (filewin), "show-hidden", + x_gtk_show_hidden_files, NULL); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wtoggle), + x_gtk_show_hidden_files); + gtk_widget_show (wtoggle); g_signal_connect (G_OBJECT (wtoggle), "clicked", G_CALLBACK (xg_toggle_visibility_cb), filewin);