[evolution/account-mgmt: 27/51] Adapt modules/startup-wizard to the new ESource API.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/account-mgmt: 27/51] Adapt modules/startup-wizard to the new ESource API.
- Date: Wed, 7 Mar 2012 19:12:35 +0000 (UTC)
commit fcd443a187f903314bb1a323af9733575c0bd521
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 | 29 +++++++++++++++------
1 files changed, 21 insertions(+), 8 deletions(-)
---
diff --git a/modules/startup-wizard/evolution-startup-wizard.c b/modules/startup-wizard/evolution-startup-wizard.c
index 7dd1c67..bfba518 100644
--- a/modules/startup-wizard/evolution-startup-wizard.c
+++ b/modules/startup-wizard/evolution-startup-wizard.c
@@ -22,14 +22,13 @@
#include <glib/gi18n-lib.h>
#include <libebackend/e-extension.h>
+#include <libedataserver/e-source-mail-account.h>
#include <shell/e-shell.h>
#include <libevolution-utils/e-alert-dialog.h>
#include <e-util/e-import.h>
-#include <libemail-utils/e-account-utils.h>
-
#include <mail/e-mail-backend.h>
#include <mail/em-account-editor.h>
@@ -450,6 +449,7 @@ startup_wizard_new_assistant (EStartupWizard *extension)
EShell *shell;
EShellBackend *shell_backend;
EMailBackend *backend;
+ EMailSession *session;
EMAccountEditor *emae;
EConfig *config;
EConfigItem *config_item;
@@ -460,9 +460,10 @@ startup_wizard_new_assistant (EStartupWizard *extension)
shell_backend = e_shell_get_backend_by_name (shell, "mail");
backend = E_MAIL_BACKEND (shell_backend);
+ session = e_mail_backend_get_session (backend);
emae = em_account_editor_new (
- NULL, EMAE_ASSISTANT, backend,
+ NULL, EMAE_ASSISTANT, session,
"org.gnome.evolution.mail.config.accountWizard");
config = E_CONFIG (emae->config);
@@ -546,9 +547,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. */
@@ -557,8 +561,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)
@@ -577,9 +586,13 @@ startup_wizard_run (EStartupWizard *extension)
gtk_main ();
- if (e_list_length (E_LIST (account_list)) <= 0)
- exit (0);
+ 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)
+ exit(0);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]