aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-contact-widget.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-09-29 18:13:25 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-11-03 15:45:22 +0800
commitb05d78f8dcf7e952be1a1ffd88757370ec3e19cf (patch)
tree40521091bb68e459e23ada7b76716d2922e31521 /libempathy-gtk/empathy-contact-widget.c
parent0c927779b5b37ba01bb710b86e21c55f35e7ad94 (diff)
downloadgsoc2013-empathy-b05d78f8dcf7e952be1a1ffd88757370ec3e19cf.tar
gsoc2013-empathy-b05d78f8dcf7e952be1a1ffd88757370ec3e19cf.tar.gz
gsoc2013-empathy-b05d78f8dcf7e952be1a1ffd88757370ec3e19cf.tar.bz2
gsoc2013-empathy-b05d78f8dcf7e952be1a1ffd88757370ec3e19cf.tar.lz
gsoc2013-empathy-b05d78f8dcf7e952be1a1ffd88757370ec3e19cf.tar.xz
gsoc2013-empathy-b05d78f8dcf7e952be1a1ffd88757370ec3e19cf.tar.zst
gsoc2013-empathy-b05d78f8dcf7e952be1a1ffd88757370ec3e19cf.zip
factor out field_spec_match_field()
Diffstat (limited to 'libempathy-gtk/empathy-contact-widget.c')
-rw-r--r--libempathy-gtk/empathy-contact-widget.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c
index 4701abede..0417c1b47 100644
--- a/libempathy-gtk/empathy-contact-widget.c
+++ b/libempathy-gtk/empathy-contact-widget.c
@@ -278,6 +278,13 @@ contact_info_field_spec_cmp (TpContactInfoFieldSpec *spec1,
return contact_info_field_name_cmp (spec1->name, spec2->name);
}
+static gboolean
+field_spec_match_field (TpContactInfoFieldSpec *spec,
+ TpContactInfoField *field)
+{
+ return (!tp_strdiff (field->field_name, spec->name));
+}
+
static guint
contact_widget_details_update_edit (EmpathyContactWidget *information)
{
@@ -314,7 +321,7 @@ contact_widget_details_update_edit (EmpathyContactWidget *information)
{
TpContactInfoField *tmp = ll->data;
- if (!tp_strdiff (tmp->field_name, spec->name))
+ if (field_spec_match_field (spec, tmp))
field = tmp;
}