diff options
Diffstat (limited to 'Swift/QtUI/SystemMessageSnippet.cpp')
-rw-r--r-- | Swift/QtUI/SystemMessageSnippet.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Swift/QtUI/SystemMessageSnippet.cpp b/Swift/QtUI/SystemMessageSnippet.cpp index 28bf5d2..e752e32 100644 --- a/Swift/QtUI/SystemMessageSnippet.cpp +++ b/Swift/QtUI/SystemMessageSnippet.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Isode Limited. + * Copyright (c) 2010-2015 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -10,9 +10,9 @@ namespace Swift { -SystemMessageSnippet::SystemMessageSnippet(const QString& message, const QDateTime& time, bool appendToPrevious, QtChatTheme* theme, Direction direction) : ChatSnippet(appendToPrevious) { +SystemMessageSnippet::SystemMessageSnippet(const QString& message, const QDateTime& time, bool appendToPrevious, QtChatTheme* theme, const QString& id, Direction direction) : ChatSnippet(appendToPrevious) { if (appendToPrevious) { - setContinuationFallbackSnippet(boost::shared_ptr<ChatSnippet>(new SystemMessageSnippet(message, time, false, theme, direction))); + setContinuationFallbackSnippet(boost::shared_ptr<ChatSnippet>(new SystemMessageSnippet(message, time, false, theme, id, direction))); } content_ = theme->getStatus(); @@ -20,6 +20,7 @@ SystemMessageSnippet::SystemMessageSnippet(const QString& message, const QDateTi content_.replace("%message%", wrapResizable("<span class='swift_message'>" + escape(message) + "</span>")); content_.replace("%shortTime%", wrapResizable(escape(time.toString("h:mm")))); content_.replace("%time%", wrapResizable("<span class='swift_time'>" + timeToEscapedString(time) + "</span>")); + content_ = QString("<div id='%1'>%2</div>").arg(id).arg(content_); } SystemMessageSnippet::~SystemMessageSnippet() { |