summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2012-02-27 11:04:04 +0100
committerAlexander Larsson <alexl@redhat.com>2012-02-27 11:07:08 +0100
commit9d38224d24d4b6d8fd002f0089e67274be91a946 (patch)
tree461e75add993e727e5838b8ae3a3122e2f685f93 /src
parent3897f37ce04d0873c8f10dfc357c35e418d34337 (diff)
downloadgnome-contacts-9d38224d24d4b6d8fd002f0089e67274be91a946.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/contacts-contact.vala5
-rw-r--r--src/contacts-link-dialog.vala2
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) {