summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Soriano <csoriano@gnome.org>2015-07-23 18:24:11 +0200
committerCarlos Soriano <csoriano@gnome.org>2015-07-23 18:51:34 +0200
commit9e1e14db2f4c5e273f6e37222f3bac49fa64dd8c (patch)
tree1c68536bd458342fd4687dd3c9783ced3dd09005
parent7e879ca49e9d6f20a1cd6515263a76d26e118c92 (diff)
downloadnautilus-9e1e14db2f4c5e273f6e37222f3bac49fa64dd8c.tar.gz
window-slot: disconnect from model signals before stopping
Now that stopping the view also stops the model search, make sure we disconnect from its signals before, so we don't show the no search results because we got a done-loading with an empty directory because we stopped the search. We want to let the view with it's current items, even if the directory stopped to search and it cleared its files (and therefore it reports 0 files).
-rw-r--r--src/nautilus-window-slot.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index a788ff6be..860f6efd7 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -1635,9 +1635,16 @@ cancel_location_change (NautilusWindowSlot *slot)
{
GList *selection;
GFile *location;
+ NautilusDirectory *directory;
location = nautilus_window_slot_get_location (slot);
+ directory = nautilus_directory_get (slot->details->location);
+ disconnect_directory_signals (slot, directory);
+ /* Stops current loading or search if any, so we are not slow */
+ nautilus_view_stop_loading (slot->details->content_view);
+ nautilus_directory_unref (directory);
+
if (slot->details->pending_location != NULL
&& location != NULL
&& slot->details->content_view != NULL) {
@@ -2715,8 +2722,6 @@ nautilus_window_slot_set_allow_stop (NautilusWindowSlot *slot,
void
nautilus_window_slot_stop_loading (NautilusWindowSlot *slot)
{
- nautilus_view_stop_loading (slot->details->content_view);
-
cancel_location_change (slot);
}