aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog17
-rw-r--r--mail/component-factory.c19
-rw-r--r--mail/mail-account-gui.c2
-rw-r--r--mail/mail-format.c2
-rw-r--r--mail/mail-vfolder.c2
-rw-r--r--mail/mail.h4
6 files changed, 32 insertions, 14 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 8c1afb2011..a109d53263 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,20 @@
+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.
+
2002-07-02 Jeffrey Stedfast <fejj@ximian.com>
* folder-browser.c (on_right_click): Increase the size of the
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);
}
}
diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c
index 111b59a67c..4d50cada51 100644
--- a/mail/mail-account-gui.c
+++ b/mail/mail-account-gui.c
@@ -1787,7 +1787,7 @@ add_new_store (char *uri, CamelStore *store, void *user_data)
}
/* store is *not* in the folder tree, so lets add it. */
- mail_add_storage (store, account->name, account->source->url);
+ mail_add_storage (store, account->name, account->source->url, FALSE);
}
gboolean
diff --git a/mail/mail-format.c b/mail/mail-format.c
index 6b02a17a7f..96b677b55b 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -1758,7 +1758,7 @@ handle_multipart_encrypted (CamelMimePart *part, const char *mime_type,
camel_exception_init (&ex);
cipher = mail_crypto_get_pgp_cipher_context (NULL);
- mime_part = camel_multipart_encrypted_decrypt (part, cipher, &ex);
+ mime_part = camel_multipart_encrypted_decrypt (CAMEL_MULTIPART_ENCRYPTED (wrapper), cipher, &ex);
camel_object_unref (cipher);
if (camel_exception_is_set (&ex)) {
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index 677809e352..79e7721b61 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -724,7 +724,7 @@ vfolder_load_storage(GNOME_Evolution_Shell shell)
(CamelObjectEventHookFunc)store_folder_renamed, NULL);
d(printf("got store '%s' = %p\n", storeuri, vfolder_store));
- mail_load_storage_by_uri(shell, storeuri, U_("VFolders"));
+ mail_load_storage_by_uri(shell, storeuri, U_("VFolders"), TRUE);
/* load our rules */
user = g_strdup_printf ("%s/vfolders.xml", evolution_dir);
diff --git a/mail/mail.h b/mail/mail.h
index ef8bedc952..ecf49f4155 100644
--- a/mail/mail.h
+++ b/mail/mail.h
@@ -71,8 +71,8 @@ char *mail_get_message_body (CamelDataWrapper *data, gboolean want_plain, gboole
char *mail_identify_mime_part (CamelMimePart *part, MailDisplay *md);
/* component factory for lack of a better place */
-void mail_add_storage (CamelStore *store, const char *name, const char *uri);
-void mail_load_storage_by_uri (GNOME_Evolution_Shell shell, const char *uri, const char *name);
+void mail_add_storage (CamelStore *store, const char *name, const char *uri, gboolean auto_connect);
+void mail_load_storage_by_uri (GNOME_Evolution_Shell shell, const char *uri, const char *name, gboolean auto_connect);
/*takes a GSList of MailConfigServices */
void mail_load_storages (GNOME_Evolution_Shell shell, const GSList *sources, gboolean is_account_data);