[Xfce4-commits] <postler:master> Wrap Adium theme classes around markup as span
Christian Dywan
noreply at xfce.org
Sat Jul 2 23:58:01 CEST 2011
Updating branch refs/heads/master
to 24e536cfe6b6a53da4a22b884f2466951f8e61bb (commit)
from 8685dd1d6eb6bd2854cd8b6c6e0d24a1ae4d6adc (commit)
commit 24e536cfe6b6a53da4a22b884f2466951f8e61bb
Author: Christian Dywan <christian at twotoasts.de>
Date: Sat Jul 2 23:56:55 2011 +0200
Wrap Adium theme classes around markup as span
postler/postler-content.vala | 27 ++++++++++++---------------
1 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index abb7ca8..9d06144 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -789,11 +789,15 @@ public class Postler.Content : WebKit.WebView {
reply_uri (child, "Re: "), _("Reply"),
reply_uri (child, "Fw: "), _("Forward")));
- string reply_markup;
+ string reply_markup = reply_chunk.str;
+ /* The extra class importantMessage is Postler-specific */
+ if (child.priority)
+ reply_markup = "<span class=\"importantMessage\">%s</span>".printf (
+ reply_markup);
if (sender_name == _("You"))
- reply_markup = outgoing_template.replace ("%message%", reply_chunk.str);
+ reply_markup = outgoing_template.replace ("%message%", reply_markup);
else
- reply_markup = content_template.replace ("%message%", reply_chunk.str);
+ reply_markup = content_template.replace ("%message%", reply_markup);
reply_markup = reply_markup.replace ("\"%sender%\"", ("\"" + child.sender + "\""));
/* Do inherit colors, to match Adium and Empathy */
reply_markup = reply_markup.replace ("%sender%", linkify_address (child.sender, true));
@@ -803,13 +807,6 @@ public class Postler.Content : WebKit.WebView {
avatar_uri = child.avatar.get_uri ();
}
reply_markup = reply_markup.replace ("%userIconPath%", avatar_uri);
- /* The extra class importantMessage is Postler-specific */
- if (child.priority) {
- reply_markup = reply_markup.replace ("importantMessage",
- "incomingItem importantMessage");
- reply_markup = reply_markup.replace ("importantMessage",
- "outgoingItem importantMessage");
- }
foreach (var attachment_part in child.parts) {
if (attachment_part != html_part && attachment_part != text_part
@@ -818,15 +815,15 @@ public class Postler.Content : WebKit.WebView {
/* The extra class attachmentMessage is Postler-specific */
if (next_content_template != null) {
reply_markup = reply_markup.replace (
- "<span id=\"insert\"></span>", next_content_template);
- reply_markup = reply_markup.replace ("followUp",
- "followUp attachmentMessage");
+ "<span id=\"insert\"></span>",
+ "<span class=\"attachmentMessage\">%s</span>".printf (
+ next_content_template));
reply_markup = reply_markup.replace ("%sender%", "");
reply_markup = reply_markup.replace ("%time{%X}%", "");
}
else {
- reply_markup += status_template.replace ("statusMessage",
- "statusMessage attachmentMessage");
+ reply_markup += "<span class=\"attachmentMessage\">%s</span>".printf (
+ status_template);
reply_markup = reply_markup.replace ("%time%", "");
}
reply_markup = reply_markup.replace ("%message%",
More information about the Xfce4-commits
mailing list