X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodest-local-folder-info.c;h=0647f587a737137ff551092d6215c76ece263770;hb=3ae2a37f28694c27a862e0a909c2929999852df7;hp=9c646a73b5be420fa2fbb550199fbf92cdcac39f;hpb=48bebb6807aa14936ee82996ea7a749cb84b5956;p=modest diff --git a/src/modest-local-folder-info.c b/src/modest-local-folder-info.c index 9c646a7..0647f58 100644 --- a/src/modest-local-folder-info.c +++ b/src/modest-local-folder-info.c @@ -30,6 +30,7 @@ #include #include /* strcmp */ #include +#include #include typedef struct { @@ -41,7 +42,6 @@ typedef struct { const ModestLocalFolder ModestLocalFolderMap[] = { { TNY_FOLDER_TYPE_UNKNOWN, "", N_("")}, { TNY_FOLDER_TYPE_NORMAL, "", N_("")}, - { TNY_FOLDER_TYPE_INBOX, "inbox", N_("mcen_me_folder_inbox")}, { TNY_FOLDER_TYPE_OUTBOX, "outbox", N_("mcen_me_folder_outbox")}, { TNY_FOLDER_TYPE_TRASH, "trash", N_("Trash")}, { TNY_FOLDER_TYPE_JUNK, "junk", N_("Junk")}, @@ -49,11 +49,7 @@ const ModestLocalFolder ModestLocalFolderMap[] = { { TNY_FOLDER_TYPE_ROOT, "", N_("")}, { TNY_FOLDER_TYPE_NOTES, "notes", N_("Notes")}, { TNY_FOLDER_TYPE_DRAFTS, "drafts", N_("mcen_me_folder_drafts")}, -/* TODO: Do we want these? If so, they need a type ID: - * { TNY_FOLDER_TYPE_OUTBOX, "contacts", N_("Contacts")}, - { TNY_FOLDER_TYPE_OUTBOX, "calendar", N_("Calendar")}, -*/ - { TNY_FOLDER_TYPE_ARCHIVE, "archive", N_("Archive")} + { TNY_FOLDER_TYPE_ARCHIVE, "archive", N_("mcen_me_folder_archive")} }; @@ -113,17 +109,25 @@ modest_local_folder_info_get_maildir_path (const gchar* location_filepath) NULL); } -gchar *modest_per_account_local_outbox_folder_info_get_maildir_path (const gchar* account_name) +gchar* +modest_per_account_local_outbox_folder_info_get_maildir_path (const gchar* account_name) { /* This directory should contain an "outbox" child directory: */ - return g_build_filename (g_get_home_dir(), - MODEST_DIR, - MODEST_PER_ACCOUNT_LOCAL_OUTBOX_FOLDERS_MAILDIR, - account_name, - NULL); + gchar *escaped, *filename; + + escaped = g_uri_escape_string (account_name, NULL, FALSE); + filename = g_build_filename (g_get_home_dir(), + MODEST_DIR, + MODEST_PER_ACCOUNT_LOCAL_OUTBOX_FOLDERS_MAILDIR, + escaped, + NULL); + g_free (escaped); + + return filename; } -gchar *modest_per_account_local_outbox_folder_info_get_maildir_path_to_outbox_folder (const gchar* account_name) +gchar* +modest_per_account_local_outbox_folder_info_get_maildir_path_to_outbox_folder (const gchar* account_name) { gchar *path_to_account_folder = modest_per_account_local_outbox_folder_info_get_maildir_path(account_name);