aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/mail/Makefile.am7
-rw-r--r--modules/mail/e-mail-shell-backend.c71
-rw-r--r--modules/mail/em-account-prefs.c2
-rw-r--r--modules/startup-wizard/Makefile.am11
-rw-r--r--modules/startup-wizard/evolution-startup-wizard.c11
5 files changed, 63 insertions, 39 deletions
diff --git a/modules/mail/Makefile.am b/modules/mail/Makefile.am
index 25b5b15ef4..7d7f298b6c 100644
--- a/modules/mail/Makefile.am
+++ b/modules/mail/Makefile.am
@@ -49,6 +49,11 @@ module_mail_la_SOURCES = \
em-network-prefs.c \
em-network-prefs.h
+if WITH_CAPPLET
+libevolution_mail_settings_la = \
+ $(top_builddir)/capplet/settings/libevolution-mail-settings.la
+endif
+
module_mail_la_LIBADD = \
$(top_builddir)/libemail-utils/libemail-utils.la \
$(top_builddir)/libemail-engine/libemail-engine.la \
@@ -66,8 +71,8 @@ module_mail_la_LIBADD = \
$(top_builddir)/em-format/libemformat.la \
$(top_builddir)/widgets/menus/libmenus.la \
$(top_builddir)/filter/libfilter.la \
- $(top_builddir)/capplet/settings/libevolution-mail-settings.la \
$(top_builddir)/libevolution-utils/libevolution-utils.la \
+ $(libevolution_mail_settings_la) \
$(EVOLUTION_DATA_SERVER_LIBS) \
$(GNOME_PLATFORM_LIBS) \
$(GTKHTML_LIBS)
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index 10392198f0..ab85d4e6d4 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -33,7 +33,9 @@
#include <shell/e-shell.h>
#include <shell/e-shell-window.h>
+#ifdef WITH_CAPPLET
#include <capplet/settings/mail-capplet-shell.h>
+#endif
#include <composer/e-msg-composer.h>
@@ -698,6 +700,8 @@ void
e_mail_shell_backend_new_account (EMailShellBackend *mail_shell_backend,
GtkWindow *parent)
{
+ EShell *shell;
+ EShellBackend *shell_backend;
EMailShellBackendPrivate *priv;
g_return_if_fail (mail_shell_backend != NULL);
@@ -705,41 +709,46 @@ e_mail_shell_backend_new_account (EMailShellBackend *mail_shell_backend,
priv = mail_shell_backend->priv;
- if (priv->assistant) {
+ if (priv->assistant != NULL) {
gtk_window_present (GTK_WINDOW (priv->assistant));
- } else {
- EMAccountEditor *emae;
- EShell *shell;
+ return;
+ }
- shell = e_shell_backend_get_shell (E_SHELL_BACKEND (mail_shell_backend));
-
- if (!e_shell_get_express_mode (shell)) {
- /** @HookPoint-EMConfig: New Mail Account Assistant
- * @Id: org.gnome.evolution.mail.config.accountAssistant
- * @Type: E_CONFIG_ASSISTANT
- * @Class: org.gnome.evolution.mail.config:1.0
- * @Target: EMConfigTargetAccount
- *
- * The new mail account assistant.
- */
- emae = em_account_editor_new (
- NULL, EMAE_ASSISTANT, E_MAIL_BACKEND (mail_shell_backend),
- "org.gnome.evolution.mail.config.accountAssistant");
- e_config_create_window (
- E_CONFIG (emae->config), NULL,
- _("Evolution Account Assistant"));
- priv->assistant = E_CONFIG (emae->config)->window;
- g_object_set_data_full (
- G_OBJECT (priv->assistant), "AccountEditor",
- emae, (GDestroyNotify) g_object_unref);
- } else {
- priv->assistant = mail_capplet_shell_new (0, TRUE, FALSE);
- }
+ shell_backend = E_SHELL_BACKEND (mail_shell_backend);
+ shell = e_shell_backend_get_shell (shell_backend);
+
+#ifdef WITH_CAPPLET
+ if (e_shell_get_express_mode (shell))
+ priv->assistant = mail_capplet_shell_new (0, TRUE, FALSE);
+#endif /* WITH_CAPPLET */
- g_object_add_weak_pointer (G_OBJECT (priv->assistant), &priv->assistant);
- gtk_window_set_transient_for (GTK_WINDOW (priv->assistant), parent);
- gtk_widget_show (priv->assistant);
+ if (priv->assistant == NULL) {
+ EMAccountEditor *emae;
+
+ /** @HookPoint-EMConfig: New Mail Account Assistant
+ * @Id: org.gnome.evolution.mail.config.accountAssistant
+ * @Type: E_CONFIG_ASSISTANT
+ * @Class: org.gnome.evolution.mail.config:1.0
+ * @Target: EMConfigTargetAccount
+ *
+ * The new mail account assistant.
+ */
+ emae = em_account_editor_new (
+ NULL, EMAE_ASSISTANT, E_MAIL_BACKEND (mail_shell_backend),
+ "org.gnome.evolution.mail.config.accountAssistant");
+ e_config_create_window (
+ E_CONFIG (emae->config), NULL,
+ _("Evolution Account Assistant"));
+ priv->assistant = E_CONFIG (emae->config)->window;
+ g_object_set_data_full (
+ G_OBJECT (priv->assistant), "AccountEditor",
+ emae, (GDestroyNotify) g_object_unref);
}
+
+ g_object_add_weak_pointer (
+ G_OBJECT (priv->assistant), &priv->assistant);
+ gtk_window_set_transient_for (GTK_WINDOW (priv->assistant), parent);
+ gtk_widget_show (priv->assistant);
}
void
diff --git a/modules/mail/em-account-prefs.c b/modules/mail/em-account-prefs.c
index 1e492bebd6..95a9f30569 100644
--- a/modules/mail/em-account-prefs.c
+++ b/modules/mail/em-account-prefs.c
@@ -40,8 +40,6 @@
#include <libemail-utils/e-account-utils.h>
-#include <capplet/settings/mail-capplet-shell.h>
-
#include <mail/e-mail-backend.h>
#include <mail/e-mail-ui-session.h>
#include <mail/em-config.h>
diff --git a/modules/startup-wizard/Makefile.am b/modules/startup-wizard/Makefile.am
index 1401abae2f..ce86f1c9da 100644
--- a/modules/startup-wizard/Makefile.am
+++ b/modules/startup-wizard/Makefile.am
@@ -11,6 +11,11 @@ module_startup_wizard_la_CPPFLAGS = \
module_startup_wizard_la_SOURCES = \
evolution-startup-wizard.c
+if WITH_CAPPLET
+libevolution_mail_settings_la = \
+ $(top_builddir)/capplet/settings/libevolution-mail-settings.la
+endif
+
module_startup_wizard_la_LIBADD = \
$(top_builddir)/e-util/libeutil.la \
$(top_builddir)/shell/libeshell.la \
@@ -18,9 +23,9 @@ module_startup_wizard_la_LIBADD = \
$(top_builddir)/widgets/misc/libemiscwidgets.la \
$(top_builddir)/calendar/gui/libevolution-calendar.la \
$(top_builddir)/mail/libevolution-mail.la \
- $(top_builddir)/capplet/settings/libevolution-mail-settings.la \
- $(top_builddir)/libemail-engine/libemail-engine.la \
- $(top_builddir)/libemail-utils/libemail-utils.la \
+ $(top_builddir)/libemail-engine/libemail-engine.la \
+ $(top_builddir)/libemail-utils/libemail-utils.la \
+ $(libevolution_mail_settings_la) \
$(EVOLUTION_DATA_SERVER_LIBS) \
$(GNOME_PLATFORM_LIBS)
diff --git a/modules/startup-wizard/evolution-startup-wizard.c b/modules/startup-wizard/evolution-startup-wizard.c
index 7dd1c679e8..92d62f52f8 100644
--- a/modules/startup-wizard/evolution-startup-wizard.c
+++ b/modules/startup-wizard/evolution-startup-wizard.c
@@ -33,7 +33,9 @@
#include <mail/e-mail-backend.h>
#include <mail/em-account-editor.h>
+#ifdef WITH_CAPPLET
#include <capplet/settings/mail-capplet-shell.h>
+#endif
#include <calendar/gui/calendar-config.h>
@@ -527,6 +529,7 @@ startup_wizard_new_assistant (EStartupWizard *extension)
return config->window;
}
+#ifdef WITH_CAPPLET
static GtkWidget *
startup_wizard_new_capplet (EStartupWizard *extension)
{
@@ -540,12 +543,13 @@ startup_wizard_new_capplet (EStartupWizard *extension)
return capplet;
}
+#endif /* WITH_CAPPLET */
static void
startup_wizard_run (EStartupWizard *extension)
{
EShell *shell;
- GtkWidget *window;
+ GtkWidget *window = NULL;
EAccountList *account_list;
const gchar *startup_view;
gboolean express_mode;
@@ -564,9 +568,12 @@ startup_wizard_run (EStartupWizard *extension)
if (express_mode && g_strcmp0 (startup_view, "mail") != 0)
return;
+#ifdef WITH_CAPPLET
if (express_mode)
window = startup_wizard_new_capplet (extension);
- else {
+#endif /* WITH_CAPPLET */
+
+ if (window == NULL) {
window = startup_wizard_new_assistant (extension);
g_signal_connect (
window, "delete-event",