2006-02-17 [cleroy] 2.0.0cvs60
authorColin Leroy <colin@colino.net>
Fri, 17 Feb 2006 17:43:25 +0000 (17:43 +0000)
committerColin Leroy <colin@colino.net>
Fri, 17 Feb 2006 17:43:25 +0000 (17:43 +0000)
* src/messageview.c
* src/prefs_common.c
* src/prefs_common.h
* src/prefs_message.c
Add pref to display HTML-only mails with plugin,
if possible (defaulting to FALSE of course).

ChangeLog
PATCHSETS
configure.ac
src/messageview.c
src/prefs_common.c
src/prefs_common.h
src/prefs_message.c

index 53d9a82db3e52941ec5669cd5567c75c67fdc58d..025fe9bba00f2385ed8974e084e920c673febb47 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-02-17 [cleroy]    2.0.0cvs60
+
+       * src/messageview.c
+       * src/prefs_common.c
+       * src/prefs_common.h
+       * src/prefs_message.c
+               Add pref to display HTML-only mails with plugin, 
+               if possible (defaulting to FALSE of course).
+
 2006-02-16 [cleroy]    2.0.0cvs59
 
        * src/main.c
index 366f01750d66164f2377fdefc624a3c48101428a..b8941bf3a19bb990ba4303a77a9c690457495c56 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.22.2.18 -r 1.22.2.19 src/quote_fmt_parse.y;  ) > 2.0.0cvs57.patchset
 ( cvs diff -u -r 1.9.2.36 -r 1.9.2.37 src/gtk/gtkaspell.c;  cvs diff -u -r 1.5.2.4 -r 1.5.2.5 src/gtk/gtkaspell.h;  cvs diff -u -r 1.5.2.18 -r 1.5.2.19 src/prefs_spelling.c;  cvs diff -u -r 1.382.2.241 -r 1.382.2.242 src/compose.c;  cvs diff -u -r 1.204.2.75 -r 1.204.2.76 src/prefs_common.c;  cvs diff -u -r 1.103.2.40 -r 1.103.2.41 src/prefs_common.h;  ) > 2.0.0cvs58.patchset
 ( cvs diff -u -r 1.115.2.75 -r 1.115.2.76 src/main.c;  cvs diff -u -r 1.13.2.16 -r 1.13.2.17 src/common/plugin.c;  cvs diff -u -r 1.5.2.4 -r 1.5.2.5 src/common/plugin.h;  cvs diff -u -r 1.5.2.26 -r 1.5.2.27 src/gtk/pluginwindow.c;  ) > 2.0.0cvs59.patchset
+( cvs diff -u -r 1.94.2.76 -r 1.94.2.77 src/messageview.c;  cvs diff -u -r 1.204.2.76 -r 1.204.2.77 src/prefs_common.c;  cvs diff -u -r 1.103.2.41 -r 1.103.2.42 src/prefs_common.h;  cvs diff -u -r 1.1.2.11 -r 1.1.2.12 src/prefs_message.c;  ) > 2.0.0cvs60.patchset
index 7f211ed91e32e46412948ff71c07689d88e77e42..ee7c60d1eabf6f297e965245c9ae15ec1d09d9d8 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=59
+EXTRA_VERSION=60
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 52b3bb2733b4e878b923f92c0293bb2ad712f7d6..d4e84a36e7445856252f6e86a4b4ef2a48622394 100644 (file)
@@ -812,9 +812,11 @@ gint messageview_show(MessageView *messageview, MsgInfo *msginfo,
 
        mimeinfo = procmime_mimeinfo_next(mimeinfo);
        if (mimeinfo && (mimeinfo->type != MIMETYPE_TEXT || 
-           (strcmp(mimeinfo->subtype, "plain") &&
-            strcmp(mimeinfo->subtype, "html")))) {
-               mimeview_show_part(messageview->mimeview,mimeinfo);
+           strcmp(mimeinfo->subtype, "plain"))) {
+               if (strcmp(mimeinfo->subtype, "html"))
+                       mimeview_show_part(messageview->mimeview,mimeinfo);
+               else if (prefs_common.invoke_plugin_on_html)
+                       mimeview_show_part(messageview->mimeview,mimeinfo);
        }
 
        g_free(file);
index ca19532fceae831495bca48cbea6ab74bba8cde5..f1e455e578acef16eaacd7b4586b288093145deb 100644 (file)
@@ -508,6 +508,8 @@ static PrefParam param[] = {
         P_BOOL, NULL, NULL, NULL},
        {"render_html", "TRUE", &prefs_common.render_html, P_BOOL,
         NULL, NULL, NULL},
+       {"invoke_plugin_on_html", "FALSE", &prefs_common.invoke_plugin_on_html, P_BOOL,
+        NULL, NULL, NULL},
        {"line_space", "2", &prefs_common.line_space, P_INT,
         NULL, NULL, NULL},
 
index b8b422af446bcd3913734fbc21007ec8dc73dba8..5c4ff602e89e001cca41334ffe4052a447958d51 100644 (file)
@@ -242,6 +242,7 @@ struct _PrefsCommon
        gboolean display_xface;
        gint line_space;
        gboolean render_html;
+       gboolean invoke_plugin_on_html;
        gboolean textview_cursor_visible;
        gboolean enable_smooth_scroll;
        gint scroll_step;
index 0c51c584c4fba6e2f0cd7dd58e719b9aee32a561..03bda14d57defef0ea230c13bf8f0eedd1597e35 100644 (file)
@@ -51,6 +51,7 @@ typedef struct _MessagePage
        GtkWidget *chkbtn_dispxface;
 
        GtkWidget *chkbtn_html;
+       GtkWidget *chkbtn_html_plugin;
        GtkWidget *spinbtn_linespc;
 
        GtkWidget *chkbtn_smoothscroll;
@@ -83,6 +84,7 @@ void prefs_message_create_widget(PrefsPage *_page, GtkWindow *window,
 
        GtkWidget *button_edit_disphdr;
        GtkWidget *chkbtn_html;
+       GtkWidget *chkbtn_html_plugin;
        GtkWidget *hbox_linespc;
        GtkWidget *label_linespc;
        GtkObject *spinbtn_linespc_adj;
@@ -144,6 +146,9 @@ void prefs_message_create_widget(PrefsPage *_page, GtkWindow *window,
        PACK_CHECK_BUTTON(vbox2, chkbtn_html,
                          _("Render HTML messages as text"));
 
+       PACK_CHECK_BUTTON(vbox2, chkbtn_html_plugin,
+                         _("Render HTML-only messages with plugin if possible"));
+
        PACK_CHECK_BUTTON(vbox2, chkbtn_attach_desc,
                          _("Show attachment descriptions (rather than names)"));
 
@@ -223,6 +228,8 @@ void prefs_message_create_widget(PrefsPage *_page, GtkWindow *window,
                prefs_common.display_header);
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(chkbtn_html),
                prefs_common.render_html);
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(chkbtn_html_plugin),
+               prefs_common.invoke_plugin_on_html);
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(chkbtn_smoothscroll),
                prefs_common.enable_smooth_scroll);
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(chkbtn_halfpage),
@@ -239,6 +246,7 @@ void prefs_message_create_widget(PrefsPage *_page, GtkWindow *window,
        prefs_message->chkbtn_dispxface = chkbtn_dispxface;
        prefs_message->chkbtn_disphdr = chkbtn_disphdr;
        prefs_message->chkbtn_html = chkbtn_html;
+       prefs_message->chkbtn_html_plugin = chkbtn_html_plugin;
        prefs_message->spinbtn_linespc = spinbtn_linespc;
        prefs_message->chkbtn_smoothscroll = chkbtn_smoothscroll;
        prefs_message->spinbtn_scrollstep = spinbtn_scrollstep;
@@ -260,6 +268,8 @@ void prefs_message_save(PrefsPage *_page)
                GTK_TOGGLE_BUTTON(page->chkbtn_disphdr));
        prefs_common.render_html = gtk_toggle_button_get_active(
                GTK_TOGGLE_BUTTON(page->chkbtn_html));
+       prefs_common.invoke_plugin_on_html = gtk_toggle_button_get_active(
+               GTK_TOGGLE_BUTTON(page->chkbtn_html_plugin));
        prefs_common.enable_smooth_scroll = gtk_toggle_button_get_active(
                GTK_TOGGLE_BUTTON(page->chkbtn_smoothscroll));
        prefs_common.scroll_halfpage = gtk_toggle_button_get_active(