[seahorse/refactor: 26/37] Make the filter in the main window work again
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse/refactor: 26/37] Make the filter in the main window work again
- Date: Thu, 20 Oct 2011 08:38:36 +0000 (UTC)
commit a8381a6cb7ac2ea390fc54a352eff3af3645af7b
Author: Stef Walter <stefw collabora co uk>
Date: Fri Oct 14 07:58:03 2011 +0200
Make the filter in the main window work again
libseahorse/seahorse-collection.c | 3 ++-
libseahorse/seahorse-key-manager-store.c | 12 ++++++------
2 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/libseahorse/seahorse-collection.c b/libseahorse/seahorse-collection.c
index 9f50b71..98f05da 100644
--- a/libseahorse/seahorse-collection.c
+++ b/libseahorse/seahorse-collection.c
@@ -338,7 +338,8 @@ seahorse_collection_refresh (SeahorseCollection *self)
g_hash_table_remove (check, l->data);
/* This will add to set */
- maybe_add_object (self, l->data);
+ if (!maybe_remove_object (self, l->data))
+ maybe_add_object (self, l->data);
}
g_list_free (objects);
diff --git a/libseahorse/seahorse-key-manager-store.c b/libseahorse/seahorse-key-manager-store.c
index aa65d9e..a141dc2 100644
--- a/libseahorse/seahorse-key-manager-store.c
+++ b/libseahorse/seahorse-key-manager-store.c
@@ -103,7 +103,7 @@ object_contains_filtered_text (GObject *object,
const gchar* text)
{
gchar* name = NULL;
- gchar* id = NULL;
+ gchar* description = NULL;
gchar* lower;
gboolean ret = FALSE;
@@ -120,14 +120,14 @@ object_contains_filtered_text (GObject *object,
g_free (name);
}
- if (!ret && g_object_class_find_property (G_OBJECT_GET_CLASS (object), "identifier")) {
- g_object_get (object, "identifier", &id, NULL);
- if (id != NULL) {
- lower = g_utf8_strdown (id, -1);
+ if (!ret && g_object_class_find_property (G_OBJECT_GET_CLASS (object), "description")) {
+ g_object_get (object, "description", &description, NULL);
+ if (description != NULL) {
+ lower = g_utf8_strdown (description, -1);
if (strstr (lower, text))
ret = TRUE;
g_free (lower);
- g_free (id);
+ g_free (description);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]