[libhandy] preferences-group: Exclude untitled rows from search
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy] preferences-group: Exclude untitled rows from search
- Date: Wed, 29 Jul 2020 18:18:40 +0000 (UTC)
commit ac7574bebcc51288288b6ef23d9cc272b876a537
Author: Adrien Plazas <kekun plazas laposte net>
Date: Wed Jul 29 19:46:29 2020 +0200
preferences-group: Exclude untitled rows from search
While they would be searchable via their subtitle, they would be visible
as empty in the search, presenting their page as the only useful
information, which isn't enough, so just ignore them.
src/hdy-preferences-group.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/src/hdy-preferences-group.c b/src/hdy-preferences-group.c
index 82c6d788..80006274 100644
--- a/src/hdy-preferences-group.c
+++ b/src/hdy-preferences-group.c
@@ -408,12 +408,19 @@ static void
add_preferences_to_model (HdyPreferencesRow *row,
GListStore *model)
{
+ const gchar *title;
+
g_assert (HDY_IS_PREFERENCES_ROW (row));
g_assert (G_IS_LIST_STORE (model));
if (!gtk_widget_get_visible (GTK_WIDGET (row)))
return;
+ title = hdy_preferences_row_get_title (row);
+
+ if (!title || !*title)
+ return;
+
g_list_store_append (model, row);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]