diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-05-16 09:28:46 +0800 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-05-18 10:43:02 +0800 |
commit | df30bb0dc150ced91aaf8dc992a11e7718d56c40 (patch) | |
tree | 905c1acbb4c8cf4e2ac5de6364d57b590530ae31 /libempathy-gtk | |
parent | c2b38a596964d24b0532ba0468ab89252799faf5 (diff) | |
download | gsoc2013-empathy-df30bb0dc150ced91aaf8dc992a11e7718d56c40.tar gsoc2013-empathy-df30bb0dc150ced91aaf8dc992a11e7718d56c40.tar.gz gsoc2013-empathy-df30bb0dc150ced91aaf8dc992a11e7718d56c40.tar.bz2 gsoc2013-empathy-df30bb0dc150ced91aaf8dc992a11e7718d56c40.tar.lz gsoc2013-empathy-df30bb0dc150ced91aaf8dc992a11e7718d56c40.tar.xz gsoc2013-empathy-df30bb0dc150ced91aaf8dc992a11e7718d56c40.tar.zst gsoc2013-empathy-df30bb0dc150ced91aaf8dc992a11e7718d56c40.zip |
Import get_spec_from_list() from master
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-contact-widget.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c index 4377390ee..2081db663 100644 --- a/libempathy-gtk/empathy-contact-widget.c +++ b/libempathy-gtk/empathy-contact-widget.c @@ -279,6 +279,23 @@ contact_info_field_spec_cmp (TpContactInfoFieldSpec *spec1, return contact_info_field_name_cmp (spec1->name, spec2->name); } +static TpContactInfoFieldSpec * +get_spec_from_list (GList *list, + const gchar *name) +{ + GList *l; + + for (l = list; l != NULL; l = g_list_next (l)) + { + TpContactInfoFieldSpec *spec = l->data; + + if (!tp_strdiff (spec->name, name)) + return spec; + } + + return NULL; +} + static guint contact_widget_details_update_edit (EmpathyContactWidget *information) { |