]> git.0d.be Git - empathy.git/commitdiff
factor out field_spec_match_field()
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 29 Sep 2010 10:13:25 +0000 (12:13 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 3 Nov 2010 07:45:22 +0000 (08:45 +0100)
libempathy-gtk/empathy-contact-widget.c

index 4701abedebda7e262b84e6ecbb63a3f732b090fb..0417c1b47561e471146073c00add5374719e214f 100644 (file)
@@ -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;
         }