2005-02-15 [colin] 1.0.1cvs8.1
authorColin Leroy <colin@colino.net>
Tue, 15 Feb 2005 15:00:28 +0000 (15:00 +0000)
committerColin Leroy <colin@colino.net>
Tue, 15 Feb 2005 15:00:28 +0000 (15:00 +0000)
* src/mimeview.c
* src/common/utils.c
Sync with HEAD

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/common/utils.c
src/mimeview.c

index 948a450bf89ecd9f2d0b4a8d0ec63323b483edf2..b571b928d8c162836dea58612de5d56a54fee2b4 100644 (file)
@@ -1,3 +1,9 @@
+2005-02-15 [colin]     1.0.1cvs8.1
+
+       * src/mimeview.c
+       * src/common/utils.c
+               Sync with HEAD
+
 2005-02-15 [colin]     1.0.1cvs7.3
 
        * src/gtk/pluginwindow.c
index a63c687f55644d295ccf066509deb6a47c3fda43..e8ab34ce923bf43c21947dff3881bfdaf1db5f4a 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.101 -r 1.382.2.102 src/compose.c; cvs diff -u -r 1.49.2.33 -r 1.49.2.34 src/procmime.c; ) > 1.0.1cvs7.1.patchset
 ( cvs diff -u -r 1.83.2.29 -r 1.83.2.30 src/mimeview.c; ) > 1.0.1cvs7.2.patchset
 ( cvs diff -u -r 1.5.2.11 -r 1.5.2.12 src/gtk/pluginwindow.c; ) > 1.0.1cvs7.3.patchset
+( cvs diff -u -r 1.83.2.30 -r 1.83.2.31 src/mimeview.c; cvs diff -u -r 1.36.2.23 -r 1.36.2.24 src/common/utils.c; ) > 1.0.1cvs8.1.patchset
index 7e1628f84fb61a099ceb6afca1a5d20736309d5d..2a05549887dbaef47dcda7952c69c96c7a3bc821 100644 (file)
@@ -11,9 +11,9 @@ MINOR_VERSION=0
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=7
+EXTRA_VERSION=8
 EXTRA_RELEASE=
-EXTRA_GTK2_VERSION=.3
+EXTRA_GTK2_VERSION=.1
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
index aaefe2115681479ce8995077f376ddb48d00a862..e5befebcb1c3d7c3ef56644cc810377c51a8507a 100644 (file)
@@ -1079,7 +1079,7 @@ void subst_chars(gchar *str, gchar *orig, gchar subst)
 
 void subst_for_filename(gchar *str)
 {
-       subst_chars(str, " \t\r\n\"'/\\", '_');
+       subst_chars(str, "\t\r\n\\/*", '_');
 }
 
 void subst_for_shellsafe_filename(gchar *str)
index 8186fbc859bac0ab3c5b70288d6087d3df8d0758..f1c8c8432ae8f05db07048206aca9f8e4892edca 100644 (file)
@@ -991,12 +991,12 @@ gchar *mimeview_get_filename_for_part(MimeInfo *partinfo,
        filename = g_strdup(get_part_name(partinfo));
        if (!filename || !*filename)
                filename = g_strdup_printf("noname.%d", number);
-       subst_for_shellsafe_filename(filename);
+
+       subst_for_filename(filename);
 
        fullname = g_strconcat
                (basedir, G_DIR_SEPARATOR_S, (filename[0] == G_DIR_SEPARATOR)
                 ? &filename[1] : filename, NULL);
-       subst_chars(fullname, "/\\", G_DIR_SEPARATOR);
 
        g_free(filename);
        return fullname;
@@ -1114,7 +1114,7 @@ static void mimeview_save_as(MimeView *mimeview)
        gchar *filepath = NULL;
        gchar *filedir = NULL;
        MimeInfo *partinfo;
-       const gchar *partname = NULL;
+       gchar *partname = NULL;
 
        if (!mimeview->opened) return;
        if (!mimeview->file) return;
@@ -1129,16 +1129,21 @@ static void mimeview_save_as(MimeView *mimeview)
        }                        
        g_return_if_fail(partinfo != NULL);
        
-       if ((partname = get_part_name(partinfo)) == NULL) {
+       if (get_part_name(partinfo) == NULL) {
                return;
        }
-
+       partname = g_strdup(get_part_name(partinfo));
+       
+       subst_for_filename(partname);
+       
        if (prefs_common.attach_save_dir)
                filepath = g_strconcat(prefs_common.attach_save_dir,
                                       G_DIR_SEPARATOR_S, partname, NULL);
        else
                filepath = g_strdup(partname);
 
+       g_free(partname);
+
        filename = filesel_select_file_save(_("Save as"), filepath);
        if (!filename) {
                g_free(filepath);