aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-10-20 18:55:38 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-11-03 15:45:23 +0800
commit897caa5f59139e690778f006ce69518cc484a25a (patch)
treec1357e780eac42307b8b461859018a92be509d1d
parenta71719b4f268e0a1872007af770593773332cb0f (diff)
downloadgsoc2013-empathy-897caa5f59139e690778f006ce69518cc484a25a.tar
gsoc2013-empathy-897caa5f59139e690778f006ce69518cc484a25a.tar.gz
gsoc2013-empathy-897caa5f59139e690778f006ce69518cc484a25a.tar.bz2
gsoc2013-empathy-897caa5f59139e690778f006ce69518cc484a25a.tar.lz
gsoc2013-empathy-897caa5f59139e690778f006ce69518cc484a25a.tar.xz
gsoc2013-empathy-897caa5f59139e690778f006ce69518cc484a25a.tar.zst
gsoc2013-empathy-897caa5f59139e690778f006ce69518cc484a25a.zip
field_value_is_empty: check that all the values are empty
-rw-r--r--libempathy-gtk/empathy-contact-widget.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c
index 6f9b9c644..947fbfa76 100644
--- a/libempathy-gtk/empathy-contact-widget.c
+++ b/libempathy-gtk/empathy-contact-widget.c
@@ -149,10 +149,19 @@ enum
static gboolean
field_value_is_empty (TpContactInfoField *field)
{
+ guint i;
+
if (field->field_value == NULL)
return TRUE;
- return field->field_value[0] == NULL;
+ /* Field is empty if all its values are empty */
+ for (i = 0; field->field_value[i] != NULL; i++)
+ {
+ if (!tp_str_empty (field->field_value[i]))
+ return FALSE;
+ }
+
+ return TRUE;
}
static void