summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-09-03 15:07:47 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-09-03 19:06:29 (GMT)
commita0185934b0c929622c5526b84235b86cd44aad1d (patch)
tree2b377a5e8754c35e1a40fe7405dd75804e66fd73 /Swift/QtUI/MessageSnippet.cpp
parentfde15d66a75334b23ca8bbd56b44e33893c813c4 (diff)
downloadswift-a0185934b0c929622c5526b84235b86cd44aad1d.zip
swift-a0185934b0c929622c5526b84235b86cd44aad1d.tar.bz2
XEP-0198 Ack support in the UI
Resolves: #7
Diffstat (limited to 'Swift/QtUI/MessageSnippet.cpp')
-rw-r--r--Swift/QtUI/MessageSnippet.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Swift/QtUI/MessageSnippet.cpp b/Swift/QtUI/MessageSnippet.cpp
index 0159386..1c8ddca 100644
--- a/Swift/QtUI/MessageSnippet.cpp
+++ b/Swift/QtUI/MessageSnippet.cpp
@@ -11,7 +11,7 @@
namespace Swift {
-MessageSnippet::MessageSnippet(const QString& message, const QString& sender, const QDateTime& time, const QString& iconURI, bool isIncoming, bool appendToPrevious, QtChatTheme* theme) : ChatSnippet(appendToPrevious) {
+MessageSnippet::MessageSnippet(const QString& message, const QString& sender, const QDateTime& time, const QString& iconURI, bool isIncoming, bool appendToPrevious, QtChatTheme* theme, const QString& id) : ChatSnippet(appendToPrevious) {
if (isIncoming) {
if (appendToPrevious) {
content_ = theme->getIncomingNextContent();
@@ -29,10 +29,11 @@ MessageSnippet::MessageSnippet(const QString& message, const QString& sender, co
}
}
- content_.replace("%message%", "<span class='swift_message'>" + escape(message) + "</span>");
+ content_.replace("%message%", "<span class='swift_ack'></span><span class='swift_message'>" + escape(message) + "</span>");
content_.replace("%sender%", escape(sender));
content_.replace("%time%", "<span class='swift_time'>" + escape(time.toString("h:mm")) + "</span>");
content_.replace("%userIconPath%", escape(iconURI));
+ content_ = "<div id='" + id + "'>" + content_ + "</div>";
}
MessageSnippet::~MessageSnippet() {