[gnome-contacts] Show phone nrs



commit 948147fb7b59303590eaf2e4b3823458c46d4efc
Author: Alexander Larsson <alexl redhat com>
Date:   Mon May 30 09:12:15 2011 +0200

    Show phone nrs

 src/contacts-app.vala |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/src/contacts-app.vala b/src/contacts-app.vala
index b216fbf..c7157ae 100644
--- a/src/contacts-app.vala
+++ b/src/contacts-app.vala
@@ -309,6 +309,28 @@ public class Contacts.App : Window {
       }
     }
 
+    var phone_numbers = contact.individual.phone_numbers;
+    if (!phone_numbers.is_empty) {
+      add_label_spacer ();
+      add_header (_("Phone"));
+      foreach (var p in phone_numbers) {
+	var type = "";
+	var types = p.parameters["type"];
+	if (types != null) {
+	  var i = types.iterator();
+	  if (i.next())
+	    type = i.get();
+	}
+	add_string_label (type, p.value, null, out row);
+	row.clickable.clicked.connect ( () => {
+	    try {
+	      // How to call?
+	    } catch {
+	    }
+	  });
+      }
+    }
+
     add_label_spacer ();
     add_string_property_label (_("Alias"), contact, "alias", null, out row);
     add_label_spacer ();



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