2004-11-05 [christoph] 0.9.12cvs139
authorChristoph Hohmann <reboot@gmx.ch>
Fri, 5 Nov 2004 16:55:48 +0000 (16:55 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Fri, 5 Nov 2004 16:55:48 +0000 (16:55 +0000)
* src/compose.c
o encode text content of composed mails
* src/procmime.c
o allow encoding of MimeInfos that are stored in memory buffers

ChangeLog.claws
PATCHSETS
configure.ac
src/compose.c
src/plugins/trayicon/README
src/procmime.c

index 9b33e9bde38c14d8f797fa22ccea7201e679d905..aa0b7ae823d726d122d8168891b3ed9ae79657f1 100644 (file)
@@ -1,3 +1,11 @@
+2004-11-05 [christoph] 0.9.12cvs139
+
+       * src/compose.c
+               o encode text content of composed mails
+       * src/procmime.c
+               o allow encoding of MimeInfos that are stored in memory buffers
+               
+
 2004-11-03 [paul]      0.9.12cvs138
 
        * po/POTFILES.in
 2004-11-03 [paul]      0.9.12cvs138
 
        * po/POTFILES.in
@@ -26,7 +34,6 @@
                > Malformed message: Unexpected characters at end of parameters:
                > =_Thu__28_Oct_2)
 
                > Malformed message: Unexpected characters at end of parameters:
                > =_Thu__28_Oct_2)
 
-
 2004-10-29 [paul]
 
        * tools/textviewer.sh
 2004-10-29 [paul]
 
        * tools/textviewer.sh
index 93b7b45c5899e8794df685aa581809e48586c552..f4c5a46ccbdd3f0a623973980beda3cf87d856c5 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.56 -r 1.57 src/common/utils.c; ) > 0.9.12cvs136.patchset
 ( cvs diff -u -r 1.89 -r 1.90 src/procmime.c; ) > 0.9.12cvs137.patchset
 ( cvs diff -u -r 1.74 -r 1.75 po/POTFILES.in; cvs diff -u -r 1.4 -r 1.5 src/prefs_ext_prog.c; cvs diff -u -r 1.3 -r 1.4 tools/kdeservicemenu/template_sylpheed-attach-files.desktop; cvs diff -u -r 1.3 -r 1.4 tools/kdeservicemenu/template_sylpheed-compress-attach.desktop; ) > 0.9.12cvs138.patchset
 ( cvs diff -u -r 1.56 -r 1.57 src/common/utils.c; ) > 0.9.12cvs136.patchset
 ( cvs diff -u -r 1.89 -r 1.90 src/procmime.c; ) > 0.9.12cvs137.patchset
 ( cvs diff -u -r 1.74 -r 1.75 po/POTFILES.in; cvs diff -u -r 1.4 -r 1.5 src/prefs_ext_prog.c; cvs diff -u -r 1.3 -r 1.4 tools/kdeservicemenu/template_sylpheed-attach-files.desktop; cvs diff -u -r 1.3 -r 1.4 tools/kdeservicemenu/template_sylpheed-compress-attach.desktop; ) > 0.9.12cvs138.patchset
+( cvs diff -u -r 1.3087 -r 1.3088 ChangeLog.claws; cvs diff -u -r 1.451 -r 1.452 src/compose.c; cvs diff -u -r 1.90 -r 1.91 src/procmime.c; cvs diff -u -r 1.1 -r 1.2 src/plugins/trayicon/README; ) > 0.9.12cvs139.patchset
index ff30a510d71b58689fd596f68457d7b6e195edc8..66a4dcd684f63e78854364c5f8b293007cf0c9ee 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=12
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=12
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=138
+EXTRA_VERSION=139
 EXTRA_RELEASE=
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
 EXTRA_RELEASE=
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
index 22d443713a3ae457d93fecd7c46691718d3bc9e7..8363fa0e5a1928a790c2f1a232c0766d42b23c8f 100644 (file)
@@ -3421,6 +3421,8 @@ static gint compose_write_to_file(Compose *compose, FILE *fp, gint action)
        mimetext->subtype = g_strdup("plain");
        g_hash_table_insert(mimetext->typeparameters, g_strdup("charset"),
                            g_strdup(out_codeset));
        mimetext->subtype = g_strdup("plain");
        g_hash_table_insert(mimetext->typeparameters, g_strdup("charset"),
                            g_strdup(out_codeset));
+       if (encoding != ENC_UNKNOWN)
+               procmime_encode_content(mimetext, encoding);
 
        /* append attachment parts */
        if (compose_use_attach(compose)) {
 
        /* append attachment parts */
        if (compose_use_attach(compose)) {
index 31486aeb08934ad860cef5b2bf6206087702b185..a8b345fd4222357cbc3b6edb06686b932b5734b3 100644 (file)
@@ -22,12 +22,3 @@ into it indicates new mail.
 The icon also has a tooltip. If you keep the mouse 1 second over the
 icon a tooltip showing the text "New: xxx, Unread: xxx, Total: xxx"
 will appear, where xxx is the number of new, unread and total messages.
 The icon also has a tooltip. If you keep the mouse 1 second over the
 icon a tooltip showing the text "New: xxx, Unread: xxx, Total: xxx"
 will appear, where xxx is the number of new, unread and total messages.
-
-It is planned to add a popup menu that can be opened with the right mouse
-button to execute some quick actions.  Ideas for the menu are currently
-to start a check for new mails and to open a compose window.
-
-Another idea is to allow to hide the sylpheed main window completely by
-clicking on the icon with the left mouse button. This currently breaks
-the automatic mail check. If these problems have been solved the feature
-will be available.
index 18f057ad3cda7cc30f9e2f2e884926e4254870ea..fc365ed18d51216af7aeb7eb77add194eb43c8f2 100644 (file)
@@ -374,9 +374,9 @@ gboolean procmime_encode_content(MimeInfo *mimeinfo, EncodingType encoding)
        gchar *mimetmpdir;
        struct stat statbuf;
 
        gchar *mimetmpdir;
        struct stat statbuf;
 
-       if (mimeinfo->encoding_type != ENC_UNKNOWN ||
-           mimeinfo->encoding_type != ENC_BINARY ||
-           mimeinfo->encoding_type != ENC_7BIT ||
+       if (mimeinfo->encoding_type != ENC_UNKNOWN &&
+           mimeinfo->encoding_type != ENC_BINARY &&
+           mimeinfo->encoding_type != ENC_7BIT &&
            mimeinfo->encoding_type != ENC_8BIT)
                if(!procmime_decode_content(mimeinfo))
                        return FALSE;
            mimeinfo->encoding_type != ENC_8BIT)
                if(!procmime_decode_content(mimeinfo))
                        return FALSE;
@@ -388,9 +388,15 @@ gboolean procmime_encode_content(MimeInfo *mimeinfo, EncodingType encoding)
                return FALSE;
        }
 
                return FALSE;
        }
 
-       if ((infp = fopen(mimeinfo->data.filename, "rb")) == NULL) {
-               g_warning("Can't open file %s\n", mimeinfo->data.filename);
-               return FALSE;
+       if (mimeinfo->content == MIMECONTENT_FILE) {
+               if ((infp = fopen(mimeinfo->data.filename, "rb")) == NULL) {
+                       g_warning("Can't open file %s\n", mimeinfo->data.filename);
+                       return FALSE;
+               }
+       } else if (mimeinfo->content == MIMECONTENT_MEM) {
+               infp = str_open_as_stream(mimeinfo->data.mem);
+               if (infp == NULL)
+                       return FALSE;
        }
 
        if (encoding == ENC_BASE64) {
        }
 
        if (encoding == ENC_BASE64) {
@@ -427,10 +433,17 @@ gboolean procmime_encode_content(MimeInfo *mimeinfo, EncodingType encoding)
        fclose(outfp);
        fclose(infp);
 
        fclose(outfp);
        fclose(infp);
 
+       if (mimeinfo->content == MIMECONTENT_FILE) {
+               if (mimeinfo->tmp && (mimeinfo->data.filename != NULL))
+                       unlink(mimeinfo->data.filename);
+               g_free(mimeinfo->data.filename);
+       } else if (mimeinfo->content == MIMECONTENT_MEM) {
+               if (mimeinfo->tmp && (mimeinfo->data.mem != NULL))
+                       g_free(mimeinfo->data.mem);
+       }
+
        stat(tmpfilename, &statbuf);
        stat(tmpfilename, &statbuf);
-       if (mimeinfo->tmp && (mimeinfo->data.filename != NULL))
-               unlink(mimeinfo->data.filename);
-       g_free(mimeinfo->data.filename);
+       mimeinfo->content = MIMECONTENT_FILE;
        mimeinfo->data.filename = tmpfilename;
        mimeinfo->tmp = TRUE;
        mimeinfo->offset = 0;
        mimeinfo->data.filename = tmpfilename;
        mimeinfo->tmp = TRUE;
        mimeinfo->offset = 0;