aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-05-17 05:40:52 +0800
committerDan Winship <danw@src.gnome.org>2001-05-17 05:40:52 +0800
commit7031a911d71eb1f527f8ff9336f050679a7b74f9 (patch)
tree1c05b828c60c41dd40a97f39a5940c75dc0c2d17 /mail/mail-config.c
parentd8fcf587007ce67a1eda2b036599ac3f7e643af9 (diff)
downloadgsoc2013-evolution-7031a911d71eb1f527f8ff9336f050679a7b74f9.tar
gsoc2013-evolution-7031a911d71eb1f527f8ff9336f050679a7b74f9.tar.gz
gsoc2013-evolution-7031a911d71eb1f527f8ff9336f050679a7b74f9.tar.bz2
gsoc2013-evolution-7031a911d71eb1f527f8ff9336f050679a7b74f9.tar.lz
gsoc2013-evolution-7031a911d71eb1f527f8ff9336f050679a7b74f9.tar.xz
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/mail-config.c')
-rw-r--r--mail/mail-config.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 8da0a17c3c..420ae587af 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -1107,11 +1107,25 @@ mail_config_get_sources (void)
char *
mail_config_folder_to_cachename (CamelFolder *folder, const char *prefix)
{
+ CamelService *service = CAMEL_SERVICE (folder->parent_store);
char *url, *filename;
-
- url = camel_url_to_string (CAMEL_SERVICE (folder->parent_store)->url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
+
+ /* This is the way it is for backward compatibility with
+ * the way it was, not because it's necessarily a good thing.
+ */
+
+ url = camel_url_to_string (service->url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
+
+ /* Really we want to check CAMEL_IS_LOCAL_FOLDER here, but we
+ * can't do that.
+ */
+ if (service->provider->flags & CAMEL_PROVIDER_IS_REMOTE) {
+ char *store_url = url;
+ url = g_strdup_printf ("%s/%s", store_url, folder->full_name);
+ g_free (store_url);
+ }
e_filename_make_safe (url);
-
+
filename = g_strdup_printf ("%s/config/%s%s", evolution_dir, prefix, url);
g_free (url);