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.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/libempathy-gtk/empathy-contact-dialogs.c b/libempathy-gtk/empathy-contact-dialogs.c
index 307b0fbb3..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;
}
@@ -398,7 +390,7 @@ empathy_new_contact_dialog_show (GtkWindow *parent)
button,
GTK_RESPONSE_CANCEL);
gtk_widget_show (button);
-
+
/* Add button */
button = gtk_button_new_with_label (GTK_STOCK_ADD);
gtk_button_set_use_stock (GTK_BUTTON (button), TRUE);