[gnome-software] Stop searching multiple times on search page.
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Stop searching multiple times on search page.
- Date: Fri, 16 Mar 2018 06:00:56 +0000 (UTC)
commit e52c28d859956c31356836e0089215a42441ca89
Author: Robert Ancell <robert ancell canonical com>
Date: Fri Mar 16 12:08:17 2018 +1300
Stop searching multiple times on search page.
Previously we were searching twice when returning to the search page.
Change to only search when the search text changes.
src/gs-search-page.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-search-page.c b/src/gs-search-page.c
index 0ea26bc8..238fc053 100644
--- a/src/gs-search-page.c
+++ b/src/gs-search-page.c
@@ -338,8 +338,13 @@ gs_search_page_set_text (GsSearchPage *self, const gchar *value)
{
if (value == self->value)
return;
+ if (g_strcmp0 (value, self->value) == 0)
+ return;
+
g_free (self->value);
self->value = g_strdup (value);
+
+ gs_search_page_load (self);
}
static void
@@ -369,8 +374,6 @@ gs_search_page_switch_to (GsPage *page, gboolean scroll_up)
adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (self->scrolledwindow_search));
gtk_adjustment_set_value (adj, gtk_adjustment_get_lower (adj));
}
-
- gs_search_page_load (self);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]