[nautilus] files-view: order unrefing the model so state is clean up
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] files-view: order unrefing the model so state is clean up
- Date: Wed, 7 Oct 2015 18:34:58 +0000 (UTC)
commit 5bf37b7769b6cb85bf454a894f53dbd7e9338d93
Author: Carlos Soriano <csoriano gnome org>
Date: Wed Oct 7 20:29:15 2015 +0200
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
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 c8af384..a2992d0 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]