diff options
-rw-r--r-- | mail/ChangeLog | 10 | ||||
-rw-r--r-- | mail/mail-display.c | 10 |
2 files changed, 15 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index e526ce6f01..77489db490 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2003-04-01 Jeffrey Stedfast <fejj@ximian.com> + + * mail-display.c (save_part): Don't allow the 'prefix' argument to + make_safe_filename() be NULL. If we don't yet have a save_dir in + gconf, use $HOME, etc. Fixes bug #40608. + 2003-04-02 Not Zed <NotZed@Ximian.com> * component-factory.c (interactive_cb): Call @@ -12,6 +18,10 @@ 2003-03-31 Jeffrey Stedfast <fejj@ximian.com> + * message-list.c (regen_list_regened): Save tree state and then + after building the new tree, re-load the tree state. Finishes the + fix for bug #40074. + * mail-session.c: Properly init message_list. Fixed a type-o that initialized it to the password_list. diff --git a/mail/mail-display.c b/mail/mail-display.c index 657275df98..ec847e84c6 100644 --- a/mail/mail-display.c +++ b/mail/mail-display.c @@ -211,7 +211,7 @@ write_data_to_file (CamelMimePart *part, const char *name, gboolean unique) } static char * -make_safe_filename (const char *prefix,CamelMimePart *part) +make_safe_filename (const char *prefix, CamelMimePart *part) { const char *name; char *safe, *p; @@ -318,19 +318,19 @@ on_link_clicked (GtkHTML *html, const char *url, MailDisplay *md) static void save_part (CamelMimePart *part) { + char *filename, *dir, *home, *base; GtkFileSelection *file_select; - char *filename, *dir, *base; GConfClient *gconf; camel_object_ref (part); + home = getenv ("HOME"); gconf = gconf_client_get_default (); dir = gconf_client_get_string (gconf, "/apps/evolution/mail/save_dir", NULL); - filename = make_safe_filename (dir, part); + filename = make_safe_filename (dir ? dir : (home ? home : ""), part); g_free (dir); - file_select = GTK_FILE_SELECTION ( - gtk_file_selection_new (_("Save Attachment"))); + file_select = GTK_FILE_SELECTION (gtk_file_selection_new (_("Save Attachment"))); gtk_file_selection_set_filename (file_select, filename); /* set the GtkEntry with the locale filename by breaking abstraction */ base = g_path_get_basename (filename); |