[gnome-session] capplet: Fix inline search
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] capplet: Fix inline search
- Date: Mon, 29 Nov 2010 21:43:57 +0000 (UTC)
commit b3375fa652b236d0c81079a3513ba2a11f22eee9
Author: Ricardo Cruz <rpmcruz alunos dcc fc up pt>
Date: Mon Nov 29 22:42:31 2010 +0100
capplet: Fix inline search
The inline search works with a strncmp(), so we need a string that has
no markup to compare it with.
https://bugzilla.gnome.org/show_bug.cgi?id=633269
capplet/gsm-properties-dialog.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/capplet/gsm-properties-dialog.c b/capplet/gsm-properties-dialog.c
index 1eb73be..4432b09 100644
--- a/capplet/gsm-properties-dialog.c
+++ b/capplet/gsm-properties-dialog.c
@@ -74,6 +74,7 @@ enum {
STORE_COL_GICON,
STORE_COL_DESCRIPTION,
STORE_COL_APP,
+ STORE_COL_SEARCH,
NUMBER_OF_COLUMNS
};
@@ -117,11 +118,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;
@@ -154,6 +157,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);
}
@@ -516,7 +520,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);
@@ -583,7 +588,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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]