summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarlos Soriano <csoriano@gnome.org>2015-09-04 15:51:12 +0200
committerCarlos Soriano <csoriano@gnome.org>2015-09-04 21:34:28 +0200
commitca98645f1db0002ef5cc543dc7877dd621796a91 (patch)
tree32c6bc43154a455e7468d1aa587e711cfa54228a /src
parent30a782b161f5b416637b5550ab532bf351948de6 (diff)
downloadnautilus-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.
Diffstat (limited to 'src')
-rw-r--r--src/nautilus-window-slot.c5
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),