aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-03-16 10:54:29 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-03-16 10:54:29 +0000
commit55a20f917d20a3c255c33063bb38347146205b6d (patch)
treedd1b991a9e06e9f8a2b8e688c0b31ccc4269d13b /src
parentb3ac92fc0bc5bdca7c8a73d6041be760df347dda (diff)
added an option whether to render HTML as text or not.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@177 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/prefs_common.c9
-rw-r--r--src/prefs_common.h1
-rw-r--r--src/textview.c3
3 files changed, 12 insertions, 1 deletions
diff --git a/src/prefs_common.c b/src/prefs_common.c
index 7c83ace8..372ac3d3 100644
--- a/src/prefs_common.c
+++ b/src/prefs_common.c
@@ -136,6 +136,7 @@ static struct Message {
GtkWidget *chkbtn_mbalnum;
GtkWidget *chkbtn_disphdrpane;
GtkWidget *chkbtn_disphdr;
+ GtkWidget *chkbtn_html;
GtkWidget *spinbtn_linespc;
GtkObject *spinbtn_linespc_adj;
@@ -526,6 +527,9 @@ static PrefParam param[] = {
{"display_header", "TRUE", &prefs_common.display_header, P_BOOL,
&message.chkbtn_disphdr,
prefs_set_data_from_toggle, prefs_set_toggle},
+ {"render_html", "TRUE", &prefs_common.render_html, P_BOOL,
+ &message.chkbtn_html,
+ prefs_set_data_from_toggle, prefs_set_toggle},
{"line_space", "2", &prefs_common.line_space, P_INT,
&message.spinbtn_linespc,
prefs_set_data_from_spinbtn, prefs_set_spinbtn},
@@ -1686,6 +1690,7 @@ static void prefs_message_create(void)
GtkWidget *chkbtn_disphdrpane;
GtkWidget *chkbtn_disphdr;
GtkWidget *button_edit_disphdr;
+ GtkWidget *chkbtn_html;
GtkWidget *hbox_linespc;
GtkWidget *label_linespc;
GtkObject *spinbtn_linespc_adj;
@@ -1757,6 +1762,9 @@ static void prefs_message_create(void)
SET_TOGGLE_SENSITIVITY(chkbtn_disphdr, button_edit_disphdr);
+ PACK_CHECK_BUTTON(vbox2, chkbtn_html,
+ _("Render HTML messages as text"));
+
PACK_VSPACER(vbox2, vbox3, VSPACING_NARROW_2);
hbox1 = gtk_hbox_new (FALSE, 32);
@@ -1842,6 +1850,7 @@ static void prefs_message_create(void)
message.chkbtn_mbalnum = chkbtn_mbalnum;
message.chkbtn_disphdrpane = chkbtn_disphdrpane;
message.chkbtn_disphdr = chkbtn_disphdr;
+ message.chkbtn_html = chkbtn_html;
message.spinbtn_linespc = spinbtn_linespc;
message.chkbtn_smoothscroll = chkbtn_smoothscroll;
diff --git a/src/prefs_common.h b/src/prefs_common.h
index 259410a3..4af69a15 100644
--- a/src/prefs_common.h
+++ b/src/prefs_common.h
@@ -165,6 +165,7 @@ struct _PrefsCommon
gboolean display_header_pane;
gboolean display_header;
gint line_space;
+ gboolean render_html;
gboolean enable_smooth_scroll;
gint scroll_step;
gboolean scroll_halfpage;
diff --git a/src/textview.c b/src/textview.c
index 8ad0eff1..64480161 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -713,7 +713,8 @@ static void textview_write_body(TextView *textview, MimeInfo *mimeinfo,
tmpfp = procmime_decode_content(NULL, fp, mimeinfo);
if (tmpfp) {
- if (mimeinfo->mime_type == MIME_TEXT_HTML)
+ if (mimeinfo->mime_type == MIME_TEXT_HTML &&
+ prefs_common.render_html)
textview_show_html(textview, tmpfp, conv);
else
while (fgets(buf, sizeof(buf), tmpfp) != NULL)