diff options
author | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2015-07-29 09:50:32 -0300 |
---|---|---|
committer | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2015-07-31 13:38:10 -0300 |
commit | ba2da7b800e14f22e509161c5c038642c30f9b60 (patch) | |
tree | dc959262356130a0dd1dd5c8c149dbe8d17753f0 /src/nautilus-view.c | |
parent | 1c6e0485bd85854af6298c9d606f7fe6ef7b0b5e (diff) | |
download | nautilus-ba2da7b800e14f22e509161c5c038642c30f9b60.tar.gz |
view: change show-hidden setting only when value differs
Commit 2e1ac98 introduced the new behavior of persistently
storing the show-hidden setting whenever it changes.
This, however, caused an update cycle where NautilusDirectory
tracked the show-hidden change and invalidates the mime types
of the files, sending the apropriate ::file-changed signals.
When NautilusView receives the signals, it unconditionally
updates the action states, which sets the show-hidden action
again, causing another change on the setting and re-triggering
the NautilusDirectory signals, which are detected by NautilusView
and perpetuating the cycle.
Fix that by only storing the show-hidden setting when it
differs from the current one.
Diffstat (limited to 'src/nautilus-view.c')
-rw-r--r-- | src/nautilus-view.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nautilus-view.c b/src/nautilus-view.c index 521adee11..da3583e6c 100644 --- a/src/nautilus-view.c +++ b/src/nautilus-view.c @@ -2264,6 +2264,11 @@ nautilus_view_set_show_hidden_files (NautilusView *view, if (show_hidden != view->details->show_hidden_files) { view->details->show_hidden_files = show_hidden; + + g_settings_set_boolean (gtk_filechooser_preferences, + NAUTILUS_PREFERENCES_SHOW_HIDDEN_FILES, + show_hidden); + if (view->details->model != NULL) { load_directory (view, view->details->model); } @@ -2285,9 +2290,6 @@ action_show_hidden_files (GSimpleAction *action, nautilus_view_set_show_hidden_files (view, show_hidden); - g_settings_set_boolean (gtk_filechooser_preferences, - NAUTILUS_PREFERENCES_SHOW_HIDDEN_FILES, - show_hidden); g_simple_action_set_state (action, state); } |