aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-11-30 02:48:58 +0800
committerMilan Crha <mcrha@redhat.com>2010-11-30 02:48:58 +0800
commita3705d79b037fa61a94d0863174e2688d7bdc229 (patch)
tree1d2148398ae4b69f72c71a9d84de36d2e09b7580
parent3047dcb784b70adc4a00af644278bf680229462f (diff)
downloadgsoc2013-evolution-a3705d79b037fa61a94d0863174e2688d7bdc229.tar
gsoc2013-evolution-a3705d79b037fa61a94d0863174e2688d7bdc229.tar.gz
gsoc2013-evolution-a3705d79b037fa61a94d0863174e2688d7bdc229.tar.bz2
gsoc2013-evolution-a3705d79b037fa61a94d0863174e2688d7bdc229.tar.lz
gsoc2013-evolution-a3705d79b037fa61a94d0863174e2688d7bdc229.tar.xz
gsoc2013-evolution-a3705d79b037fa61a94d0863174e2688d7bdc229.tar.zst
gsoc2013-evolution-a3705d79b037fa61a94d0863174e2688d7bdc229.zip
Bug #633949 - Add an option to disable new e-mail check at startup
-rw-r--r--mail/evolution-mail.schemas.in15
-rw-r--r--mail/mail-config.ui71
-rw-r--r--mail/mail-send-recv.c8
-rw-r--r--modules/mail/e-mail-shell-settings.c4
-rw-r--r--modules/mail/em-mailer-prefs.c7
5 files changed, 102 insertions, 3 deletions
diff --git a/mail/evolution-mail.schemas.in b/mail/evolution-mail.schemas.in
index 695f9c9632..4493c22f09 100644
--- a/mail/evolution-mail.schemas.in
+++ b/mail/evolution-mail.schemas.in
@@ -1556,6 +1556,21 @@
</schema>
<schema>
+ <key>/schemas/apps/evolution/mail/send_recv_on_start</key>
+ <applyto>/apps/evolution/mail/send_recv_on_start</applyto>
+ <owner>evolution-mail</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>Check for new messages on start</short>
+ <long>
+ Whether check for new messages when Evolution is started.
+ This includes also sending messages from Outbox.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
<key>/schemas/apps/evolution/mail/send_recv_height</key>
<applyto>/apps/evolution/mail/send_recv_height</applyto>
<owner>evolution-mail</owner>
diff --git a/mail/mail-config.ui b/mail/mail-config.ui
index 7252206a56..8677b95f15 100644
--- a/mail/mail-config.ui
+++ b/mail/mail-config.ui
@@ -2416,6 +2416,73 @@ For example: "Work" or "Personal"</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
+ <object class="GtkVBox" id="start-up-section">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="start-up-header">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Start up</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="start-up-alignment">
+ <property name="visible">True</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkVBox" id="start-up-vbox">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkHBox" id="start-up-hbox1">
+ <property name="visible">True</property>
+ <property name="spacing">4</property>
+ <child>
+ <object class="GtkCheckButton" id="chkCheckMailOnStart">
+ <property name="label" translatable="yes">Check for new _messages on start</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="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkVBox" id="message-display-section">
<property name="visible">True</property>
<property name="orientation">vertical</property>
@@ -2652,7 +2719,7 @@ For example: "Work" or "Personal"</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">0</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
@@ -2749,7 +2816,7 @@ For example: "Work" or "Personal"</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index cdcce0455d..deb38eb24a 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -1252,7 +1252,13 @@ mail_autoreceive_init (EMailBackend *backend)
shell_backend = E_SHELL_BACKEND (backend);
shell = e_shell_backend_get_shell (shell_backend);
- auto_online (shell);
+ if (e_shell_settings_get_boolean (e_shell_get_shell_settings (shell), "mail-check-on-start")) {
+ auto_online (shell);
+
+ /* also flush outbox on start */
+ if (e_shell_get_online (shell))
+ mail_send (session);
+ }
g_signal_connect (
shell, "notify::online",
diff --git a/modules/mail/e-mail-shell-settings.c b/modules/mail/e-mail-shell-settings.c
index 3e55a98aa8..d6e9aabbba 100644
--- a/modules/mail/e-mail-shell-settings.c
+++ b/modules/mail/e-mail-shell-settings.c
@@ -109,6 +109,10 @@ e_mail_shell_settings_init (EShellBackend *shell_backend)
"/apps/evolution/mail/junk/check_incoming");
e_shell_settings_install_property_for_key (
+ "mail-check-on-start",
+ "/apps/evolution/mail/send_recv_on_start");
+
+ e_shell_settings_install_property_for_key (
"mail-citation-color",
"/apps/evolution/mail/display/citation_colour");
diff --git a/modules/mail/em-mailer-prefs.c b/modules/mail/em-mailer-prefs.c
index b03ac60b0c..cae9251158 100644
--- a/modules/mail/em-mailer-prefs.c
+++ b/modules/mail/em-mailer-prefs.c
@@ -832,6 +832,13 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
/* General tab */
+ widget = e_builder_get_widget (prefs->builder, "chkCheckMailOnStart");
+ g_object_bind_property (
+ shell_settings, "mail-check-on-start",
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
+
/* Message Display */
widget = e_builder_get_widget (prefs->builder, "view-check");