From 897caa5f59139e690778f006ce69518cc484a25a Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 20 Oct 2010 12:55:38 +0200 Subject: field_value_is_empty: check that all the values are empty --- libempathy-gtk/empathy-contact-widget.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3