[gnome-contacts] Don't show details that are empty



commit adf00990461955218315f1b0ab264a31b8d8ae22
Author: Alexander Larsson <alexl redhat com>
Date:   Mon May 30 09:11:13 2011 +0200

    Don't show details that are empty

 src/contacts-app.vala |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/contacts-app.vala b/src/contacts-app.vala
index d90fb35..9b7367b 100644
--- a/src/contacts-app.vala
+++ b/src/contacts-app.vala
@@ -184,10 +184,11 @@ public class Contacts.App : Window {
     contact.individual.get_property (pname, ref prop_value);
     string val = prop_value.get_string ();
 
-    if (val != null)
-      add_string_label (label, val, icon_name, out row);
+    if (val == null || val.length == 0)
+      return false;
 
-    return val != null;
+    add_string_label (label, val, icon_name, out row);
+    return true;
   }
 
   private void display_contact (Contact contact) {



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