diff options
author | Carlos Soriano <csoriano@gnome.org> | 2015-09-04 15:51:12 +0200 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2015-09-04 21:34:28 +0200 |
commit | ca98645f1db0002ef5cc543dc7877dd621796a91 (patch) | |
tree | 32c6bc43154a455e7468d1aa587e711cfa54228a | |
parent | 30a782b161f5b416637b5550ab532bf351948de6 (diff) | |
download | nautilus-ca98645f1db0002ef5cc543dc7877dd621796a91.tar.gz |
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.
-rw-r--r-- | 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 df0b2a135..77a8bcdaa 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), |