[empathy/mc5] Enable newly created accounts



commit 1d0f90da95786ef6143460ed7234156ec9c46936
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Aug 6 19:19:56 2009 +0200

    Enable newly created accounts

 src/empathy-account-assistant.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/empathy-account-assistant.c b/src/empathy-account-assistant.c
index 5bcd602..9291cd3 100644
--- a/src/empathy-account-assistant.c
+++ b/src/empathy-account-assistant.c
@@ -191,15 +191,21 @@ account_assistant_apply_account_cb (GObject *source,
 {
   GError *error = NULL;
   EmpathyAccountAssistant *self = user_data;
+  EmpathyAccountSettings *settings = EMPATHY_ACCOUNT_SETTINGS (source);
+  EmpathyAccount *account;
 
-  empathy_account_settings_apply_finish (EMPATHY_ACCOUNT_SETTINGS (source),
-      result, &error);
+  empathy_account_settings_apply_finish (settings, result, &error);
 
   if (error != NULL)
     {
       account_assistant_present_error_page (self, error, PAGE_ENTER_CREATE);
       g_error_free (error);
+      return;
     }
+
+  /* enable the newly created account */
+  account = empathy_account_settings_get_account (settings);
+  empathy_account_set_enabled (account, TRUE);
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]