[gnome-contacts] Don't show im addresses in edit mode that are used for linking



commit 3521b3304f961f6bd27df9c735e81217286e8466
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Aug 25 22:31:16 2011 +0200

    Don't show im addresses in edit mode that are used for linking

 src/contacts-contact-pane.vala |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index 8e4b0ac..a989f31 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -603,13 +603,14 @@ public class Contacts.ContactPane : EventBox {
     if (im_details != null) {
       var ims = im_details.im_addresses;
       var im_keys = ims.get_keys ();
-      if (!im_keys.is_empty) {
-	foreach (var protocol in im_keys) {
-	  foreach (var id in ims[protocol]) {
-	    im_layout.add_label_detail (_("Chat"), protocol + "/" + id.value);
-	    var button = im_layout.add_remove ();
-	    button.set_sensitive (false);
-	  }
+      foreach (var protocol in im_keys) {
+	foreach (var id in ims[protocol]) {
+	  var im_persona = selected_contact.find_im_persona (protocol, id.value);
+	  if (im_persona != null && im_persona != persona)
+	    continue;
+	  im_layout.add_label_detail (_("Chat"), protocol + "/" + id.value);
+	  var button = im_layout.add_remove ();
+	  button.set_sensitive (false);
 	}
       }
     }



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