[evolution/account-mgmt: 26/49] Adapt modules/startup-wizard to the new ESource API.



commit deecd87a2526be79e9716fb63c9f1abf5d92b65f
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon Apr 25 15:18:41 2011 -0400

    Adapt modules/startup-wizard to the new ESource API.

 modules/startup-wizard/evolution-startup-wizard.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/modules/startup-wizard/evolution-startup-wizard.c b/modules/startup-wizard/evolution-startup-wizard.c
index de15b72..8d99bdd 100644
--- a/modules/startup-wizard/evolution-startup-wizard.c
+++ b/modules/startup-wizard/evolution-startup-wizard.c
@@ -22,9 +22,9 @@
 
 #include <glib/gi18n-lib.h>
 #include <libebackend/e-extension.h>
+#include <libedataserver/e-source-mail-account.h>
 
 #include <shell/e-shell.h>
-#include <e-util/e-account-utils.h>
 #include <e-util/e-alert-dialog.h>
 #include <e-util/e-import.h>
 
@@ -529,9 +529,12 @@ startup_wizard_run (EStartupWizard *extension)
 {
 	EShell *shell;
 	GtkWidget *window;
-	EAccountList *account_list;
+	ESourceRegistry *registry;
+	const gchar *extension_name;
 	const gchar *startup_view;
 	gboolean express_mode;
+	gboolean have_account;
+	GList *list;
 
 	/* Accounts should now be loaded if there were any to load.
 	 * Check, and proceed with the Evolution Setup Assistant. */
@@ -540,8 +543,13 @@ startup_wizard_run (EStartupWizard *extension)
 	express_mode = e_shell_get_express_mode (shell);
 	startup_view = e_shell_get_startup_view (shell);
 
-	account_list = e_get_account_list ();
-	if (e_list_length (E_LIST (account_list)) > 0)
+	registry = e_shell_get_registry (shell);
+	extension_name = E_SOURCE_EXTENSION_MAIL_ACCOUNT;
+	list = e_source_registry_list_sources (registry, extension_name);
+	have_account = (list != NULL);
+	g_list_free (list);
+
+	if (have_account)
 		return;
 
 	if (express_mode && g_strcmp0 (startup_view, "mail") != 0)



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