aboutsummaryrefslogtreecommitdiffstats
path: root/mail/component-factory.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-07-04 04:40:12 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-07-04 04:40:12 +0800
commit593eca5fcc9bd7a3f5b0f2c9a87b7d53125a2b7c (patch)
tree97d4b962f839033635698704f704aff257781c9e /mail/component-factory.c
parent164caed66b245d4244cf8c11604529d33dd1f91f (diff)
downloadgsoc2013-evolution-593eca5fcc9bd7a3f5b0f2c9a87b7d53125a2b7c.tar.gz
gsoc2013-evolution-593eca5fcc9bd7a3f5b0f2c9a87b7d53125a2b7c.tar.zst
gsoc2013-evolution-593eca5fcc9bd7a3f5b0f2c9a87b7d53125a2b7c.zip
Pass TRUE as the auto_connect argument to mail_load_storage_from_uri().
2002-07-03 Jeffrey Stedfast <fejj@ximian.com> * mail-vfolder.c (vfolder_load_storage): Pass TRUE as the auto_connect argument to mail_load_storage_from_uri(). * mail-account-gui.c (add_new_store): Pass FALSE as the auto_connect value to mail_load_storage_from_uri(). * mail-format.c (handle_multipart_encrypted): Pass the correct pointer into camel_multipart_encrypted_decrypt(). * component-factory.c (mail_add_storage): Now takes an auto-connect argument which it passes along to add_storage(). (mail_load_storage_from_uri): Same. (add_storage): Only call mail_note_store() if we plan on auto-connecting. svn path=/trunk/; revision=17363
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r--mail/component-factory.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/mail/component-factory.c b/mail/component-factory.c
index 0acc04561e..6667ae4f24 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -1277,7 +1277,7 @@ storage_connect (EvolutionStorage *storage,
}
static void
-add_storage (const char *name, const char *uri, CamelService *store,
+add_storage (const char *name, const char *uri, CamelService *store, gboolean auto_connect,
GNOME_Evolution_Shell corba_shell, CamelException *ex)
{
EvolutionStorage *storage;
@@ -1295,7 +1295,8 @@ add_storage (const char *name, const char *uri, CamelService *store,
case EVOLUTION_STORAGE_OK:
evolution_storage_has_subfolders (storage, "/", _("Connecting..."));
mail_hash_storage (store, storage);
- mail_note_store ((CamelStore *) store, storage, CORBA_OBJECT_NIL, NULL, NULL);
+ if (auto_connect)
+ mail_note_store ((CamelStore *) store, storage, CORBA_OBJECT_NIL, NULL, NULL);
/* falllll */
case EVOLUTION_STORAGE_ERROR_ALREADYREGISTERED:
case EVOLUTION_STORAGE_ERROR_EXISTS:
@@ -1310,7 +1311,7 @@ add_storage (const char *name, const char *uri, CamelService *store,
void
-mail_add_storage (CamelStore *store, const char *name, const char *uri)
+mail_add_storage (CamelStore *store, const char *name, const char *uri, gboolean auto_connect)
{
EvolutionShellClient *shell_client;
GNOME_Evolution_Shell shell;
@@ -1327,17 +1328,17 @@ mail_add_storage (CamelStore *store, const char *name, const char *uri)
char *service_name;
service_name = camel_service_get_name ((CamelService *) store, TRUE);
- add_storage (service_name, uri, (CamelService *) store, shell, &ex);
+ add_storage (service_name, uri, (CamelService *) store, auto_connect, shell, &ex);
g_free (service_name);
} else {
- add_storage (name, uri, (CamelService *) store, shell, &ex);
+ add_storage (name, uri, (CamelService *) store, auto_connect, shell, &ex);
}
camel_exception_clear (&ex);
}
void
-mail_load_storage_by_uri (GNOME_Evolution_Shell shell, const char *uri, const char *name)
+mail_load_storage_by_uri (GNOME_Evolution_Shell shell, const char *uri, const char *name, gboolean auto_connect)
{
CamelException ex;
CamelService *store;
@@ -1376,10 +1377,10 @@ mail_load_storage_by_uri (GNOME_Evolution_Shell shell, const char *uri, const ch
char *service_name;
service_name = camel_service_get_name (store, TRUE);
- add_storage (service_name, uri, store, shell, &ex);
+ add_storage (service_name, uri, store, auto_connect, shell, &ex);
g_free (service_name);
} else
- add_storage (name, uri, store, shell, &ex);
+ add_storage (name, uri, store, auto_connect, shell, &ex);
if (camel_exception_is_set (&ex)) {
/* FIXME: real error dialog */
@@ -1423,7 +1424,7 @@ mail_load_storages (GNOME_Evolution_Shell shell, const GSList *sources, gboolean
if (service == NULL || service->url == NULL || service->url[0] == '\0')
continue;
- mail_load_storage_by_uri (shell, service->url, name);
+ mail_load_storage_by_uri (shell, service->url, name, service->enabled);
}
}