File 6e37d15f.patch of Package nautilus

From 6e37d15fe663107d280f6a516232c20f6d6c48fa Mon Sep 17 00:00:00 2001
From: Khalid Abu Shawarib <khalid.shawarib@gmail.com>
Date: Tue, 25 Apr 2023 22:52:24 +0000
Subject: [PATCH] window-slot: Manage search props set with action

Manages search property change thorugh "search-visible"
action. The action triggers other related functions that if not
executed will causes buggy behavior.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2875
---
 src/nautilus-window-slot.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 785386ea13..1768675fe4 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -738,7 +738,16 @@ nautilus_window_slot_set_property (GObject      *object,
 
         case PROP_SEARCHING:
         {
-            nautilus_window_slot_set_searching (self, g_value_get_boolean (value));
+            /* Should be nautilus_window_slot_set_searching(), but then
+             * the search-visible action would get out of sync with this
+             * property. See discussion in https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/1157
+             */
+            nautilus_window_slot_set_search_visible (self, g_value_get_boolean (value));
+            /* The previous call should have already caused the action
+             * to call nautilus_window_slot_set_searching(), but it
+             * doesn't hurt to make sure we set our boolean propperly.
+             */
+            self->searching = g_value_get_boolean (value);
         }
         break;
 
-- 
GitLab

openSUSE Build Service is sponsored by