[nautilus/wip/gbsneto/search-popover: 9/11] window-slot: reload search when recursive flag changes
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/gbsneto/search-popover: 9/11] window-slot: reload search when recursive flag changes
- Date: Thu, 17 Dec 2015 17:57:41 +0000 (UTC)
commit 42d3de4c5824fe63845882225ce3b5ee0fe911e6
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Oct 5 21:20:51 2015 -0300
window-slot: reload search when recursive flag changes
When the user decides to not have the recursive search
and we are performing a search, reload the current search
so it respects the use setting.
src/nautilus-window-slot.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index dd9d080..7b8891a 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -615,6 +615,18 @@ nautilus_window_slot_get_property (GObject *object,
}
static void
+recursive_search_setting_changed (NautilusWindowSlot *slot)
+{
+ NautilusView *view;
+
+ view = nautilus_window_slot_get_current_view (slot);
+
+ if (nautilus_view_is_searching (view)) {
+ nautilus_window_slot_force_reload (slot);
+ }
+}
+
+static void
nautilus_window_slot_constructed (GObject *object)
{
NautilusWindowSlot *slot = NAUTILUS_WINDOW_SLOT (object);
@@ -639,6 +651,12 @@ nautilus_window_slot_constructed (GObject *object)
slot->details->query_editor, "location",
G_BINDING_DEFAULT);
+ /* Reload searches whenever the recursive-search setting changes */
+ g_signal_connect_swapped (nautilus_preferences,
+ "changed::enable-recursive-search",
+ G_CALLBACK (recursive_search_setting_changed),
+ object);
+
slot->details->title = g_strdup (_("Loading…"));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]