summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/chatwindow.cpp4
-rw-r--r--src/gui/windows/chatwindow.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index c3b78f066..4799f65f4 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -374,7 +374,7 @@ void ChatWindow::nextTab()
mChatTabs->setSelectedTabByIndex(tab);
}
-void ChatWindow::selectGeneralTab()
+void ChatWindow::selectTabByType(const ChatTabType::Type &type)
{
if (!mChatTabs)
return;
@@ -384,7 +384,7 @@ void ChatWindow::selectGeneralTab()
{
ChatTab *const tab = dynamic_cast<ChatTab*>(
mChatTabs->getTabByIndex(f));
- if (tab && tab->getType() == ChatTabType::INPUT)
+ if (tab && tab->getType() == type)
{
mChatTabs->setSelectedTab(tab);
break;
diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h
index d4dfa602d..df8ba8b06 100644
--- a/src/gui/windows/chatwindow.h
+++ b/src/gui/windows/chatwindow.h
@@ -29,6 +29,8 @@
#include "gui/widgets/window.h"
+#include "gui/widgets/tabs/chat/chattabtype.h"
+
#include "listeners/actionlistener.h"
#include "listeners/attributelistener.h"
#include "listeners/configlistener.h"
@@ -285,7 +287,7 @@ class ChatWindow final : public Window,
bool isTabPresent(const ChatTab *const tab) const A_WARN_UNUSED;
- void selectGeneralTab();
+ void selectTabByType(const ChatTabType::Type &type);
void attributeChanged(const int id,
const int oldVal,