[empathy: 1/8] factor out field_spec_match_field()
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy: 1/8] factor out field_spec_match_field()
- Date: Thu, 4 Nov 2010 08:16:54 +0000 (UTC)
commit b05d78f8dcf7e952be1a1ffd88757370ec3e19cf
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Wed Sep 29 12:13:25 2010 +0200
factor out field_spec_match_field()
libempathy-gtk/empathy-contact-widget.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c
index 4701abe..0417c1b 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]