[gnome-contacts] Show non-other google personas before others



commit e291633fb8f94334f5f0efc64f1530bd301662a4
Author: Alexander Larsson <alexl redhat com>
Date:   Tue Jan 24 13:59:25 2012 +0100

    Show non-other google personas before others

 src/contacts-contact.vala |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/contacts-contact.vala b/src/contacts-contact.vala
index 657b785..334ca08 100644
--- a/src/contacts-contact.vala
+++ b/src/contacts-contact.vala
@@ -624,8 +624,17 @@ public class Contacts.Contact : GLib.Object  {
     var store_a = persona_a.store;
     var store_b = persona_b.store;
 
-    if (store_a == store_b)
+    if (store_a == store_b) {
+      if (persona_is_google (persona_a)) {
+	/* Non-other google personas rank before others */
+	if (persona_is_google_other (persona_a) && !persona_is_google_other (persona_b))
+	  return 1;
+	if (!persona_is_google_other (persona_a) && persona_is_google_other (persona_b))
+	  return -1;
+      }
+
       return 0;
+    }
 
     if (store_a.is_primary_store && store_b.is_primary_store)
       return 0;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]