diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/chat.cpp | 8 | ||||
-rw-r--r-- | src/gui/chat.h | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index 7faf9bda..54b388db 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -454,7 +454,7 @@ void ChatWindow::whisper(const std::string &nick, std::string mes, bool own) } } -ChatTab *ChatWindow::addWhisperTab(const std::string &nick) +ChatTab *ChatWindow::addWhisperTab(const std::string &nick, bool switchTo) { std::string playerName = player_node->getName(); std::string tempNick = nick; @@ -465,5 +465,9 @@ ChatTab *ChatWindow::addWhisperTab(const std::string &nick) if (mWhispers[tempNick] || tempNick.compare(playerName) == 0) return NULL; - return mWhispers[tempNick] = new WhisperTab(nick); + ChatTab *ret = mWhispers[tempNick] = new WhisperTab(nick); + + mChatTabs->setSelectedTab(ret); + + return ret; } diff --git a/src/gui/chat.h b/src/gui/chat.h index 21f80f13..88dabb89 100644 --- a/src/gui/chat.h +++ b/src/gui/chat.h @@ -174,7 +174,7 @@ class ChatWindow : public Window, void whisper(const std::string &nick, std::string mes, bool own = false); - ChatTab *addWhisperTab(const std::string &nick); + ChatTab *addWhisperTab(const std::string &nick, bool switchTo = false); protected: friend class ChatTab; |