[nautilus] window-slot: ensure location when creating query



commit ca98645f1db0002ef5cc543dc7877dd621796a91
Author: Carlos Soriano <csoriano gnome org>
Date:   Fri Sep 4 15:51:12 2015 +0200

    window-slot: ensure location when creating query
    
    We were not setting a location when showing the query for first
    time, that means that when query changed, it didn't have a location
    and therefore the search failed, until the next iteration that the
    location was set.
    To fix it, set the query location when showing the query for first time.

 src/nautilus-window-slot.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index df0b2a1..77a8bcd 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -385,9 +385,11 @@ static void
 show_query_editor (NautilusWindowSlot *slot)
 {
         NautilusView *view;
+        GFile *location;
 
         view = nautilus_window_slot_get_current_view (slot);
 
+        location = nautilus_window_slot_get_current_location (slot);
         if (nautilus_view_is_searching (view)) {
                 NautilusQuery *query;
 
@@ -396,6 +398,9 @@ show_query_editor (NautilusWindowSlot *slot)
                 if (query != NULL) {
                         nautilus_query_editor_set_query (slot->details->query_editor, query);
                 }
+        } else {
+                /* In this way, when the query changes it will open the actual search */
+                nautilus_query_editor_set_location (slot->details->query_editor, location);
         }
 
        gtk_revealer_set_reveal_child (GTK_REVEALER (slot->details->query_editor_revealer),


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