diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2010-05-10 18:36:28 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2010-05-26 17:17:47 +0800 |
commit | b8ff75d21c1be60e6df472a35599a9e22046a92b (patch) | |
tree | fcaa7453e65ac310e4a3c0f854bcb8b588722863 /libempathy-gtk/empathy-contact-list-view.c | |
parent | 696bd076bbd431aad122c66cadfb6ec3f5ff1762 (diff) | |
download | gsoc2013-empathy-b8ff75d21c1be60e6df472a35599a9e22046a92b.tar gsoc2013-empathy-b8ff75d21c1be60e6df472a35599a9e22046a92b.tar.gz gsoc2013-empathy-b8ff75d21c1be60e6df472a35599a9e22046a92b.tar.bz2 gsoc2013-empathy-b8ff75d21c1be60e6df472a35599a9e22046a92b.tar.lz gsoc2013-empathy-b8ff75d21c1be60e6df472a35599a9e22046a92b.tar.xz gsoc2013-empathy-b8ff75d21c1be60e6df472a35599a9e22046a92b.tar.zst gsoc2013-empathy-b8ff75d21c1be60e6df472a35599a9e22046a92b.zip |
Port to new EmpathyTpContactFactory API
Diffstat (limited to 'libempathy-gtk/empathy-contact-list-view.c')
-rw-r--r-- | libempathy-gtk/empathy-contact-list-view.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c index ae84e3e15..ca49daec0 100644 --- a/libempathy-gtk/empathy-contact-list-view.c +++ b/libempathy-gtk/empathy-contact-list-view.c @@ -219,7 +219,7 @@ contact_list_view_dnd_get_contact_free (DndGetContactData *data) } static void -contact_list_view_drag_got_contact (EmpathyTpContactFactory *factory, +contact_list_view_drag_got_contact (TpConnection *connection, EmpathyContact *contact, const GError *error, gpointer user_data, @@ -293,7 +293,7 @@ contact_list_view_contact_drag_received (GtkWidget *view, { EmpathyContactListViewPriv *priv; TpAccountManager *account_manager; - EmpathyTpContactFactory *factory = NULL; + TpConnection *connection; TpAccount *account; DndGetContactData *data; GtkTreePath *source_path; @@ -342,20 +342,15 @@ contact_list_view_contact_drag_received (GtkWidget *view, account = tp_account_manager_ensure_account (account_manager, account_id); } if (account) { - TpConnection *connection; - connection = tp_account_get_connection (account); - if (connection) { - factory = empathy_tp_contact_factory_dup_singleton (connection); - } } - g_object_unref (account_manager); - if (!factory) { - DEBUG ("Failed to get factory for account '%s'", account_id); + if (!connection) { + DEBUG ("Failed to get connection for account '%s'", account_id); success = FALSE; g_free (new_group); g_free (old_group); + g_object_unref (account_manager); return FALSE; } @@ -366,12 +361,12 @@ contact_list_view_contact_drag_received (GtkWidget *view, /* FIXME: We should probably wait for the cb before calling * gtk_drag_finish */ - empathy_tp_contact_factory_get_from_id (factory, contact_id, + empathy_tp_contact_factory_get_from_id (connection, contact_id, contact_list_view_drag_got_contact, data, (GDestroyNotify) contact_list_view_dnd_get_contact_free, G_OBJECT (view)); g_strfreev (strv); - g_object_unref (factory); + g_object_unref (account_manager); return TRUE; } |