aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Williams <peterw@ximian.com>2002-07-15 23:00:05 +0800
committerPeter Williams <peterw@src.gnome.org>2002-07-15 23:00:05 +0800
commitf9a7422465a5f6c05d080cdbb8b06932d45ce8df (patch)
treec598d897823fd93e057fc3b5112fdbcaa1a68311
parent7e9fe066648a94d79835ea45c83d536d03e558fe (diff)
downloadgsoc2013-evolution-f9a7422465a5f6c05d080cdbb8b06932d45ce8df.tar
gsoc2013-evolution-f9a7422465a5f6c05d080cdbb8b06932d45ce8df.tar.gz
gsoc2013-evolution-f9a7422465a5f6c05d080cdbb8b06932d45ce8df.tar.bz2
gsoc2013-evolution-f9a7422465a5f6c05d080cdbb8b06932d45ce8df.tar.lz
gsoc2013-evolution-f9a7422465a5f6c05d080cdbb8b06932d45ce8df.tar.xz
gsoc2013-evolution-f9a7422465a5f6c05d080cdbb8b06932d45ce8df.tar.zst
gsoc2013-evolution-f9a7422465a5f6c05d080cdbb8b06932d45ce8df.zip
Account for the case that when a disco store is "online" but actually
2002-07-15 Peter Williams <peterw@ximian.com> * mail-offline-handler.c (service_is_relevant): Account for the case that when a disco store is "online" but actually offline and we're going online, we should actually connect it. * component-factory.c (mail_load_storages): Always set auto_connect to FALSE, same reason as below. * mail-session.c (mail_session_init): Initialize our session to not be online, since the shell will tell us to go online if we need to. svn path=/trunk/; revision=17459
-rw-r--r--mail/ChangeLog12
-rw-r--r--mail/component-factory.c3
-rw-r--r--mail/mail-offline-handler.c4
-rw-r--r--mail/mail-session.c4
4 files changed, 20 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 676ed01190..ba1897c2ac 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,15 @@
+2002-07-15 Peter Williams <peterw@ximian.com>
+
+ * mail-offline-handler.c (service_is_relevant): Account for the case
+ that when a disco store is "online" but actually offline and we're
+ going online, we should actually connect it.
+
+ * component-factory.c (mail_load_storages): Always set auto_connect
+ to FALSE, same reason as below.
+
+ * mail-session.c (mail_session_init): Initialize our session to not be online,
+ since the shell will tell us to go online if we need to.
+
2002-07-10 Peter Williams <peterw@ximian.com>
* Makefile.am (importerdir): Define this in terms of the new
diff --git a/mail/component-factory.c b/mail/component-factory.c
index 7fe2a4e8a1..29d47cc681 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -1409,7 +1409,8 @@ mail_load_storages (GNOME_Evolution_Shell shell, const GSList *sources)
if (service == NULL || service->url == NULL || service->url[0] == '\0')
continue;
- mail_load_storage_by_uri (shell, service->url, name, service->enabled);
+ /* don't auto-connect here; the shell will tell us to goOnline */
+ mail_load_storage_by_uri (shell, service->url, name, FALSE);
}
}
diff --git a/mail/mail-offline-handler.c b/mail/mail-offline-handler.c
index a24f52a79c..fa374efc73 100644
--- a/mail/mail-offline-handler.c
+++ b/mail/mail-offline-handler.c
@@ -48,9 +48,9 @@ service_is_relevant (CamelService *service, gboolean going_offline)
(service->provider->flags & CAMEL_PROVIDER_IS_EXTERNAL))
return FALSE;
- if (CAMEL_IS_DISCO_STORE (service) && going_offline &&
+ if (CAMEL_IS_DISCO_STORE (service) &&
camel_disco_store_status (CAMEL_DISCO_STORE (service)) == CAMEL_DISCO_STORE_OFFLINE)
- return FALSE;
+ return !going_offline;
return service->status != CAMEL_SERVICE_DISCONNECTED;
}
diff --git a/mail/mail-session.c b/mail/mail-session.c
index 02a67f4ee7..2fb0628301 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -979,6 +979,10 @@ mail_session_init (void)
camel_dir = g_strdup_printf ("%s/mail", evolution_dir);
camel_session_construct (session, camel_dir);
+
+ /* The shell will tell us to go online. */
+ camel_session_set_online ((CamelSession *)session, FALSE);
+
g_free (camel_dir);
}