[nautilus] window-slot: disconnect from model signals before stopping



commit 9e1e14db2f4c5e273f6e37222f3bac49fa64dd8c
Author: Carlos Soriano <csoriano gnome org>
Date:   Thu Jul 23 18:24:11 2015 +0200

    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).

 src/nautilus-window-slot.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index a788ff6..860f6ef 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);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]