[Xfce4-commits] <postler:master> Don't use source mode for viewing source

Christian Dywan noreply at xfce.org
Thu Apr 21 03:52:02 CEST 2011


Updating branch refs/heads/master
         to 73ffc658d7e2e7b564595edee6b6dbb38e6c852d (commit)
       from 10dcbfd70fb893495385945ad514dc68353c9663 (commit)

commit 73ffc658d7e2e7b564595edee6b6dbb38e6c852d
Author: Christian Dywan <christian at twotoasts.de>
Date:   Thu Apr 21 02:56:30 2011 +0200

    Don't use source mode for viewing source

 postler/postler-content.vala |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index 4ba1f33..ecaa354 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -671,10 +671,13 @@ public class Postler.Content : WebKit.WebView {
         string? fname = null;
         parse_content_type (content_type, ref charset, ref boundary,
                             ref mime_type, ref fname);
-        set_view_source_mode (true);
-        load_string ("<style text=\"text/css\">%s</style><body>%s</body>"
-            .printf (themed_style_sheet (), body.str),
-            "text/plain", charset, "about:blank");
+        load_string ("""
+            <style text="text/css">
+            %s * { white-space: pre-wrap !important; }</style>
+            </style><body>%s</body>
+            """.
+            printf (themed_style_sheet (), body.str),
+            "text/html", charset, "about:blank");
     }
 
     string selected_address () {



More information about the Xfce4-commits mailing list