diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-08-18 20:06:14 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-08-19 15:26:26 +0800 |
commit | c428f8a475111473ea9a9dc246ca1d2312f41d8c (patch) | |
tree | 33b8cc409532221bb4ad53a9fc0a9e40a698ecc6 /libempathy-gtk | |
parent | 8b69b96e01c9b11ac779dcce99c21a1aa7fba7a3 (diff) | |
download | gsoc2013-empathy-c428f8a475111473ea9a9dc246ca1d2312f41d8c.tar gsoc2013-empathy-c428f8a475111473ea9a9dc246ca1d2312f41d8c.tar.gz gsoc2013-empathy-c428f8a475111473ea9a9dc246ca1d2312f41d8c.tar.bz2 gsoc2013-empathy-c428f8a475111473ea9a9dc246ca1d2312f41d8c.tar.lz gsoc2013-empathy-c428f8a475111473ea9a9dc246ca1d2312f41d8c.tar.xz gsoc2013-empathy-c428f8a475111473ea9a9dc246ca1d2312f41d8c.tar.zst gsoc2013-empathy-c428f8a475111473ea9a9dc246ca1d2312f41d8c.zip |
contact-widget: rely on the factory to prepare TP_CONNECTION_FEATURE_CONTACT_INFO
https://bugzilla.gnome.org/show_bug.cgi?id=656831
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-contact-widget.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c index 14042bf61..f73d75d19 100644 --- a/libempathy-gtk/empathy-contact-widget.c +++ b/libempathy-gtk/empathy-contact-widget.c @@ -792,16 +792,14 @@ contact_widget_details_request_cb (GObject *object, } static void -contact_widget_details_feature_prepared_cb (GObject *object, - GAsyncResult *res, - gpointer user_data) +fetch_contact_information (EmpathyContactWidget *information, + TpConnection *connection) { - TpConnection *connection = TP_CONNECTION (object); - EmpathyContactWidget *information = user_data; TpContact *contact; TpContactInfoFlags flags; - if (!tp_proxy_prepare_finish (connection, res, NULL)) + if (!tp_proxy_has_interface_by_id (connection, + TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACT_INFO)) { gtk_widget_hide (information->vbox_details); return; @@ -846,13 +844,11 @@ contact_widget_details_update (EmpathyContactWidget *information) if (tp_contact != NULL) { - GQuark features[] = { TP_CONNECTION_FEATURE_CONTACT_INFO, 0 }; TpConnection *connection; - /* First, make sure the CONTACT_INFO feature is ready on the connection */ connection = tp_contact_get_connection (tp_contact); - tp_proxy_prepare_async (connection, features, - contact_widget_details_feature_prepared_cb, information); + + fetch_contact_information (information, connection); } } |