aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/em-utils.c14
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));