0.9.6claws40
authorChristoph Hohmann <reboot@gmx.ch>
Tue, 21 Oct 2003 16:44:51 +0000 (16:44 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Tue, 21 Oct 2003 16:44:51 +0000 (16:44 +0000)
* src/procmime.[ch]
* src/textview.c
        remove obsolete charset parameter in MimeInfo and fix
        TextView to use the charset from the parameter hash table

* src/plugins/dillo_viewer/Makefile.am
* src/plugins/trayicon/Makefile.am
        add OPENSSL_CFLAGS to fix building with using
        --with-openssl-* parameters

ChangeLog.claws
configure.ac
src/plugins/dillo_viewer/Makefile.am
src/plugins/trayicon/Makefile.am
src/procmime.c
src/procmime.h
src/textview.c

index c7b7a819d7a0b55695b406e88cbb435112ef15d1..13ed38911d6c66b158e47a07a99e857bd935535d 100644 (file)
@@ -1,3 +1,15 @@
+2003-10-21 [christoph] 0.9.6claws40
+
+       * src/procmime.[ch]
+       * src/textview.c
+               remove obsolete charset parameter in MimeInfo and fix
+               TextView to use the charset from the parameter hash table
+
+       * src/plugins/dillo_viewer/Makefile.am
+       * src/plugins/trayicon/Makefile.am
+               add OPENSSL_CFLAGS to fix building with using
+               --with-openssl-* parameters
+
 2003-10-21 [paul]      0.9.6claws39
 
        * src/prefs_matcher.[ch]
index bb51abf436d9737e290a6dde5de1165c00f13109..f791ec7b0626ffe43f0d6cef1d3323b7c0a5c82f 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=39
+EXTRA_VERSION=40
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index e76112cd36b73b95104b73feb16ba282b87761fb..8c9d2a270271f2169d72d70516ccd1646f0dd0a5 100644 (file)
@@ -18,4 +18,5 @@ INCLUDES = \
 AM_CPPFLAGS = \
        $(ASPELL_CFLAGS) \
        $(GLIB_CFLAGS) \
-       $(GTK_CFLAGS)
+       $(GTK_CFLAGS) \
+       $(OPENSSL_CFLAGS)
index 84128dd58c2faf91df0cf4dc8ba67f690c9d3e04..0f01034a894ca17d5b3fc26f7ab1ee2f2689e7c0 100644 (file)
@@ -23,7 +23,8 @@ INCLUDES = \
 AM_CPPFLAGS = \
        $(GLIB_CFLAGS) \
        $(GTK_CFLAGS) \
-       $(ASPELL_CFLAGS)
+       $(ASPELL_CFLAGS) \
+       $(OPENSSL_CFLAGS)
 
 EXTRA_DIST = \
        README \
index 3271d66d826aceddc65b578e0e52c0baba3e9911..f58fc2a44f941da7fc527dd6cd78bf76eb068d94 100644 (file)
@@ -76,7 +76,6 @@ static gboolean free_func(GNode *node, gpointer data)
        MimeInfo *mimeinfo = (MimeInfo *) node->data;
 
        g_free(mimeinfo->encoding);
-       g_free(mimeinfo->charset);
        g_free(mimeinfo->name);
        g_free(mimeinfo->content_disposition);
        if(mimeinfo->tmpfile)
@@ -210,6 +209,14 @@ enum
        H_SUBJECT                   = 4
 };
 
+const gchar *procmime_mimeinfo_get_parameter(MimeInfo *mimeinfo, const gchar *name)
+{
+       g_return_val_if_fail(mimeinfo != NULL, NULL);
+       g_return_val_if_fail(name != NULL, NULL);
+       
+       return g_hash_table_lookup(mimeinfo->parameters, name);
+}
+
 gboolean procmime_decode_content(MimeInfo *mimeinfo)
 {
        gchar buf[BUFFSIZE];
@@ -479,7 +486,8 @@ FILE *procmime_get_text_content(MimeInfo *mimeinfo)
        }
 
        src_codeset = prefs_common.force_charset
-               ? prefs_common.force_charset : mimeinfo->charset;
+               ? prefs_common.force_charset : 
+               procmime_mimeinfo_get_parameter(mimeinfo, "charset");
 
        renderer = NULL;
 
index ec9654477a62a8e3d6a05c3f7665b91262e92896..5143ee1324cbae92d6c4831a781d8fdd2d451169 100644 (file)
@@ -92,7 +92,6 @@ struct _MimeInfo
 {
        gchar *encoding;
 
-       gchar *charset;
        gchar *name;
 
        gchar *content_disposition;
@@ -145,6 +144,9 @@ MimeInfo *procmime_mimeinfo_next    (MimeInfo       *mimeinfo);
 MimeInfo *procmime_scan_message                (MsgInfo        *msginfo);
 void procmime_scan_multipart_message   (MimeInfo       *mimeinfo,
                                         FILE           *fp);
+const gchar *procmime_mimeinfo_get_parameter
+                                       (MimeInfo       *mimeinfo,
+                                        const gchar    *name);
 
 /* scan headers */
 
index b0d7d6f3f36e4b50263955e5555bb555642a0e86..b51a452141f851a4884dc112dd211576b0735c94 100644 (file)
@@ -327,8 +327,8 @@ void textview_show_message(TextView *textview, MimeInfo *mimeinfo,
                charset = textview->messageview->forced_charset;
        else if (prefs_common.force_charset)
                charset = prefs_common.force_charset;
-       else if (mimeinfo->charset)
-               charset = mimeinfo->charset;
+       else
+               charset = procmime_mimeinfo_get_parameter(mimeinfo, "charset");
 
        textview_set_font(textview, charset);
        textview_clear(textview);
@@ -377,8 +377,8 @@ void textview_show_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp)
                charset = textview->messageview->forced_charset;
        else if (prefs_common.force_charset)
                charset = prefs_common.force_charset;
-       else if (mimeinfo->charset)
-               charset = mimeinfo->charset;
+       else
+               charset = procmime_mimeinfo_get_parameter(mimeinfo, "charset");
 
        textview_set_font(textview, charset);
 
@@ -454,8 +454,9 @@ static void textview_add_part(TextView *textview, MimeInfo *mimeinfo)
                        charset = textview->messageview->forced_charset;
                else if (prefs_common.force_charset)
                        charset = prefs_common.force_charset;
-               else if (mimeinfo->charset)
-                       charset = mimeinfo->charset;
+               else
+                       charset = procmime_mimeinfo_get_parameter(mimeinfo, "charset");
+
                textview_write_body(textview, mimeinfo, charset);
        }