[gtk+] gtkplacesview: only filter out placeholder if searching
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtkplacesview: only filter out placeholder if searching
- Date: Sun, 30 Aug 2015 07:49:10 +0000 (UTC)
commit a427f1e82e1db8c56c1d198ffbd89a2953e08534
Author: Carlos Soriano <csoriano gnome org>
Date: Thu Aug 27 20:58:27 2015 +0200
gtkplacesview: only filter out placeholder if searching
We were filtering out placeholders if the list box filters
while not searching, which is not what we want, since placeholders
should only be hidden if the view is searching.
https://bugzilla.gnome.org/show_bug.cgi?id=754150
gtk/gtkplacesview.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkplacesview.c b/gtk/gtkplacesview.c
index 2792973..9289d16 100644
--- a/gtk/gtkplacesview.c
+++ b/gtk/gtkplacesview.c
@@ -1888,11 +1888,13 @@ listbox_filter_func (GtkListBoxRow *row,
gboolean is_network;
gboolean is_placeholder;
gboolean retval;
+ gboolean searching;
gchar *name;
gchar *path;
priv = gtk_places_view_get_instance_private (GTK_PLACES_VIEW (user_data));
retval = FALSE;
+ searching = priv->search_query && priv->search_query[0] != '\0';
is_network = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (row), "is-network"));
is_placeholder = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (row), "is-placeholder"));
@@ -1900,10 +1902,10 @@ listbox_filter_func (GtkListBoxRow *row,
if (is_network && priv->local_only)
return FALSE;
- if (is_placeholder)
+ if (is_placeholder && searching)
return FALSE;
- if (!priv->search_query || priv->search_query[0] == '\0')
+ if (!searching)
return TRUE;
g_object_get (row,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]