From 728d76ee07069a6f7aca9135d6a1d69e6d1ae345 Mon Sep 17 00:00:00 2001 From: Monsta Date: Mon, 27 Jul 2015 22:37:22 +0300 Subject: properties dialog: fix inline search in apps list from https://github.com/GNOME/gnome-session/commit/b3375fa652b236d0c81079a3513ba2a11f22eee9 --- capplet/gsm-properties-dialog.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'capplet') diff --git a/capplet/gsm-properties-dialog.c b/capplet/gsm-properties-dialog.c index 32f4aff..e74a8fe 100644 --- a/capplet/gsm-properties-dialog.c +++ b/capplet/gsm-properties-dialog.c @@ -80,6 +80,7 @@ enum { STORE_COL_GICON, STORE_COL_DESCRIPTION, STORE_COL_APP, + STORE_COL_SEARCH, NUMBER_OF_COLUMNS }; @@ -123,11 +124,13 @@ _fill_iter_from_app (GtkListStore *list_store, gboolean enabled; GIcon *icon; const char *description; + const char *app_name; hidden = gsp_app_get_hidden (app); enabled = gsp_app_get_enabled (app); icon = gsp_app_get_icon (app); description = gsp_app_get_description (app); + app_name = gsp_app_get_name (app); if (G_IS_THEMED_ICON (icon)) { GtkIconTheme *theme; @@ -160,6 +163,7 @@ _fill_iter_from_app (GtkListStore *list_store, STORE_COL_GICON, icon, STORE_COL_DESCRIPTION, description, STORE_COL_APP, app, + STORE_COL_SEARCH, app_name, -1); g_object_unref (icon); } @@ -517,7 +521,8 @@ setup_dialog (GsmPropertiesDialog *dialog) G_TYPE_BOOLEAN, G_TYPE_ICON, G_TYPE_STRING, - G_TYPE_OBJECT); + G_TYPE_OBJECT, + G_TYPE_STRING); tree_filter = gtk_tree_model_filter_new (GTK_TREE_MODEL (dialog->priv->list_store), NULL); g_object_unref (dialog->priv->list_store); @@ -584,7 +589,7 @@ setup_dialog (GsmPropertiesDialog *dialog) gtk_tree_view_column_set_sort_column_id (column, STORE_COL_DESCRIPTION); - gtk_tree_view_set_search_column (treeview, STORE_COL_DESCRIPTION); + gtk_tree_view_set_search_column (treeview, STORE_COL_SEARCH); gtk_tree_view_set_rules_hint (treeview, TRUE); gtk_tree_view_enable_model_drag_source (treeview, -- cgit v1.2.1