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/chatwindow.cpp | |
parent | 568cd6279a753b1f04afb08a9193ab0873bf8e53 (diff) | |
download | plus-6303e605ef23003aabace85cde3f04574f1fb05c.tar.gz plus-6303e605ef23003aabace85cde3f04574f1fb05c.tar.bz2 plus-6303e605ef23003aabace85cde3f04574f1fb05c.tar.xz plus-6303e605ef23003aabace85cde3f04574f1fb05c.zip |
In whisper constructor allow separatly set nick and caption.
Diffstat (limited to 'src/gui/windows/chatwindow.cpp')
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 9 |
1 files changed, 5 insertions, 4 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); } } |