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 7b6c8ab..d127fa0 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 17664f2..417cc3b 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 4f21189..ed7ca33 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 eb9b15e..b28c143 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 7283de3..35aa0cc 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 277807d..8e59708 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 e396b00..75f9288 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;