summaryrefslogtreecommitdiff
path: root/src/gui/windows/chatwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows/chatwindow.cpp')
-rw-r--r--src/gui/windows/chatwindow.cpp9
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);
}
}