From e7c2bcc11c1a4f25619809da5db927f7fe7bba73 Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Fri, 8 Apr 2011 14:50:22 +0000 Subject: [PATCH] 2011-04-08 [colin] 3.7.8cvs73 * src/gtk/filesel.c Fix bug #2393, "Crashes and rendering problems in the "Save as" menu caused by attachments with extended chars in the file name". Patch derived from a patch bt Fabien Keil --- ChangeLog | 7 +++++++ PATCHSETS | 1 + configure.ac | 2 +- src/gtk/filesel.c | 16 ++++------------ 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index a1ece7ed8..3f3e4496d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-04-08 [colin] 3.7.8cvs73 + + * src/gtk/filesel.c + Fix bug #2393, "Crashes and rendering problems in the "Save as" menu + caused by attachments with extended chars in the file name". Patch + derived from a patch bt Fabien Keil + 2011-04-05 [wwp] 3.7.8cvs72 * src/compose.c diff --git a/PATCHSETS b/PATCHSETS index cde338c15..d95bb1dd6 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -4146,3 +4146,4 @@ ( cvs diff -u -r 1.382.2.568 -r 1.382.2.569 src/compose.c; ) > 3.7.8cvs70.patchset ( cvs diff -u -r 1.20.2.76 -r 1.20.2.77 src/common/utils.h; ) > 3.7.8cvs71.patchset ( cvs diff -u -r 1.382.2.569 -r 1.382.2.570 src/compose.c; ) > 3.7.8cvs72.patchset +( cvs diff -u -r 1.2.2.42 -r 1.2.2.43 src/gtk/filesel.c; ) > 3.7.8cvs73.patchset diff --git a/configure.ac b/configure.ac index a85a3b689..12457b02b 100644 --- a/configure.ac +++ b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=7 MICRO_VERSION=8 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=72 +EXTRA_VERSION=73 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/gtk/filesel.c b/src/gtk/filesel.c index 50127a069..a511aabf1 100644 --- a/src/gtk/filesel.c +++ b/src/gtk/filesel.c @@ -168,21 +168,13 @@ static GList *filesel_create(const gchar *title, const gchar *path, g_free(realpath); realpath = g_strdup(get_home_dir()); } - tmp = NULL; if (g_utf8_validate(realpath, -1, NULL)) - tmp = g_filename_from_utf8(realpath, -1, NULL, NULL, NULL); - if (tmp == NULL) - tmp = g_strdup(realpath); - gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(chooser), tmp); - g_free(tmp); + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(chooser), + realpath); if (action == GTK_FILE_CHOOSER_ACTION_SAVE) { - tmp = NULL; if (g_utf8_validate(filename, -1, NULL)) - tmp = g_filename_from_utf8(filename, -1, NULL, NULL, NULL); - if (tmp == NULL) - tmp = g_strdup(filename); - gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(chooser), tmp); - g_free(tmp); + gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(chooser), + filename); } g_free(realpath); } else { -- 2.25.1