[evolution/account-mgmt: 27/50] 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/50] Adapt modules/startup-wizard to the new ESource API.
- Date: Sat, 21 Jan 2012 16:14:03 +0000 (UTC)
commit ab82894ca83cba4cc81c6d5e97267b0dd51e93f5
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 | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/modules/startup-wizard/evolution-startup-wizard.c b/modules/startup-wizard/evolution-startup-wizard.c
index 2edeb1c..c361048 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 <e-util/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>
@@ -436,6 +435,7 @@ startup_wizard_new_assistant (EStartupWizard *extension)
EShell *shell;
EShellBackend *shell_backend;
EMailBackend *backend;
+ EMailSession *session;
EMAccountEditor *emae;
EConfig *config;
EConfigItem *config_item;
@@ -446,9 +446,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);
@@ -533,9 +534,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. */
@@ -544,8 +548,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]