summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalin Badea <catalin.badea392@gmail.com>2012-04-13 19:52:51 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-04-14 15:45:03 (GMT)
commit54aad4467142079f74471da6396ad31c9df389df (patch)
treef4af60c5cf308e17e750afa71c5bb14c941fa0cc /Swift/QtUI/QtChatWindow.h
parentd4517116fc71d1b2d5967004757630293613e928 (diff)
downloadswift-contrib-54aad4467142079f74471da6396ad31c9df389df.zip
swift-contrib-54aad4467142079f74471da6396ad31c9df389df.tar.bz2
Fix correction from breaking /me actions
Check if the new message is an action when using correct last message. Resolves: #1053 License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
Diffstat (limited to 'Swift/QtUI/QtChatWindow.h')
-rw-r--r--Swift/QtUI/QtChatWindow.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Swift/QtUI/QtChatWindow.h b/Swift/QtUI/QtChatWindow.h
index 9db1884..1d1959d 100644
--- a/Swift/QtUI/QtChatWindow.h
+++ b/Swift/QtUI/QtChatWindow.h
@@ -48,18 +48,19 @@ namespace Swift {
public:
QtChatWindow(const QString &contact, QtChatTheme* theme, UIEventStream* eventStream, SettingsProvider* settings);
~QtChatWindow();
std::string addMessage(const std::string &message, const std::string &senderName, bool senderIsSelf, boost::shared_ptr<SecurityLabel> label, const std::string& avatarPath, const boost::posix_time::ptime& time);
std::string addAction(const std::string &message, const std::string &senderName, bool senderIsSelf, boost::shared_ptr<SecurityLabel> label, const std::string& avatarPath, const boost::posix_time::ptime& time);
void addSystemMessage(const std::string& message);
void addPresenceMessage(const std::string& message);
void addErrorMessage(const std::string& errorMessage);
void replaceMessage(const std::string& message, const std::string& id, const boost::posix_time::ptime& time);
+ void replaceWithAction(const std::string& message, const std::string& id, const boost::posix_time::ptime& time);
// File transfer related stuff
std::string addFileTransfer(const std::string& senderName, bool senderIsSelf, const std::string& filename, const boost::uintmax_t sizeInBytes);
void setFileTransferProgress(std::string id, const int percentageDone);
void setFileTransferStatus(std::string id, const FileTransferState state, const std::string& msg);
void show();
void activate();
void setUnreadMessageCount(int count);
void convertToMUC();
@@ -138,18 +139,19 @@ namespace Swift {
PreviousMessageWasMUCInvite
};
private:
void updateTitleWithUnreadCount();
void tabComplete();
void beginCorrection();
void cancelCorrection();
std::string addMessage(const std::string &message, const std::string &senderName, bool senderIsSelf, boost::shared_ptr<SecurityLabel> label, const std::string& avatarPath, const QString& style, const boost::posix_time::ptime& time);
+ void replaceMessage(const std::string& message, const std::string& id, const boost::posix_time::ptime& time, const QString& style);
void handleOccupantSelectionChanged(RosterItem* item);
bool appendToPreviousCheck(PreviousMessageKind messageKind, const std::string& senderName, bool senderIsSelf) const;
int unreadCount_;
bool contactIsTyping_;
LastLineTracker lastLineTracker_;
QString contact_;
QString lastSentMessage_;
QTextCursor tabCompleteCursor_;