[gnome-contacts] Correctly get the email type



commit d5e6da3fde83c11b0f8dd9f886faf1f1d50f1c1d
Author: Alexander Larsson <alexl redhat com>
Date:   Fri May 27 14:50:44 2011 +0200

    Correctly get the email type

 src/contacts-app.vala |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/contacts-app.vala b/src/contacts-app.vala
index e5e98c7..2bcd12b 100644
--- a/src/contacts-app.vala
+++ b/src/contacts-app.vala
@@ -250,8 +250,12 @@ public class Contacts.App : Window {
       add_header (_("Email"));
       foreach (var p in emails) {
 	var type = "";
-	if (p.parameters.contains ("type"))
-	  type = p.parameters["type"].iterator().get();
+	var types = p.parameters["type"];
+	if (types != null) {
+	  var i = types.iterator();
+	  if (i.next())
+	    type = i.get();
+	}
 	add_string_label (type, p.value, "mail-unread-symbolic", out row);
 	row.clickable.clicked.connect ( () => {
 	    try {



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