[gnome-software/1185-search-sometimes-fails-to-search] 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] gs-search-page: Reload the page on the text change when the page is active
- Date: Thu, 15 Apr 2021 08:39:23 +0000 (UTC)
commit 71958b61d447b84ac8c0fb400c60c1a91b35c738
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..d632c93a7 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;
+ self->changed = !gs_page_is_active (GS_PAGE (self));
+
+ /* In fact it changed and the page is active, thus call also the reload */
+ if (!self->changed && self->value)
+ gs_search_page_load (self);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]