aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-contact-dialogs.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk/empathy-contact-dialogs.c')
-rw-r--r--libempathy-gtk/empathy-contact-dialogs.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/libempathy-gtk/empathy-contact-dialogs.c b/libempathy-gtk/empathy-contact-dialogs.c
index 39edbf579..c1cca3e2b 100644
--- a/libempathy-gtk/empathy-contact-dialogs.c
+++ b/libempathy-gtk/empathy-contact-dialogs.c
@@ -328,26 +328,18 @@ empathy_contact_personal_dialog_show (GtkWindow *parent)
*/
static gboolean
-can_add_contact_to_account (McAccount *account,
+can_add_contact_to_account (EmpathyAccount *account,
gpointer user_data)
{
- EmpathyAccountManager *account_manager;
EmpathyContactManager *contact_manager;
TpConnection *connection;
gboolean result;
- account_manager = empathy_account_manager_dup_singleton ();
- connection = empathy_account_manager_get_connection (account_manager,
- account);
- if (!connection) {
- g_object_unref (account_manager);
- return FALSE;
- }
+ connection = empathy_account_get_connection (account);
contact_manager = empathy_contact_manager_dup_singleton ();
result = empathy_contact_manager_can_add (contact_manager, connection);
g_object_unref (contact_manager);
- g_object_unref (account_manager);
return result;
}