[Xfce4-commits] <postler:master> Render only project mail and text attachments monospace

Christian Dywan noreply at xfce.org
Thu Jun 9 04:04:02 CEST 2011


Updating branch refs/heads/master
         to a1d3414957880dad1840198acab52f13f89ed6bd (commit)
       from 9ca1be402e62c521e60973ae847ce7e659653e51 (commit)

commit a1d3414957880dad1840198acab52f13f89ed6bd
Author: Christian Dywan <christian at twotoasts.de>
Date:   Wed Jun 8 22:27:38 2011 +0200

    Render only project mail and text attachments monospace

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

diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index 3fdc5cd..c2776ae 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -930,7 +930,7 @@ public class Postler.Content : WebKit.WebView {
         bool in_signature = false;
         int in_quote = 0;
 
-        var new_body = new StringBuilder ("<span class=\"plain_text\">");
+        var new_body = new StringBuilder ("");
         foreach (string line in body.split ("<br>")) {
             /* Looks like a signature */
             if (in_signature && line[0] == '\0') {
@@ -978,7 +978,6 @@ public class Postler.Content : WebKit.WebView {
                 line = line.substring (1);
             new_body.append (line + "<br>");
         }
-        new_body.append ("</span>");
         return new_body.str;
     }
 
@@ -1017,6 +1016,9 @@ public class Postler.Content : WebKit.WebView {
             body_chunk = render_plain_text (message_part.body.str);
             if (html_part != null)
                 html_or_text = "<a href=\"#html\">" + _("View as HTML") + "</a>";
+            if (message.project != null)
+                body_chunk = "<p><span class=\"plain_text\">%s</span>".
+                    printf (body_chunk);
         }
         else {
             body_chunk = """
@@ -1078,7 +1080,7 @@ public class Postler.Content : WebKit.WebView {
                 %s
                 </span>
                 </span>
-                <p class="body" style="%s">%s</p>
+                <p class="body">%s</p>
                 """.
                 printf (themed_style_sheet (),
                         format_date (message.date),
@@ -1098,7 +1100,6 @@ public class Postler.Content : WebKit.WebView {
                         format_header (_("Application:"), message.application),
                         format_header (_("Unsubscribe:"), list_unsubscribe),
                         html_or_text,
-                        message_part.plain_text ? "font-family: Monospace;" : "",
                         body_chunk),
                 "text/html", "UTF-8", "about:blank");
         } catch (GLib.Error contents_error) {



More information about the Xfce4-commits mailing list