diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-08-29 22:32:59 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-08-30 14:53:32 (GMT) |
commit | b9b535ffd46382c413504a1781400c1a554e04a8 (patch) | |
tree | 723b1e948930478e0324c374f74f1fabc88699ec /Swift/QtUI/MessageSnippet.cpp | |
parent | 5546afc2bbf8ab0fd49647150da7a5f3df01deaf (diff) | |
download | swift-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.cpp | 14 |
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() { + +} + } |