aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2014-06-02 20:36:00 +0800
committerMilan Crha <mcrha@redhat.com>2014-06-02 20:36:00 +0800
commit2f73b39bf2999fa0316e776a0d7a3967e69c8ec6 (patch)
tree12f9628dfb6ba7807393a6ff762d08de84dd692c
parentd2127ba0d3dfd01f660e998026cf17576051af99 (diff)
downloadgsoc2013-evolution-2f73b39bf2999fa0316e776a0d7a3967e69c8ec6.tar
gsoc2013-evolution-2f73b39bf2999fa0316e776a0d7a3967e69c8ec6.tar.gz
gsoc2013-evolution-2f73b39bf2999fa0316e776a0d7a3967e69c8ec6.tar.bz2
gsoc2013-evolution-2f73b39bf2999fa0316e776a0d7a3967e69c8ec6.tar.lz
gsoc2013-evolution-2f73b39bf2999fa0316e776a0d7a3967e69c8ec6.tar.xz
gsoc2013-evolution-2f73b39bf2999fa0316e776a0d7a3967e69c8ec6.tar.zst
gsoc2013-evolution-2f73b39bf2999fa0316e776a0d7a3967e69c8ec6.zip
Add "Send messages through Outbox folder" option
Users ask from time to time for the old behaviour when the messages used to be saved through Outbox, rather than the composer being opened all the time the message is sending. The change is pretty simple, thus why not to add it. Note the Outbox is not flushed after sending, the users is responsible to invoke the Outbox flush on his/her own. This also allows a user to postpone the message send for later.
-rw-r--r--data/org.gnome.evolution.mail.gschema.xml.in5
-rw-r--r--mail/em-composer-utils.c10
-rw-r--r--mail/mail-config.ui18
-rw-r--r--modules/mail/em-composer-prefs.c6
4 files changed, 38 insertions, 1 deletions
diff --git a/data/org.gnome.evolution.mail.gschema.xml.in b/data/org.gnome.evolution.mail.gschema.xml.in
index d026ec931b..e42de28fa4 100644
--- a/data/org.gnome.evolution.mail.gschema.xml.in
+++ b/data/org.gnome.evolution.mail.gschema.xml.in
@@ -140,6 +140,11 @@
<_summary>Encode filenames in an Outlook/GMail way</_summary>
<_description>Encode filenames in the mail headers same as Outlook or GMail do, to let them display correctly filenames with UTF-8 letters sent by Evolution, because they do not follow the RFC 2231, but use the incorrect RFC 2047 standard.</_description>
</key>
+ <key name="composer-use-outbox" type="b">
+ <default>false</default>
+ <_summary>Send messages through Outbox folder</_summary>
+ <_description>Always save messages to Outbox folder when sending, to let a user choose when the messages should be sent.</_description>
+ </key>
<key name="composer-top-signature" type="b">
<default>false</default>
<_summary>Put personalized signatures at the top of replies</_summary>
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 26efe96d50..22cc594273 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -601,6 +601,16 @@ em_utils_composer_send_cb (EMsgComposer *composer,
{
AsyncContext *async_context;
GCancellable *cancellable;
+ GSettings *settings;
+
+ settings = g_settings_new ("org.gnome.evolution.mail");
+ if (g_settings_get_boolean (settings, "composer-use-outbox")) {
+ e_msg_composer_save_to_outbox (composer);
+ g_object_unref (settings);
+ return;
+ }
+
+ g_object_unref (settings);
if (!camel_session_get_online (CAMEL_SESSION (session))) {
e_alert_run_dialog_for_args (
diff --git a/mail/mail-config.ui b/mail/mail-config.ui
index a4769fe02d..4ba1964860 100644
--- a/mail/mail-config.ui
+++ b/mail/mail-config.ui
@@ -278,6 +278,22 @@
</packing>
</child>
<child>
+ <object class="GtkCheckButton" id="chkUseOutbox">
+ <property name="label" translatable="yes">Send messages through Outbo_x folder</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0.5</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkHBox" id="hboxComposerCharset">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -304,7 +320,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">4</property>
+ <property name="position">5</property>
</packing>
</child>
</object>
diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c
index d7ddf2a3ad..8ef21c49a3 100644
--- a/modules/mail/em-composer-prefs.c
+++ b/modules/mail/em-composer-prefs.c
@@ -1135,6 +1135,12 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
widget, "active",
G_SETTINGS_BIND_DEFAULT);
+ widget = e_builder_get_widget (prefs->builder, "chkUseOutbox");
+ g_settings_bind (
+ settings, "composer-use-outbox",
+ widget, "active",
+ G_SETTINGS_BIND_DEFAULT);
+
widget = e_builder_get_widget (prefs->builder, "chkIgnoreListReplyTo");
g_settings_bind (
settings, "composer-ignore-list-reply-to",