2007-11-07 [colin] 3.0.2cvs124
authorColin Leroy <colin@colino.net>
Wed, 7 Nov 2007 17:26:29 +0000 (17:26 +0000)
committerColin Leroy <colin@colino.net>
Wed, 7 Nov 2007 17:26:29 +0000 (17:26 +0000)
* src/mimeview.c
* src/prefs_common.c
* src/prefs_common.h
* manual/advanced.xml
Add an hidden pref, 'save_parts_readwrite';
completes 3.0.2cvs35

ChangeLog
PATCHSETS
configure.ac
manual/advanced.xml
src/mimeview.c
src/prefs_common.c
src/prefs_common.h

index 7b6c8ab808eb120109beeb8b39e31d0d17639c3f..d127fa098a28ec860633fd8f4775021c64a37fd2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-11-07 [colin]     3.0.2cvs124
+
+       * src/mimeview.c
+       * src/prefs_common.c
+       * src/prefs_common.h
+       * manual/advanced.xml
+               Add an hidden pref, 'save_parts_readwrite';
+               completes 3.0.2cvs35
+
 2007-11-07 [paul]      3.0.2cvs123
 
        * src/prefs_toolbar.c
index 17664f28b63dc7b6b7c08259d0813c0ac14dd394..417cc3b6db1fc6be0c07b44fc52effcc101b8f56 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.36 -r 1.1.2.37 src/plugins/pgpinline/pgpinline.c;  ) > 3.0.2cvs121.patchset
 ( cvs diff -u -r 1.43.2.90 -r 1.43.2.91 src/toolbar.c;  ) > 3.0.2cvs122.patchset
 ( cvs diff -u -r 1.30.2.46 -r 1.30.2.47 src/prefs_toolbar.c;  cvs diff -u -r 1.43.2.91 -r 1.43.2.92 src/toolbar.c;  cvs diff -u -r 1.19.2.25 -r 1.19.2.26 src/toolbar.h;  ) > 3.0.2cvs123.patchset
+( cvs diff -u -r 1.83.2.121 -r 1.83.2.122 src/mimeview.c;  cvs diff -u -r 1.204.2.150 -r 1.204.2.151 src/prefs_common.c;  cvs diff -u -r 1.103.2.96 -r 1.103.2.97 src/prefs_common.h;  cvs diff -u -r 1.1.2.43 -r 1.1.2.44 manual/advanced.xml;  ) > 3.0.2cvs124.patchset
index 4f211890bb139bb9f61ad7ee2b9d3a8105218884..ed7ca332c0939d10c70ca5042bbf605ae3caa7ad 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=123
+EXTRA_VERSION=124
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index eb9b15ef689a216abf02536860693e9095712fcd..b28c1430fc5d68c92b69145a468ce74ef469ecd9 100644 (file)
          </para>
        </listitem>
       </varlistentry>
+      <varlistentry>
+       <term><literal>save_parts_readwrite</literal></term>
+       <listitem>
+         <para>
+       Saves temporary files when opening attachment with write bit set.
+         </para>
+       </listitem>
+      </varlistentry>
       <varlistentry>
        <term><literal>skip_ssl_cert_check</literal></term>
        <listitem>
index 7283de3a1919de2c142669862fbd85edb20cc136..35aa0ccc29d6fad0996a8707ac341ffa9686cf05 100644 (file)
@@ -1901,13 +1901,17 @@ static void mimeview_view_file(const gchar *filename, MimeInfo *partinfo,
                if ((p = strchr(cmd, '%')) && *(p + 1) == 's' &&
                    !strchr(p + 2, '%')) {
                        g_snprintf(buf, sizeof(buf), cmd, filename);
-                       g_chmod(filename, S_IRUSR);
+                       if (!prefs_common.save_parts_readwrite)
+                               g_chmod(filename, S_IRUSR);
+                       else
+                               g_chmod(filename, S_IRUSR|S_IWUSR);
                } else {
                        g_warning("MIME viewer command line is invalid: '%s'", cmd);
                        mimeview_open_part_with(mimeview, partinfo, FALSE);
                }
                if (execute_command_line(buf, TRUE) != 0) {
-                       g_chmod(filename, S_IRUSR|S_IWUSR);
+                       if (!prefs_common.save_parts_readwrite)
+                               g_chmod(filename, S_IRUSR|S_IWUSR);
                        mimeview_open_part_with(mimeview, partinfo, FALSE);
                }
        }
index 277807df46677c28ac4e2b54a2d5e4e2af366a3e..8e59708a2af140ec4ff8893bb60bd30802c12969 100644 (file)
@@ -1040,6 +1040,8 @@ static PrefParam param[] = {
         NULL, NULL, NULL},
        {"live_dangerously", "FALSE", &prefs_common.live_dangerously, P_BOOL,
         NULL, NULL, NULL},
+       {"save_parts_readwrite", "FALSE", &prefs_common.save_parts_readwrite, P_BOOL,
+        NULL, NULL, NULL},
        {"hide_quotes", "0", &prefs_common.hide_quotes, P_INT,
         NULL, NULL, NULL},
        {"unsafe_ssl_certs", "FALSE", &prefs_common.unsafe_ssl_certs, P_BOOL,
index e396b00047e391e2dc505d7acb8993db1aea88a3..75f9288705c209a6a2a53b5741d5a5cdc8e4a1cc 100644 (file)
@@ -459,6 +459,7 @@ struct _PrefsCommon
        gint broken_are_utf8;
        gint skip_ssl_cert_check;
        gint live_dangerously;
+       gint save_parts_readwrite;
        gint never_send_retrcpt;
        gint hide_quotes;
        gboolean unsafe_ssl_certs;