[evolution/gnome-3-2] Bug 664654 - Sanitize subjects before suggesting a save filename



commit 7d6a526b7cdc50fcaf32db8dc221979ce26d6a8a
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu Nov 24 12:02:59 2011 -0500

    Bug 664654 - Sanitize subjects before suggesting a save filename
    
    (cherry picked from commit b2c29913cf7efc2fc74fffb26a6bfcaaa9e3c87b)

 shell/e-shell-utils.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/shell/e-shell-utils.c b/shell/e-shell-utils.c
index 740960f..c35cd41 100644
--- a/shell/e-shell-utils.c
+++ b/shell/e-shell-utils.c
@@ -33,6 +33,8 @@
 
 #include <glib/gi18n-lib.h>
 
+#include <libedataserver/e-data-server-util.h>
+
 #include "widgets/misc/e-import-assistant.h"
 
 /**
@@ -199,8 +201,14 @@ e_shell_run_save_dialog (EShell *shell,
 		gtk_file_chooser_set_current_folder_uri (file_chooser, uri);
 	g_free (uri);
 
-	if (suggestion != NULL)
-		gtk_file_chooser_set_current_name (file_chooser, suggestion);
+	if (suggestion != NULL) {
+		gchar *current_name;
+
+		current_name = g_strdup (suggestion);
+		e_filename_make_safe (current_name);
+		gtk_file_chooser_set_current_name (file_chooser, current_name);
+		g_free (current_name);
+	}
 
 	if (filters != NULL) {
 		gchar **flts = g_strsplit (filters, ";", -1);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]