[Xfce4-commits] <postler:master> Introduce a separate is_bug_tracker flag

Christian Dywan noreply at xfce.org
Wed Jul 20 23:30:01 CEST 2011


Updating branch refs/heads/master
         to 8b036724492c2cfbe67a0bb56237aea0aa27af2c (commit)
       from 25fc2958f078051bac8d71362c67a47dc932de07 (commit)

commit 8b036724492c2cfbe67a0bb56237aea0aa27af2c
Author: Christian Dywan <christian at twotoasts.de>
Date:   Wed Jul 20 23:25:32 2011 +0200

    Introduce a separate is_bug_tracker flag
    
    Since project includes other notfications now we
    need a new way to distinguish these.

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

diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index d28d6c5..a790213 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -775,7 +775,7 @@ public class Postler.Content : WebKit.WebView {
                 if (html_part != null)
                     reply_chunk.append (html_part.body.str);
                 else if (text_part != null)
-                    reply_chunk.append (render_plain_text (text_part.body.str, child.project));
+                    reply_chunk.append (render_plain_text (text_part.body.str, child));
                 else
                     reply_chunk.append (child.parts.nth_data (0).body.str);
 
@@ -917,13 +917,13 @@ public class Postler.Content : WebKit.WebView {
         return false;
     }
 
-    string render_plain_text (string body, string? project) {
+    string render_plain_text (string body, Message message) {
         bool in_signature = false;
         int in_quote = 0;
         int quoted_line_count = 0;
 
         var new_body = new StringBuilder ("");
-        if (project != null)
+        if (message.is_bug_tracker)
             new_body.append ("<span class=\"plain_text no_signature\">");
         foreach (string line in body.split ("<br>")) {
             /* Looks like a signature */
@@ -984,7 +984,7 @@ public class Postler.Content : WebKit.WebView {
             if (line.contains ("blockquote>") || quoted_line_count < 5)
                 new_body.append (line + "<br>");
         }
-        if (project != null)
+        if (message.is_bug_tracker)
             new_body.append ("</span");
 
         /* Linkify */



More information about the Xfce4-commits mailing list