summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-08-29 22:32:59 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-08-30 14:53:32 (GMT)
commitb9b535ffd46382c413504a1781400c1a554e04a8 (patch)
tree723b1e948930478e0324c374f74f1fabc88699ec /Swift/QtUI/MessageSnippet.cpp
parent5546afc2bbf8ab0fd49647150da7a5f3df01deaf (diff)
downloadswift-b9b535ffd46382c413504a1781400c1a554e04a8.zip
swift-b9b535ffd46382c413504a1781400c1a554e04a8.tar.bz2
Render the Chat view directly with DOM commands, not javascript.
Tested locally, but it's conceivable there will be regressions.
Diffstat (limited to 'Swift/QtUI/MessageSnippet.cpp')
-rw-r--r--Swift/QtUI/MessageSnippet.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/Swift/QtUI/MessageSnippet.cpp b/Swift/QtUI/MessageSnippet.cpp
index 995248a..ebcc829 100644
--- a/Swift/QtUI/MessageSnippet.cpp
+++ b/Swift/QtUI/MessageSnippet.cpp
@@ -11,21 +11,21 @@
namespace Swift {
-MessageSnippet::MessageSnippet(const QString& message, const QString& sender, const QDateTime& time, const QString& iconURI, bool isIncoming, bool appendToPrevious) : ChatSnippet(appendToPrevious) {
+MessageSnippet::MessageSnippet(const QString& message, const QString& sender, const QDateTime& time, const QString& iconURI, bool isIncoming, bool appendToPrevious, QtChatTheme* theme) : ChatSnippet(appendToPrevious) {
if (isIncoming) {
if (appendToPrevious) {
- content_ = loadTemplate(":/themes/Default/Incoming/NextContent.html");
+ content_ = theme->getIncomingNextContent();
}
else {
- content_ = loadTemplate(":/themes/Default/Incoming/Content.html");
+ content_ = theme->getIncomingContent();
}
}
else {
if (appendToPrevious) {
- content_ = loadTemplate(":/themes/Default/Outgoing/NextContent.html");
+ content_ = theme->getOutgoingNextContent();
}
else {
- content_ = loadTemplate(":/themes/Default/Outgoing/Content.html");
+ content_ = theme->getOutgoingContent();
}
}
@@ -35,4 +35,8 @@ MessageSnippet::MessageSnippet(const QString& message, const QString& sender, co
content_.replace("%userIconPath%", escape(iconURI));
}
+MessageSnippet::~MessageSnippet() {
+
+}
+
}