[gnome-contacts] Automatically filter out pure keyfile personas
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] Automatically filter out pure keyfile personas
- Date: Fri, 17 Jun 2011 14:07:32 +0000 (UTC)
commit 318bfda16bd8c3a8ce3730bc23547420a9a49190
Author: Alexander Larsson <alexl redhat com>
Date: Thu Jun 16 15:50:50 2011 +0200
Automatically filter out pure keyfile personas
src/contacts-store.vala | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/contacts-store.vala b/src/contacts-store.vala
index eff16fa..367f35b 100644
--- a/src/contacts-store.vala
+++ b/src/contacts-store.vala
@@ -48,6 +48,17 @@ public class Contacts.Store {
public TreeModel model { get { return list_store; } }
private bool apply_filter (Contact contact) {
+ // Filter out pure key-file persona individuals as these are
+ // not very interesting
+ var personas = contact.individual.personas;
+ var i = personas.iterator();
+ if (i.next()) {
+ var persona = i.get();
+ if (!i.has_next () &&
+ persona.store.type_id == "key-file")
+ return false;
+ }
+
if (filter_values == null || filter_values.length == 0)
return true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]