[empathy: 5/8] Simplify empathy_accounts_import



commit 7210d151056d3c0a1b0469f7af1aee06b7805538
Author: Sjoerd Simons <sjoerd simons collabora co uk>
Date:   Mon Mar 1 19:01:54 2010 +0000

    Simplify empathy_accounts_import

 src/empathy-accounts-common.c |   25 ++++++-------------------
 src/empathy-accounts-common.h |    2 +-
 2 files changed, 7 insertions(+), 20 deletions(-)
---
diff --git a/src/empathy-accounts-common.c b/src/empathy-accounts-common.c
index ff9c8c4..3032e06 100644
--- a/src/empathy-accounts-common.c
+++ b/src/empathy-accounts-common.c
@@ -71,29 +71,16 @@ empathy_accounts_has_non_salut_accounts (TpAccountManager *manager)
   return ret;
 }
 
-/* Try to import accounts from MC4 and returns TRUE if we should display the
- * accounts assistant. */
-gboolean
+void
 empathy_accounts_import (TpAccountManager *account_mgr,
     EmpathyConnectionManagers *cm_mgr)
 {
-  g_return_val_if_fail (tp_account_manager_is_prepared (account_mgr,
-      TP_ACCOUNT_MANAGER_FEATURE_CORE), FALSE);
-  g_return_val_if_fail (empathy_connection_managers_is_ready (cm_mgr), FALSE);
-
-  if (empathy_import_mc4_has_imported ())
-    return FALSE;
-
-  if (empathy_import_mc4_accounts (cm_mgr))
-    return FALSE;
-
-  if (empathy_accounts_has_non_salut_accounts (account_mgr))
-    return FALSE;
-
-  if (!should_create_salut_account (account_mgr))
-    return FALSE;
+  g_return_if_fail (tp_account_manager_is_prepared (account_mgr,
+      TP_ACCOUNT_MANAGER_FEATURE_CORE));
+  g_return_if_fail (empathy_connection_managers_is_ready (cm_mgr));
 
-  return TRUE;
+  if (!empathy_import_mc4_has_imported ())
+    empathy_import_mc4_accounts (cm_mgr);
 }
 
 static void
diff --git a/src/empathy-accounts-common.h b/src/empathy-accounts-common.h
index c8e5c65..2bd51bf 100644
--- a/src/empathy-accounts-common.h
+++ b/src/empathy-accounts-common.h
@@ -28,7 +28,7 @@ void empathy_accounts_show_accounts_ui (TpAccountManager *manager,
     TpAccount *account,
     GCallback window_destroyed_cb);
 
-gboolean empathy_accounts_import (TpAccountManager *account_mgr,
+void empathy_accounts_import (TpAccountManager *account_mgr,
     EmpathyConnectionManagers *cm_mgr);
 
 



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