diff options
author | Suman Manjunath <msuman@src.gnome.org> | 2008-04-17 02:05:18 +0800 |
---|---|---|
committer | Suman Manjunath <msuman@src.gnome.org> | 2008-04-17 02:05:18 +0800 |
commit | e7adc5aefafb18e5149a5fdb07756febf17b5684 (patch) | |
tree | 70b6d59ea5e5c19d4719c465b7bce00fdd9899a1 | |
parent | e635ff27e9b4c027d04e4cca5a3f4cba50a4a640 (diff) | |
download | gsoc2013-evolution-e7adc5aefafb18e5149a5fdb07756febf17b5684.tar gsoc2013-evolution-e7adc5aefafb18e5149a5fdb07756febf17b5684.tar.gz gsoc2013-evolution-e7adc5aefafb18e5149a5fdb07756febf17b5684.tar.bz2 gsoc2013-evolution-e7adc5aefafb18e5149a5fdb07756febf17b5684.tar.lz gsoc2013-evolution-e7adc5aefafb18e5149a5fdb07756febf17b5684.tar.xz gsoc2013-evolution-e7adc5aefafb18e5149a5fdb07756febf17b5684.tar.zst gsoc2013-evolution-e7adc5aefafb18e5149a5fdb07756febf17b5684.zip |
Patch from Shuai Liu <shuai.liu@sun.com>: Fix for bug #528358 (Use message subject as default filename when attempting to 'save message')
svn path=/trunk/; revision=35372
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/em-utils.c | 14 |
2 files changed, 20 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index c6954caaf2..fbddc2eb8e 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2008-04-16 Shuai Liu <shuai.liu@sun.com> + + ** Fix for bug #528358 + + * em-utils.c: (em_utils_save_messages): Use message subject as default + filename when attempting to 'save message'. + 2008-04-14 Milan Crha <mcrha@redhat.com> ** Fix for bug #270406 diff --git a/mail/em-utils.c b/mail/em-utils.c index 94d4fdc6ef..ee77391e97 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -638,11 +638,23 @@ em_utils_save_messages (GtkWidget *parent, CamelFolder *folder, GPtrArray *uids) { struct _save_messages_data *data; GtkWidget *filesel; + char *filename = NULL; + CamelMessageInfo *info = NULL; g_return_if_fail (CAMEL_IS_FOLDER (folder)); g_return_if_fail (uids != NULL); - filesel = e_file_get_save_filesel(parent, _("Save Message..."), NULL, GTK_FILE_CHOOSER_ACTION_SAVE); + info = camel_folder_get_message_info (folder, uids->pdata[0]); + if (info) { + filename = g_strdup (camel_message_info_subject (info)); + e_filename_make_safe (filename); + camel_message_info_free (info); + } + + filesel = e_file_get_save_filesel (parent, _("Save Message..."), filename, GTK_FILE_CHOOSER_ACTION_SAVE); + if (filename) + g_free (filename); + camel_object_ref(folder); data = g_malloc(sizeof(struct _save_messages_data)); |