2004-10-04 [colin] 0.9.12cvs122.1
authorColin Leroy <colin@colino.net>
Mon, 4 Oct 2004 10:22:00 +0000 (10:22 +0000)
committerColin Leroy <colin@colino.net>
Mon, 4 Oct 2004 10:22:00 +0000 (10:22 +0000)
* src/mainwindow.c
* src/messageview.c
* src/messageview.h
* src/textview.c
Sync with HEAD

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/mainwindow.c
src/messageview.c
src/messageview.h
src/textview.c

index d4eb965ce8da2f39a23cea6ad0d59e3afcfafef1..130e6f86d6fb6b822b69a5e8d14c2003d34207a1 100644 (file)
@@ -1,3 +1,11 @@
+2004-10-04 [colin]     0.9.12cvs122.1
+
+       * src/mainwindow.c
+       * src/messageview.c
+       * src/messageview.h
+       * src/textview.c
+               Sync with HEAD
+
 2004-10-04 [colin]     0.9.12cvs121.1
 
        * src/summaryview.c
index b83e06d6d8320ff9ee91cf7cb4a35e7479a05c18..6dacc5270afc0acdfcbe77456e0824bca82950db 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.4.7 -r 1.1.4.8 src/gtk/gtksctree.c; cvs diff -u -r 1.395.2.33 -r 1.395.2.34 src/summaryview.c; ) > 0.9.12cvs119.3.patchset
 ( cvs diff -u -r 1.654.2.225 -r 1.654.2.226 configure.ac; ) > 0.9.12cvs120.1.patchset
 ( cvs diff -u -r 1.395.2.34 -r 1.395.2.35 src/summaryview.c; ) > 0.9.12cvs121.1.patchset
+( cvs diff -u -r 1.274.2.21 -r 1.274.2.22 src/mainwindow.c; cvs diff -u -r 1.94.2.31 -r 1.94.2.32 src/messageview.c; cvs diff -u -r 1.19.2.3 -r 1.19.2.4 src/messageview.h; cvs diff -u -r 1.96.2.19 -r 1.96.2.20 src/textview.c; ) > 0.9.12cvs122.1.patchset
index f5b3316f0a9c277574cb020a6e0388dcb51e0292..2286ac2012902e52c376f1041e10b7f45409cf80 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=12
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=121
+EXTRA_VERSION=122
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=.1
 
index 244b6fbb6fe61e6932c09c032f169da94ee98732..47d5e0f730fc4b7f2ab352be5987ec882c9f7300 100644 (file)
@@ -2658,11 +2658,9 @@ static void set_charset_cb(MainWindow *mainwin, guint action,
 static void set_decode_cb(MainWindow *mainwin, guint action,
                           GtkWidget *widget)
 {
-       const gchar *str;
-
        if (GTK_CHECK_MENU_ITEM(widget)->active) {
-               procmime_force_encoding((EncodingType)action);
-
+               mainwin->messageview->forced_encoding = (EncodingType)action;
+               
                summary_redisplay_msg(mainwin->summaryview);
                
                debug_print("forced encoding: %d\n", action);
index 84b220ee3971865d8c6efe4bfd4549216b561754..c7cb84d3382989961862354917e579e7b392a6ef 100644 (file)
@@ -107,6 +107,9 @@ static void search_cb                       (gpointer        data,
 static void set_charset_cb             (gpointer        data,
                                         guint           action,
                                         GtkWidget      *widget);
+static void set_decode_cb              (gpointer        data,
+                                        guint           action,
+                                        GtkWidget      *widget);
 static void view_source_cb             (gpointer        data,
                                         guint           action,
                                         GtkWidget      *widget);
@@ -245,6 +248,22 @@ static GtkItemFactoryEntry msgview_entries[] =
 #undef CODESET_SEPARATOR
 #undef CODESET_ACTION
 
+#define DECODE_SEPARATOR \
+       {N_("/_View/Decode/---"),               NULL, NULL, 0, "<Separator>"}
+#define DECODE_ACTION(action) \
+        NULL, set_decode_cb, action, "/View/Decode/Auto detect"
+       {N_("/_View/Decode"),           NULL, NULL, 0, "<Branch>"},
+       {N_("/_View/Decode/_Auto detect"),
+        NULL, set_decode_cb, 0, "<RadioItem>"},
+       {N_("/_View/Decode/---"),               NULL, NULL, 0, "<Separator>"},
+       {N_("/_View/Decode/_8bit"),             DECODE_ACTION(ENC_8BIT)},
+       {N_("/_View/Decode/_Quoted printable"), DECODE_ACTION(ENC_QUOTED_PRINTABLE)},
+       {N_("/_View/Decode/_Base64"),           DECODE_ACTION(ENC_BASE64)},
+       {N_("/_View/Decode/_Uuencode"),         DECODE_ACTION(ENC_X_UUENCODE)},
+
+#undef DECODE_SEPARATOR
+#undef DECODE_ACTION
+
        {N_("/_View/---"),              NULL, NULL, 0, "<Separator>"},
        {N_("/_View/Mess_age source"),  NULL, view_source_cb, 0, NULL},
        {N_("/_View/Show all _headers"),NULL, show_all_header_cb, 0, "<ToggleItem>"},
@@ -1295,6 +1314,19 @@ static void set_charset_cb(gpointer data, guint action, GtkWidget *widget)
        }
 }
 
+static void set_decode_cb(gpointer data, guint action, GtkWidget *widget)
+{
+       MessageView *messageview = (MessageView *)data;
+       if (GTK_CHECK_MENU_ITEM(widget)->active) {
+               messageview->forced_encoding = (EncodingType)action;
+
+               messageview_show(messageview, messageview->msginfo, FALSE);
+               
+               debug_print("forced encoding: %d\n", action);
+       }
+}
+
+
 static void view_source_cb(gpointer data, guint action, GtkWidget *widget)
 {
        MessageView *messageview = (MessageView *)data;
index a4d59f0c7279323828f11be7952b39c1cb5a4f55..1b50340d2a098c77d4b7a99163f4d917c5b44f70 100644 (file)
@@ -57,6 +57,7 @@ struct _MessageView
        MsgInfo *msginfo;
 
        gchar *forced_charset;
+       EncodingType forced_encoding;
 
        gboolean visible;
 
index beb6f34bcdb5597a0b1329fae771f4454a8de942..13bff83a3822290754bf61614ef284c7be83efa5 100644 (file)
@@ -539,6 +539,8 @@ static void textview_write_body(TextView *textview, MimeInfo *mimeinfo)
 
        conv = conv_code_converter_new(charset);
 
+       procmime_force_encoding(textview->messageview->forced_encoding);
+       
        textview->is_in_signature = FALSE;
 
        procmime_decode_content(mimeinfo);
@@ -576,6 +578,7 @@ static void textview_write_body(TextView *textview, MimeInfo *mimeinfo)
        }
 
        conv_code_converter_destroy(conv);
+       procmime_force_encoding(0);
 }
 
 static void textview_show_html(TextView *textview, FILE *fp,