diff options
author | Dan Winship <danw@src.gnome.org> | 2001-05-17 05:40:52 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-05-17 05:40:52 +0800 |
commit | 7031a911d71eb1f527f8ff9336f050679a7b74f9 (patch) | |
tree | 1c05b828c60c41dd40a97f39a5940c75dc0c2d17 /mail/message-list.c | |
parent | d8fcf587007ce67a1eda2b036599ac3f7e643af9 (diff) | |
download | gsoc2013-evolution-7031a911d71eb1f527f8ff9336f050679a7b74f9.tar.gz gsoc2013-evolution-7031a911d71eb1f527f8ff9336f050679a7b74f9.tar.zst gsoc2013-evolution-7031a911d71eb1f527f8ff9336f050679a7b74f9.zip |
Functions to determine if a folderbrowser is one of the drafts, sent, or
* folder-browser.c (folder_browser_is_drafts,
folder_browser_is_sent, folder_browser_is_outbox): Functions to
determine if a folderbrowser is one of the drafts, sent, or outbox
folders.
(got_folder): Pass TRUE for the "outgoing" flag to
message_list_set_folder if this is a Sent, Drafts, or Outbox
folder.
* message-list.c (message_list_set_folder): Take a flag saying
whether or not the folder is an "outgoing" folder.
(message_list_setup_etree): Ditto. Use that rather than a
hardcoded list of foldernames for deciding whether to swap From
and To in the default layout.
* mail-config.c (mail_config_folder_to_cachename): Make IMAP
folders have unique cachenames rather than only one per store, so
that IMAP Sent and Drafts folders don't get forced into having the
same layout as the INBOX.
* mail-callbacks.c: (is_sent_folder, is_drafts_folder): Gone.
Replaced with simpler folder_browser_is_* routines.
(edit_msg, resend_msg, open_msg): Use folder_browser_is_*
routines.
* mail-local.c (reconfigure_clicked): Update call to
message_list_set_folder.
svn path=/trunk/; revision=9857
Diffstat (limited to 'mail/message-list.c')
-rw-r--r-- | mail/message-list.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mail/message-list.c b/mail/message-list.c index f42707e807..f4235a5642 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -1106,7 +1106,7 @@ message_list_get_layout (MessageList *message_list) } static void -message_list_setup_etree(MessageList *message_list) +message_list_setup_etree(MessageList *message_list, gboolean outgoing) { /* build the spec based on the folder, and possibly from a saved file */ /* otherwise, leave default */ @@ -1122,8 +1122,8 @@ message_list_setup_etree(MessageList *message_list) if (path && stat (path, &st) == 0 && st.st_size > 0 && S_ISREG (st.st_mode)) { /* build based on saved file */ e_tree_load_state (message_list->tree, path); - } else if (strstr (name, "/Drafts") || strstr (name, "/Outbox") || strstr (name, "/Sent")) { - /* these folders have special defaults */ + } else if (outgoing) { + /* Swap From/To for Drafts, Sent, Outbox */ char *state = "<ETableState>" "<column source=\"0\"/> <column source=\"1\"/> " "<column source=\"8\"/> <column source=\"5\"/> " @@ -1952,7 +1952,7 @@ message_changed (CamelObject *o, gpointer event_data, gpointer user_data) } void -message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder) +message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder, gboolean outgoing) { CamelException ex; @@ -1985,7 +1985,7 @@ message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder) if (camel_folder) { /* build the etree suitable for this folder */ - message_list_setup_etree(message_list); + message_list_setup_etree(message_list, outgoing); camel_object_hook_event(CAMEL_OBJECT (camel_folder), "folder_changed", folder_changed, message_list); |