summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs/chat/chattab.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-12 15:21:51 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-12 15:21:51 +0300
commit2b6198dc9c4a52094bad3b39dbfb06c168a55ca2 (patch)
treeec5e1ca6e69e81e05ade883bfe644deb6d19c1ef /src/gui/widgets/tabs/chat/chattab.cpp
parent6cbd617a811b85f7685266907b129180134620b8 (diff)
downloadmanaverse-2b6198dc9c4a52094bad3b39dbfb06c168a55ca2.tar.gz
manaverse-2b6198dc9c4a52094bad3b39dbfb06c168a55ca2.tar.bz2
manaverse-2b6198dc9c4a52094bad3b39dbfb06c168a55ca2.tar.xz
manaverse-2b6198dc9c4a52094bad3b39dbfb06c168a55ca2.zip
Move chat tab type into ChatTab.
Diffstat (limited to 'src/gui/widgets/tabs/chat/chattab.cpp')
-rw-r--r--src/gui/widgets/tabs/chat/chattab.cpp16
1 files changed, 3 insertions, 13 deletions
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)