aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-05-29 00:36:37 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-05-29 00:50:18 +0800
commit005ac1efa32c7e3a3dc5eb959b69fdee5fb91320 (patch)
treeb7eaca0fc61577360d34e35464465d7232e4b414 /modules/mail
parent2c9f0932e8c2bc100f8ec7335a20fbfecea052a2 (diff)
downloadgsoc2013-evolution-005ac1efa32c7e3a3dc5eb959b69fdee5fb91320.tar
gsoc2013-evolution-005ac1efa32c7e3a3dc5eb959b69fdee5fb91320.tar.gz
gsoc2013-evolution-005ac1efa32c7e3a3dc5eb959b69fdee5fb91320.tar.bz2
gsoc2013-evolution-005ac1efa32c7e3a3dc5eb959b69fdee5fb91320.tar.lz
gsoc2013-evolution-005ac1efa32c7e3a3dc5eb959b69fdee5fb91320.tar.xz
gsoc2013-evolution-005ac1efa32c7e3a3dc5eb959b69fdee5fb91320.tar.zst
gsoc2013-evolution-005ac1efa32c7e3a3dc5eb959b69fdee5fb91320.zip
Make the settings capplet optional.
The evolution-settings capplet was originally designed for Anjal, it was used in MeeGo as part of the Express Mode effort, but doesn't really fit in GNOME 3 nowadays (nor did it really fit in GNOME 2, in my opinion). Add a --with-capplet configure switch defaulting to 'no'. The capplet will eventually be removed unless I see someone actively maintaining it.
Diffstat (limited to 'modules/mail')
-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
3 files changed, 46 insertions, 34 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>