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.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 49ef73907..c3b78f066 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -374,6 +374,24 @@ void ChatWindow::nextTab()
mChatTabs->setSelectedTabByIndex(tab);
}
+void ChatWindow::selectGeneralTab()
+{
+ if (!mChatTabs)
+ return;
+
+ int sz = mChatTabs->getNumberOfTabs();
+ for (int f = 0; f < sz; f ++)
+ {
+ ChatTab *const tab = dynamic_cast<ChatTab*>(
+ mChatTabs->getTabByIndex(f));
+ if (tab && tab->getType() == ChatTabType::INPUT)
+ {
+ mChatTabs->setSelectedTab(tab);
+ break;
+ }
+ }
+}
+
void ChatWindow::closeTab() const
{
if (!mChatTabs)