aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy-gtk/empathy-account-widget.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index f69f041f1..a5b5b7926 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -652,21 +652,14 @@ account_widget_account_enabled_cb (GObject *source_object,
{
GError *error = NULL;
TpAccount *account = TP_ACCOUNT (source_object);
- EmpathyAccountWidget *widget = EMPATHY_ACCOUNT_WIDGET (user_data);
- EmpathyAccountWidgetPriv *priv = GET_PRIV (widget);
tp_account_set_enabled_finish (account, res, &error);
if (error != NULL)
{
- DEBUG ("Could not automatically enable new account: %s", error->message);
+ DEBUG ("Could not enable the account: %s", error->message);
g_error_free (error);
}
- else
- {
- priv->account_created = TRUE;
- g_signal_emit (widget, signals[ACCOUNT_CREATED], 0);
- }
}
static void
@@ -697,7 +690,9 @@ account_widget_applied_cb (GObject *source_object,
{
/* By default, when an account is created, we enable it. */
tp_account_set_enabled_async (account, TRUE,
- account_widget_account_enabled_cb, widget);
+ account_widget_account_enabled_cb, NULL);
+ priv->account_created = TRUE;
+ g_signal_emit (widget, signals[ACCOUNT_CREATED], 0);
}
else if (priv->enabled_checkbox != NULL)
{