diff options
author | Carlos Soriano <csoriano@gnome.org> | 2015-10-07 20:29:15 +0200 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2015-10-07 20:33:00 +0200 |
commit | 5bf37b7769b6cb85bf454a894f53dbd7e9338d93 (patch) | |
tree | 99fbbb99c363653e3a4e93493a1055b4e57cf775 | |
parent | e2c5c42a202c9d199c525037ca9700cabe546089 (diff) | |
download | nautilus-5bf37b7769b6cb85bf454a894f53dbd7e9338d93.tar.gz |
files-view: order unrefing the model so state is clean up
In done_loading we check for floating bar and empty states.
In case the directory doesn't exists anymore in this case,
we cannot do that (without adding bunch of if's).
So instead reorder the unrefing so the directory is alive
when all the checks are performed.
This fixes seeing the floating bar when a directory fails to
load because the user doesn't have permissions.
https://bugzilla.gnome.org/show_bug.cgi?id=755207
-rw-r--r-- | src/nautilus-files-view.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c index c8af3840f..a2992d08a 100644 --- a/src/nautilus-files-view.c +++ b/src/nautilus-files-view.c @@ -7170,11 +7170,6 @@ nautilus_files_view_stop_loading (NautilusFilesView *view) { g_return_if_fail (NAUTILUS_IS_FILES_VIEW (view)); - disconnect_model_handlers (view); - if (view->details->model) { - nautilus_directory_unref (view->details->model); - view->details->model = NULL; - } unschedule_display_of_pending_files (view); reset_update_interval (view); @@ -7197,6 +7192,12 @@ nautilus_files_view_stop_loading (NautilusFilesView *view) view->details->pending_selection = NULL; done_loading (view, FALSE); + + disconnect_model_handlers (view); + if (view->details->model) { + nautilus_directory_unref (view->details->model); + view->details->model = NULL; + } } gboolean |