From 08d5f2d6f3eeded6d7a2e1adcf94e850098aa85f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 5 Apr 2015 15:34:11 +0300 Subject: On room creation show room name in general tab caption. Not allow move if in room. --- src/gui/windows/chatwindow.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/gui/windows/chatwindow.cpp') diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index 2c1f580ad..853d2a51c 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -1219,12 +1219,6 @@ ChatTab *ChatWindow::addSpecialChannelTab(const std::string &name, return ret; } -ChatTab *ChatWindow::addChatRoomTab(const std::string &name, - const bool switchTo) -{ - return nullptr; -} - ChatTab *ChatWindow::addChannelTab(const std::string &name, const bool switchTo) { @@ -2132,3 +2126,14 @@ void ChatWindow::debugMessage(const std::string &msg) if (debugChatTab) debugChatTab->chatLog(msg, ChatMsgType::BY_SERVER); } + +void ChatWindow::joinRoom(const bool isJoin) +{ + Tab *const tab = mChatTabs->getTabByIndex(0); + std::string name; + if (isJoin) + name = PlayerInfo::getRoomName(); + else + name = _("General"); + tab->setCaption(name); +} -- cgit v1.2.3-70-g09d2