[empathy] contact_widget_details_update_edit: no need to call tp_contact_get_contact_info() each iteration
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] contact_widget_details_update_edit: no need to call tp_contact_get_contact_info() each iteration
- Date: Wed, 29 Sep 2010 09:02:25 +0000 (UTC)
commit 795168da0bd6ef574206a2346038126b721a0eb9
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Fri Sep 24 10:31:14 2010 +0200
contact_widget_details_update_edit: no need to call tp_contact_get_contact_info() each iteration
libempathy-gtk/empathy-contact-widget.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c
index 15dda50..4bd1366 100644
--- a/libempathy-gtk/empathy-contact-widget.c
+++ b/libempathy-gtk/empathy-contact-widget.c
@@ -277,11 +277,13 @@ contact_widget_details_update_edit (EmpathyContactWidget *information)
TpConnection *connection;
GList *specs, *l;
guint n_rows = 0;
+ GList *info;
g_assert (information->details_to_set == NULL);
contact = empathy_contact_get_tp_contact (information->contact);
connection = tp_contact_get_connection (contact);
+ info = tp_contact_get_contact_info (contact);
specs = tp_connection_get_contact_info_supported_fields (connection);
specs = g_list_sort (specs, (GCompareFunc) contact_info_field_spec_cmp);
@@ -290,7 +292,7 @@ contact_widget_details_update_edit (EmpathyContactWidget *information)
TpContactInfoFieldSpec *spec = l->data;
TpContactInfoField *field;
InfoFieldData *field_data;
- GList *info, *ll;
+ GList *ll;
GStrv value = NULL;
GtkWidget *w;
@@ -302,7 +304,6 @@ contact_widget_details_update_edit (EmpathyContactWidget *information)
}
/* Search initial value */
- info = tp_contact_get_contact_info (contact);
for (ll = info; ll != NULL; ll = ll->next)
{
field = ll->data;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]