summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-05 15:34:11 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-05 16:25:18 +0300
commit08d5f2d6f3eeded6d7a2e1adcf94e850098aa85f (patch)
tree7cd9be72ab884387173b2aaaa6421ebba7be1ed4 /src/gui/windows
parent05a196194b8270c1ae2e63f8ae31f8a492022388 (diff)
downloadplus-08d5f2d6f3eeded6d7a2e1adcf94e850098aa85f.tar.gz
plus-08d5f2d6f3eeded6d7a2e1adcf94e850098aa85f.tar.bz2
plus-08d5f2d6f3eeded6d7a2e1adcf94e850098aa85f.tar.xz
plus-08d5f2d6f3eeded6d7a2e1adcf94e850098aa85f.zip
On room creation show room name in general tab caption.
Not allow move if in room.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/chatwindow.cpp17
-rw-r--r--src/gui/windows/chatwindow.h5
2 files changed, 13 insertions, 9 deletions
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);
+}
diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h
index 33d6a89bd..479d7db6a 100644
--- a/src/gui/windows/chatwindow.h
+++ b/src/gui/windows/chatwindow.h
@@ -199,9 +199,6 @@ class ChatWindow final : public Window,
WhisperTab *getWhisperTab(const std::string &nick) const A_WARN_UNUSED;
- ChatTab *addChatRoomTab(const std::string &name,
- const bool switchTo = false);
-
ChatTab *addChannelTab(const std::string &name,
const bool switchTo = false);
@@ -212,6 +209,8 @@ class ChatWindow final : public Window,
const bool switchTo,
const bool join) A_WARN_UNUSED;
+ void joinRoom(const bool isJoin);
+
void removeAllWhispers();
void removeAllChannels();