diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-08 18:01:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-08 18:01:40 +0300 |
commit | 6303e605ef23003aabace85cde3f04574f1fb05c (patch) | |
tree | 6c9477f7314e4d371081473d7b96503b47573dea /src/gui/windows | |
parent | 568cd6279a753b1f04afb08a9193ab0873bf8e53 (diff) | |
download | manaverse-6303e605ef23003aabace85cde3f04574f1fb05c.tar.gz manaverse-6303e605ef23003aabace85cde3f04574f1fb05c.tar.bz2 manaverse-6303e605ef23003aabace85cde3f04574f1fb05c.tar.xz manaverse-6303e605ef23003aabace85cde3f04574f1fb05c.zip |
In whisper constructor allow separatly set nick and caption.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 9 | ||||
-rw-r--r-- | src/gui/windows/chatwindow.h | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index dae1c86b2..524256dd4 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -1047,7 +1047,7 @@ void ChatWindow::addWhisper(const std::string &restrict nick, } else if (config.getBoolValue("whispertab")) { - tab = addWhisperTab(nick); + tab = addWhisperTab(nick, nick); if (tab) saveState(); } @@ -1113,7 +1113,8 @@ void ChatWindow::addWhisper(const std::string &restrict nick, } } -WhisperTab *ChatWindow::addWhisperTab(const std::string &nick, +WhisperTab *ChatWindow::addWhisperTab(const std::string &caption, + const std::string &nick, const bool switchTo) { if (!localPlayer) @@ -1137,7 +1138,7 @@ WhisperTab *ChatWindow::addWhisperTab(const std::string &nick, } else { - ret = new WhisperTab(this, nick); + ret = new WhisperTab(this, caption, nick); if (gui && !player_relations.isGoodName(nick)) ret->setLabelFont(gui->getSecureFont()); mWhispers[tempNick] = ret; @@ -1216,7 +1217,7 @@ ChatTab *ChatWindow::addChatTab(const std::string &name, } else { - return addWhisperTab(name, switchTo); + return addWhisperTab(name, name, switchTo); } } diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h index a2b1781bf..a6bf15384 100644 --- a/src/gui/windows/chatwindow.h +++ b/src/gui/windows/chatwindow.h @@ -194,7 +194,8 @@ class ChatWindow final : public Window, const std::string &restrict mes, const ChatMsgType::Type own = ChatMsgType::BY_OTHER); - WhisperTab *addWhisperTab(const std::string &nick, + WhisperTab *addWhisperTab(const std::string &caption, + const std::string &nick, const bool switchTo = false) A_WARN_UNUSED; WhisperTab *getWhisperTab(const std::string &nick) const A_WARN_UNUSED; |