From 09b204142ee49b4d613b5590460f868bdc929b90 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 28 Jul 2019 12:49:30 +0200 Subject: [PATCH] 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. --- src/gtkutil.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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); -- 2.39.2