aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog15
-rw-r--r--mail/component-factory.c21
-rw-r--r--mail/mail-account-gui.c2
-rw-r--r--mail/mail-accounts.c6
-rw-r--r--mail/mail-vfolder.c2
-rw-r--r--mail/mail.h4
6 files changed, 32 insertions, 18 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index f525fd7e68..ad07457b2a 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,18 @@
+2002-07-16 Jeffrey Stedfast <fejj@ximian.com>
+
+ * mail-accounts.c (account_able_clicked): Re-enable some #if 0'd code.
+
+ * mail-vfolder.c (vfolder_load_storage): Updated to not pass TRUE
+ for an auto_connect argument since that argument no longer exists.
+
+ * mail-account-gui.c (add_new_store): Updated to not pass an
+ auto_connect argument.
+
+ * component-factory.c (add_storage): Don't ever auto-connect here.
+ (mail_add_storage): No longer takes an auto_connect argument.
+ (mail_load_storages): Only load the account storages that are
+ enabled.
+
2002-07-15 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (composer_send_cb): Pass 'info' into
diff --git a/mail/component-factory.c b/mail/component-factory.c
index 29d47cc681..5c03cc5ad2 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -1269,7 +1269,7 @@ storage_connect (EvolutionStorage *storage,
}
static void
-add_storage (const char *name, const char *uri, CamelService *store, gboolean auto_connect,
+add_storage (const char *name, const char *uri, CamelService *store,
GNOME_Evolution_Shell corba_shell, CamelException *ex)
{
EvolutionStorage *storage;
@@ -1287,8 +1287,8 @@ add_storage (const char *name, const char *uri, CamelService *store, gboolean au
case EVOLUTION_STORAGE_OK:
evolution_storage_has_subfolders (storage, "/", _("Connecting..."));
mail_hash_storage (store, storage);
- if (auto_connect)
- 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:
@@ -1303,7 +1303,7 @@ add_storage (const char *name, const char *uri, CamelService *store, gboolean au
void
-mail_add_storage (CamelStore *store, const char *name, const char *uri, gboolean auto_connect)
+mail_add_storage (CamelStore *store, const char *name, const char *uri)
{
EvolutionShellClient *shell_client;
GNOME_Evolution_Shell shell;
@@ -1320,17 +1320,17 @@ mail_add_storage (CamelStore *store, const char *name, const char *uri, gboolean
char *service_name;
service_name = camel_service_get_name ((CamelService *) store, TRUE);
- add_storage (service_name, uri, (CamelService *) store, auto_connect, shell, &ex);
+ add_storage (service_name, uri, (CamelService *) store, shell, &ex);
g_free (service_name);
} else {
- add_storage (name, uri, (CamelService *) store, auto_connect, shell, &ex);
+ add_storage (name, uri, (CamelService *) store, shell, &ex);
}
camel_exception_clear (&ex);
}
void
-mail_load_storage_by_uri (GNOME_Evolution_Shell shell, const char *uri, const char *name, gboolean auto_connect)
+mail_load_storage_by_uri (GNOME_Evolution_Shell shell, const char *uri, const char *name)
{
CamelException ex;
CamelService *store;
@@ -1369,10 +1369,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, auto_connect, shell, &ex);
+ add_storage (service_name, uri, store, shell, &ex);
g_free (service_name);
} else
- add_storage (name, uri, store, auto_connect, shell, &ex);
+ add_storage (name, uri, store, shell, &ex);
if (camel_exception_is_set (&ex)) {
/* FIXME: real error dialog */
@@ -1410,7 +1410,8 @@ mail_load_storages (GNOME_Evolution_Shell shell, const GSList *sources)
continue;
/* don't auto-connect here; the shell will tell us to goOnline */
- mail_load_storage_by_uri (shell, service->url, name, FALSE);
+ if (account->source->enabled)
+ mail_load_storage_by_uri (shell, service->url, name);
}
}
diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c
index 1f2de490c0..81321fdc31 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, FALSE);
+ mail_add_storage (store, account->name, account->source->url);
}
gboolean
diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c
index 67f0d8a3a9..5074469e3e 100644
--- a/mail/mail-accounts.c
+++ b/mail/mail-accounts.c
@@ -325,16 +325,14 @@ account_able_clicked (GtkButton *button, gpointer user_data)
account->source->enabled = !account->source->enabled;
-#if 0
/* if the account got disabled, remove it from the
- folder-tree, otherwise add it to the folder-tree */
- if (account->source && account->source->url) {
+ folder-tree, otherwise add it to the folder-tree */
+ if (account->source->url) {
if (account->source->enabled)
mail_load_storage_by_uri (prefs->shell, account->source->url, account->name);
else
mail_remove_storage_by_uri (account->source->url);
}
-#endif
#if USE_ETABLE
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index bf68cf7cd5..069dda3f00 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -725,7 +725,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"), TRUE);
+ mail_load_storage_by_uri(shell, storeuri, U_("VFolders"));
/* load our rules */
user = g_strdup_printf ("%s/vfolders.xml", evolution_dir);
diff --git a/mail/mail.h b/mail/mail.h
index 3e5319116f..98eb291d56 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, gboolean auto_connect);
-void mail_load_storage_by_uri (GNOME_Evolution_Shell shell, const char *uri, const char *name, gboolean auto_connect);
+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);
/*takes a GSList of MailConfigServices */
void mail_load_storages (GNOME_Evolution_Shell shell, const GSList *sources);