diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-09-29 18:18:42 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-11-03 15:45:22 +0800 |
commit | a71719b4f268e0a1872007af770593773332cb0f (patch) | |
tree | 9b72e96c890621c655c81ce1352f109a62315161 | |
parent | b05d78f8dcf7e952be1a1ffd88757370ec3e19cf (diff) | |
download | gsoc2013-empathy-a71719b4f268e0a1872007af770593773332cb0f.tar gsoc2013-empathy-a71719b4f268e0a1872007af770593773332cb0f.tar.gz gsoc2013-empathy-a71719b4f268e0a1872007af770593773332cb0f.tar.bz2 gsoc2013-empathy-a71719b4f268e0a1872007af770593773332cb0f.tar.lz gsoc2013-empathy-a71719b4f268e0a1872007af770593773332cb0f.tar.xz gsoc2013-empathy-a71719b4f268e0a1872007af770593773332cb0f.tar.zst gsoc2013-empathy-a71719b4f268e0a1872007af770593773332cb0f.zip |
field_spec_match_field: check that parameters are matching as well (#630421)
-rw-r--r-- | libempathy-gtk/empathy-contact-widget.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c index 0417c1b47..6f9b9c644 100644 --- a/libempathy-gtk/empathy-contact-widget.c +++ b/libempathy-gtk/empathy-contact-widget.c @@ -282,7 +282,21 @@ static gboolean field_spec_match_field (TpContactInfoFieldSpec *spec, TpContactInfoField *field) { - return (!tp_strdiff (field->field_name, spec->name)); + guint i; + + if (tp_strdiff (field->field_name, spec->name)) + return FALSE; + + if (g_strv_length (field->parameters) != g_strv_length (spec->parameters)) + return FALSE; + + for (i = 0; field->parameters[i] != NULL; i++) + { + if (tp_strdiff (field->parameters[i], spec->parameters[i])) + return FALSE; + } + + return TRUE; } static guint |