[nautilus/wip/gbsneto/search-popover: 6/8] 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: 6/8] window-slot: reload search when recursive flag changes
- Date: Wed, 7 Oct 2015 12:30:41 +0000 (UTC)
commit ae5af1e4e01588be223d4ccbbf5706028018864e
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 74ba7a2..4fb1c2b 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -635,6 +635,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);
@@ -655,6 +667,12 @@ nautilus_window_slot_constructed (GObject *object)
gtk_widget_show (GTK_WIDGET (slot->details->query_editor));
nautilus_window_slot_add_extra_location_widget (slot, GTK_WIDGET (slot->details->query_editor));
+ /* 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]