summaryrefslogtreecommitdiff
path: root/src/gui/chatwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/chatwindow.cpp')
-rw-r--r--src/gui/chatwindow.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index 29ce3bace..c266374ef 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -396,6 +396,22 @@ void ChatWindow::nextTab()
mChatTabs->setSelectedTab(tab);
}
+void ChatWindow::closeTab()
+{
+ if (!mChatTabs)
+ return;
+
+ int idx = mChatTabs->getSelectedTabIndex();
+ Tab *tab = mChatTabs->getTabByIndex(idx);
+ if (!tab)
+ return;
+ WhisperTab *whisper = dynamic_cast<WhisperTab*>(tab);
+ if (!whisper)
+ return;
+
+ whisper->handleCommand("close", "");
+}
+
void ChatWindow::defaultTab()
{
if (mChatTabs)