diff options
author | Dan Winship <danw@src.gnome.org> | 2001-03-29 01:48:07 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-03-29 01:48:07 +0800 |
commit | b38a35a5187475b13210474cea7140025793b502 (patch) | |
tree | 3508123310f89e26c0d4f93e6d764fd6ccf7a6ac /mail/component-factory.c | |
parent | 34ea3020395002ea43ddad071db305b4a35c51cc (diff) | |
download | gsoc2013-evolution-b38a35a5187475b13210474cea7140025793b502.tar gsoc2013-evolution-b38a35a5187475b13210474cea7140025793b502.tar.gz gsoc2013-evolution-b38a35a5187475b13210474cea7140025793b502.tar.bz2 gsoc2013-evolution-b38a35a5187475b13210474cea7140025793b502.tar.lz gsoc2013-evolution-b38a35a5187475b13210474cea7140025793b502.tar.xz gsoc2013-evolution-b38a35a5187475b13210474cea7140025793b502.tar.zst gsoc2013-evolution-b38a35a5187475b13210474cea7140025793b502.zip |
Set up the sent/drafts folder buttons. (folder_picker_clicked): Pop up the
* mail-account-gui.c (mail_account_gui_new): Set up the
sent/drafts folder buttons.
(folder_picker_clicked): Pop up the folder selector when sent or
drafts is clicked.
(mail_account_gui_save): Save the sent/drafts folders.
* mail-config.c (account_copy): copy sent/drafts info
(config_read): read sent/drafts info
(mail_config_write): write sent/drafts info
* mail-callbacks.c (composer_send_cb, composer_postpone_cb):
split out some common code here (and fix inconsistencies). Always
set headers on the message giving the account name, transport,
and sent folder to use.
* mail-ops.c (mail_send_message): If the message has an
X-Evolution-Account header, use the transport/sent folder info for
that account (assuming it still exists). Otherwise, if it has
X-Evolution-Transport and/or X-Evolution-Fcc, use those. If not,
use the default transport and sent folder.
FIXME: Falls back silently to the default sent folder if it can't
open the account-specific one...
(send_queue_send): remove the X-Evolution-Transport, etc
processing here, as it gets done by mail_send_message now.
FIXME: We only sync the default sent folder.
* component-factory.c (owner_set_cb): While setting up the
standard folders, also record their URIs.
svn path=/trunk/; revision=8991
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r-- | mail/component-factory.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/mail/component-factory.c b/mail/component-factory.c index 18999dc3ed..3485919cce 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -51,9 +51,12 @@ #include "mail-summary.h" #include "mail-send-recv.h" +char *default_drafts_folder_uri; CamelFolder *drafts_folder = NULL; +char *default_sent_folder_uri; +CamelFolder *sent_folder = NULL; +char *default_outbox_folder_uri; CamelFolder *outbox_folder = NULL; -CamelFolder *sent_folder = NULL; /* this one should be configurable? */ char *evolution_dir; #define COMPONENT_FACTORY_ID "OAFIID:GNOME_Evolution_Mail_ShellComponentFactory" @@ -156,12 +159,12 @@ create_folder (EvolutionShellComponent *shell_component, } static struct { - char *name; + char *name, **uri; CamelFolder **folder; } standard_folders[] = { - { "Drafts", &drafts_folder }, - { "Outbox", &outbox_folder }, - { "Sent", &sent_folder }, + { "Drafts", &default_drafts_folder_uri, &drafts_folder }, + { "Outbox", &default_outbox_folder_uri, &outbox_folder }, + { "Sent", &default_sent_folder_uri, &sent_folder }, }; static void @@ -226,9 +229,8 @@ owner_set_cb (EvolutionShellComponent *shell_component, mail_importer_init (shell_client); for (i = 0; i < sizeof (standard_folders) / sizeof (standard_folders[0]); i++) { - char *uri = g_strdup_printf ("file://%s/local/%s", evolution_dir, standard_folders[i].name); - mail_msg_wait (mail_get_folder (uri, got_folder, standard_folders[i].folder)); - g_free (uri); + *standard_folders[i].uri = g_strdup_printf ("file://%s/local/%s", evolution_dir, standard_folders[i].name); + mail_msg_wait (mail_get_folder (*standard_folders[i].uri, got_folder, standard_folders[i].folder)); } mail_session_enable_interaction (TRUE); |