From 2b6198dc9c4a52094bad3b39dbfb06c168a55ca2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 12 Oct 2014 15:21:51 +0300 Subject: Move chat tab type into ChatTab. --- src/gui/widgets/tabs/chat/chattab.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'src/gui/widgets/tabs/chat/chattab.cpp') diff --git a/src/gui/widgets/tabs/chat/chattab.cpp b/src/gui/widgets/tabs/chat/chattab.cpp index 88df68774..783df0416 100644 --- a/src/gui/widgets/tabs/chat/chattab.cpp +++ b/src/gui/widgets/tabs/chat/chattab.cpp @@ -40,8 +40,6 @@ #include "gui/widgets/itemlinkhandler.h" #include "gui/widgets/tabbedarea.h" -#include "gui/widgets/tabs/chat/chattabtype.h" - #include "input/inputmanager.h" #include "net/chathandler.h" @@ -63,12 +61,14 @@ static const unsigned int MAX_WORD_SIZE = 50; ChatTab::ChatTab(const Widget2 *const widget, const std::string &name, - const std::string &channel) : + const std::string &channel, + const ChatTabType::Type &type) : Tab(widget), mTextOutput(new BrowserBox(this, BrowserBox::AUTO_WRAP, true, "browserbox.xml")), mScrollArea(new ScrollArea(this, mTextOutput, false)), mChannelName(channel), + mType(type), mAllowHightlight(true), mRemoveNames(false), mNoAway(false), @@ -477,16 +477,6 @@ void ChatTab::saveToLogFile(const std::string &msg) const } } -int ChatTab::getType() const -{ - if (getCaption() == "General" || getCaption() == _("General")) - return ChatTabType::INPUT; - else if (getCaption() == "Debug" || getCaption() == _("Debug")) - return ChatTabType::DEBUG; - else - return ChatTabType::UNKNOWN; -} - void ChatTab::addRow(std::string &line) { if (line.find("[@@http") == std::string::npos) -- cgit v1.2.3-60-g2f50