aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-send-recv.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-01-27 20:35:26 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-01-27 20:35:26 +0800
commitce042b31b62f51282a3e66d1d0725fd5236d9096 (patch)
tree61c6c032f5d7fcdfb2ee7b7dd9cd96bd84e629ad /mail/mail-send-recv.c
parent2cf803cfc656c511342b5d80f464fe590b3f5d9d (diff)
downloadgsoc2013-evolution-ce042b31b62f51282a3e66d1d0725fd5236d9096.tar
gsoc2013-evolution-ce042b31b62f51282a3e66d1d0725fd5236d9096.tar.gz
gsoc2013-evolution-ce042b31b62f51282a3e66d1d0725fd5236d9096.tar.bz2
gsoc2013-evolution-ce042b31b62f51282a3e66d1d0725fd5236d9096.tar.lz
gsoc2013-evolution-ce042b31b62f51282a3e66d1d0725fd5236d9096.tar.xz
gsoc2013-evolution-ce042b31b62f51282a3e66d1d0725fd5236d9096.tar.zst
gsoc2013-evolution-ce042b31b62f51282a3e66d1d0725fd5236d9096.zip
** See bug #53084 and others.
2004-01-27 Not Zed <NotZed@Ximian.com> ** See bug #53084 and others. * em-migrate.c (em_migrate): remove the vfolder_revert hack. * em-composer-utils.c (ask_confirm_for_only_bcc): removed unused vars. * mail-tools.c (mail_tool_get_local_inbox): removed, handled by mail_component_get_folder now. * mail-component.c (mail_component_*): Changed the api slightly. Using NULL as the component argument automatically implies you want the default component. (em_uri_from_camel, em_uri_to_camel): moved to em-utils.[ch]. Ok so it isn't namespaced right ... *shrug*. (mail_component_get_local_inbox): removed. (mail_component_get_folder): single entry point for getting standard folders. This is MT-Safe. (mail_component_get_folder_uri): single entry point for getting standard folder uri's. This is MT-Safe. (add_store): removed, moved to mail_component_add_store. (mail_component_load_store_by_uri): call mail_component_add_store directly rather than copying its code. (default_*_folder*): Removed, use accessor methods instead, fixed all callers. (setup_local_store): renamed to mc_setup_local_store, use proper url encoding too. make run-once and thread-safe. (MailComponentPrivate): Added a lock. (mail_control_new): exported properly to kill warnings. (mail_component_init): dont setup_local_store or add accounts here. (impl_createControls): setup local store/accounts here. (mail_component_peek): dont setup vfolder storage here. (mc_startup): internal function to startup stuff needed for gui operation. (setup_search_context): make run-once. (mail_component_peek_search_context): call setup_search_context incase it isn't setup yet. (impl_upgradeFromVersion): remove the local store setup hack. svn path=/trunk/; revision=24462
Diffstat (limited to 'mail/mail-send-recv.c')
-rw-r--r--mail/mail-send-recv.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index 49b2c3c574..fc6556f2e8 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -131,7 +131,7 @@ static struct _send_data *setup_send_data(void)
send_data = data = g_malloc0(sizeof(*data));
data->lock = g_mutex_new();
data->folders = g_hash_table_new(g_str_hash, g_str_equal);
- data->inbox = mail_tool_get_local_inbox(NULL);
+ data->inbox = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_LOCAL_INBOX);
data->active = g_hash_table_new(g_str_hash, g_str_equal);
}
return send_data;
@@ -297,7 +297,6 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
EClippedLabel *status_label;
GtkProgressBar *bar;
GtkButton *stop;
- GtkHSeparator *line;
struct _send_info *info;
char *pretty_url;
EAccount *account;
@@ -671,7 +670,7 @@ receive_update_got_store (char *uri, CamelStore *store, void *data)
GtkWidget *mail_send_receive (void)
{
- extern CamelFolder *outbox_folder;
+ CamelFolder *outbox_folder;
struct _send_data *data;
EAccountList *accounts;
EAccount *account;
@@ -693,7 +692,8 @@ GtkWidget *mail_send_receive (void)
return send_recv_dialog;
accounts = mail_config_get_accounts ();
-
+
+ outbox_folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX);
data = build_dialog (accounts, outbox_folder, account->transport->url);
scan = data->infos;
while (scan) {
@@ -831,7 +831,7 @@ mail_receive_uri (const char *uri, int keep)
{
struct _send_info *info;
struct _send_data *data;
- extern CamelFolder *outbox_folder;
+ CamelFolder *outbox_folder;
send_info_t type;
data = setup_send_data();
@@ -876,6 +876,7 @@ mail_receive_uri (const char *uri, int keep)
break;
case SEND_SEND:
/* todo, store the folder in info? */
+ outbox_folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX);
mail_send_queue (outbox_folder, info->uri,
FILTER_SOURCE_OUTGOING,
info->cancel,
@@ -894,7 +895,7 @@ mail_receive_uri (const char *uri, int keep)
void
mail_send (void)
{
- extern CamelFolder *outbox_folder;
+ CamelFolder *outbox_folder;
EAccountService *transport;
struct _send_info *info;
struct _send_data *data;
@@ -936,6 +937,7 @@ mail_send (void)
g_hash_table_insert (data->active, SEND_URI_KEY, info);
/* todo, store the folder in info? */
+ outbox_folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX);
mail_send_queue (outbox_folder, info->uri,
FILTER_SOURCE_OUTGOING,
info->cancel,