]> git.0d.be Git - empathy.git/commitdiff
accounts-dialog: no more need to manually prepare TpAccount
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 24 Jan 2012 10:56:39 +0000 (11:56 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 24 Jan 2012 12:24:59 +0000 (13:24 +0100)
The factory does it for us now.

https://bugzilla.gnome.org/show_bug.cgi?id=668372

src/empathy-accounts-dialog.c

index 0e33de2a64d17773705d8ab67f0a798b0f8ad9dc..c79ac407808f50f4d687268828e4fa0d41d04e5b 100644 (file)
@@ -1979,32 +1979,13 @@ accounts_dialog_add_account (EmpathyAccountsDialog *dialog,
   g_object_unref (settings);
 }
 
-static void
-account_prepare_cb (GObject *source_object,
-    GAsyncResult *result,
-    gpointer user_data)
-{
-  EmpathyAccountsDialog *dialog = EMPATHY_ACCOUNTS_DIALOG (user_data);
-  TpAccount *account = TP_ACCOUNT (source_object);
-  GError *error = NULL;
-
-  if (!tp_proxy_prepare_finish (account, result, &error))
-    {
-      DEBUG ("Failed to prepare account: %s", error->message);
-      g_error_free (error);
-      return;
-    }
-
-  accounts_dialog_add_account (dialog, account);
-}
-
 static void
 accounts_dialog_account_validity_changed_cb (TpAccountManager *manager,
     TpAccount *account,
     gboolean valid,
     EmpathyAccountsDialog *dialog)
 {
-  tp_proxy_prepare_async (account, NULL, account_prepare_cb, dialog);
+  accounts_dialog_add_account (dialog, account);
 }
 
 static void