[gnome-contacts] Support linking non-main contacts with other non-main contacts



commit 9d38224d24d4b6d8fd002f0089e67274be91a946
Author: Alexander Larsson <alexl redhat com>
Date:   Mon Feb 27 11:04:04 2012 +0100

    Support linking non-main contacts with other non-main contacts
    
    This is useful to link e.g. telepathy personas together which empathy
    wants since it dropped its link dialog. Its not as weird as linking two
    main contacts togethery, as you often have one main contacts and
    multiple other contacts, but they may very well be linked together in
    another sequence.

 src/contacts-contact.vala     |    5 ++---
 src/contacts-link-dialog.vala |    2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/contacts-contact.vala b/src/contacts-contact.vala
index b8746a1..a6cfa17 100644
--- a/src/contacts-contact.vala
+++ b/src/contacts-contact.vala
@@ -1174,9 +1174,8 @@ public class Contacts.Contact : GLib.Object  {
     if (!App.app.contacts_store.may_suggest_link (this, other))
       return false;
 
-    /* Only connect main contacts with non-mainable contacts, and vice versa. */
-    if ((this.is_main && !other.has_mainable_persona()) ||
-	(!this.has_mainable_persona () && other.is_main)) {
+    /* Only connect main contacts with non-mainable contacts. */
+    if (this.is_main && !other.has_mainable_persona()) {
       return true;
     }
     return false;
diff --git a/src/contacts-link-dialog.vala b/src/contacts-link-dialog.vala
index 44714a5..03a61d4 100644
--- a/src/contacts-link-dialog.vala
+++ b/src/contacts-link-dialog.vala
@@ -159,7 +159,7 @@ public class Contacts.LinkDialog : Dialog {
     if (contact.is_main)
       view.set_show_subset (View.Subset.OTHER);
     else
-      view.set_show_subset (View.Subset.MAIN);
+      view.set_show_subset (View.Subset.ALL_SEPARATED);
 
     var matches = contact.store.aggregator.get_potential_matches (contact.individual, MatchResult.HIGH);
     foreach (var ind in matches.keys) {



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