aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-account-widget.c
diff options
context:
space:
mode:
authorFelix Kaser <f.kaser@gmx.net>2009-11-25 01:13:17 +0800
committerFelix Kaser <f.kaser@gmx.net>2009-12-02 00:18:55 +0800
commit53a0fc1ae74070e6268173294ba986bc2c7e3e07 (patch)
tree9cc3e8ccc26d5561393d2e82f0b8d614950a18ec /libempathy-gtk/empathy-account-widget.c
parent5d472d0d977e00de90039af2e67a785721da5d51 (diff)
downloadgsoc2013-empathy-53a0fc1ae74070e6268173294ba986bc2c7e3e07.tar
gsoc2013-empathy-53a0fc1ae74070e6268173294ba986bc2c7e3e07.tar.gz
gsoc2013-empathy-53a0fc1ae74070e6268173294ba986bc2c7e3e07.tar.bz2
gsoc2013-empathy-53a0fc1ae74070e6268173294ba986bc2c7e3e07.tar.lz
gsoc2013-empathy-53a0fc1ae74070e6268173294ba986bc2c7e3e07.tar.xz
gsoc2013-empathy-53a0fc1ae74070e6268173294ba986bc2c7e3e07.tar.zst
gsoc2013-empathy-53a0fc1ae74070e6268173294ba986bc2c7e3e07.zip
emit account-created signal outside enabled_cb
the account-created signal should be emitted independently from enabled-callback. the signal should be emitted even if for some reason the account could not be enabled.
Diffstat (limited to 'libempathy-gtk/empathy-account-widget.c')
-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)
{