aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2008-05-27 02:11:49 +0800
committerMilan Crha <mcrha@src.gnome.org>2008-05-27 02:11:49 +0800
commitb67d6b02ca832f90e3e1b98bf85f98b68009f25d (patch)
tree2b8191b24a206b080efe2cfec445767a02b82072 /mail/mail-config.c
parentc9d8512b2e3a29263935bef58ae1c01469dee0c4 (diff)
downloadgsoc2013-evolution-b67d6b02ca832f90e3e1b98bf85f98b68009f25d.tar
gsoc2013-evolution-b67d6b02ca832f90e3e1b98bf85f98b68009f25d.tar.gz
gsoc2013-evolution-b67d6b02ca832f90e3e1b98bf85f98b68009f25d.tar.bz2
gsoc2013-evolution-b67d6b02ca832f90e3e1b98bf85f98b68009f25d.tar.lz
gsoc2013-evolution-b67d6b02ca832f90e3e1b98bf85f98b68009f25d.tar.xz
gsoc2013-evolution-b67d6b02ca832f90e3e1b98bf85f98b68009f25d.tar.zst
gsoc2013-evolution-b67d6b02ca832f90e3e1b98bf85f98b68009f25d.zip
** Fix for bug #317755
2008-05-26 Milan Crha <mcrha@redhat.com> ** Fix for bug #317755 * mail-send-recv.c: (refresh_folders_exec): * mail-ops.c: (refresh_folder_desc): Also sync with a server when refreshing folder. * evolution-mail.schemas.in: * mail-config.h: (mail_config_get_sync_timeout): * mail-config.c: (mail_config_get_sync_timeout): Use int value of /apps/evolution/mail/sync_interval where is set how often propagate local changes to server. * mail-component.c: (struct _MailComponentPrivate), (impl_dispose), (mc_sync_store_done), (mc_sync_store), (call_mail_sync), (mail_component_init): Upload local changes to server on some interval. * mail-component.c: (impl_quit): Do not quit until we are done with mail sync. svn path=/trunk/; revision=35552
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r--mail/mail-config.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c
index f966fff0f3..ec89953c05 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -679,6 +679,31 @@ mail_config_get_message_limit (void)
return config->mlimit_size;
}
+/* timeout interval, in seconds, when to call server update */
+gint
+mail_config_get_sync_timeout (void)
+{
+ GConfClient *gconf = mail_config_get_gconf_client ();
+ gint res = 60;
+
+ if (gconf) {
+ GError *error = NULL;
+
+ res = gconf_client_get_int (gconf, "/apps/evolution/mail/sync_interval", &error);
+
+ /* do not allow recheck sooner than every 30 seconds */
+ if (error || res == 0)
+ res = 60;
+ else if (res < 30)
+ res = 30;
+
+ if (error)
+ g_error_free (error);
+ }
+
+ return res;
+}
+
gboolean
mail_config_get_enable_magic_spacebar ()
{