[gnome-software/1185-search-sometimes-fails-to-search: 25/25] gs-search-page: Reload the page on the text change when the page is active
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1185-search-sometimes-fails-to-search: 25/25] gs-search-page: Reload the page on the text change when the page is active
- Date: Thu, 15 Apr 2021 15:11:39 +0000 (UTC)
commit 75a195929d31f61dc188d0f5a3d7c0147fd05ace
Author: Milan Crha <mcrha redhat com>
Date: Thu Apr 15 10:32:50 2021 +0200
gs-search-page: Reload the page on the text change when the page is active
This fixes the initial search when the page is selected before the text
is set. The text set only marked the need to reload itself, but it relied
on the page change signal to do it. As the page is already active, the signal
did not come and no search was done.
Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1185
src/gs-search-page.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/gs-search-page.c b/src/gs-search-page.c
index 58e23bb5e..544d53be3 100644
--- a/src/gs-search-page.c
+++ b/src/gs-search-page.c
@@ -342,7 +342,11 @@ gs_search_page_set_text (GsSearchPage *self, const gchar *value)
g_free (self->value);
self->value = g_strdup (value);
- self->changed = TRUE;
+ /* Load immediately, when the page is active */
+ if (self->value && gs_page_is_active (GS_PAGE (self)))
+ gs_search_page_load (self);
+ else
+ self->changed = TRUE;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]