aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-12-10 23:08:52 +0800
committerMilan Crha <mcrha@redhat.com>2009-12-10 23:08:52 +0800
commit4a9bf4dffd98346f9eee848708df573df56ed1d6 (patch)
treeff25e44e04c981f030fdbd734520dd6f0c9703cd /mail
parent23b4037df07370ee9f2bf069db2256620c0a2f82 (diff)
downloadgsoc2013-evolution-4a9bf4dffd98346f9eee848708df573df56ed1d6.tar
gsoc2013-evolution-4a9bf4dffd98346f9eee848708df573df56ed1d6.tar.gz
gsoc2013-evolution-4a9bf4dffd98346f9eee848708df573df56ed1d6.tar.bz2
gsoc2013-evolution-4a9bf4dffd98346f9eee848708df573df56ed1d6.tar.lz
gsoc2013-evolution-4a9bf4dffd98346f9eee848708df573df56ed1d6.tar.xz
gsoc2013-evolution-4a9bf4dffd98346f9eee848708df573df56ed1d6.tar.zst
gsoc2013-evolution-4a9bf4dffd98346f9eee848708df573df56ed1d6.zip
Bug #499322 - Use extension for "Save as" suggested file name
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-reader.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index f9e5abd837..d33c1e52df 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -799,7 +799,7 @@ action_mail_save_as_cb (GtkAction *action,
GPtrArray *uids;
GFile *file;
const gchar *title;
- const gchar *suggestion;
+ gchar *suggestion = NULL;
gchar *uri;
folder = e_mail_reader_get_folder (reader);
@@ -813,13 +813,23 @@ action_mail_save_as_cb (GtkAction *action,
/* Suggest as a filename the subject of the first message. */
info = camel_folder_get_message_info (folder, uids->pdata[0]);
if (info != NULL) {
- suggestion = camel_message_info_subject (info);
+ const gchar *subject = camel_message_info_subject (info);
+
+ if (subject)
+ suggestion = g_strconcat (subject, ".mbox", NULL);
camel_message_info_free (info);
- } else
- suggestion = NULL;
+ }
+
+ if (!suggestion) {
+ /* To Translators: This is a part of a suggested file name used when saving
+ a message or multiple messages to an mbox format, when the first message
+ doesn't have a Subject. The extension ".mbox" is appended to this string,
+ thus it will be something like "Message.mbox" at the end. */
+ suggestion = g_strconcat (ngettext ("Message", "Messages", uids->len), ".mbox", NULL);
+ }
shell = e_shell_backend_get_shell (shell_backend);
- file = e_shell_run_save_dialog (shell, title, suggestion, NULL, NULL);
+ file = e_shell_run_save_dialog (shell, title, suggestion, "*.mbox:application/mbox,message/rfc822", NULL, NULL);
if (file == NULL) {
em_utils_uids_free (uids);