diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-15 12:59:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-15 12:59:29 +0300 |
commit | ab92ecc43d1b4d62e2ef3ac95c337dcee5f5fcc6 (patch) | |
tree | 1fc12b7dbe75471b4262483c36c13cc89f45facf /src/gui/widgets/tabs/chattab.cpp | |
parent | 324a3df386950a6f262f2382caa33177f085c03f (diff) | |
download | manaplus-ab92ecc43d1b4d62e2ef3ac95c337dcee5f5fcc6.tar.gz manaplus-ab92ecc43d1b4d62e2ef3ac95c337dcee5f5fcc6.tar.bz2 manaplus-ab92ecc43d1b4d62e2ef3ac95c337dcee5f5fcc6.tar.xz manaplus-ab92ecc43d1b4d62e2ef3ac95c337dcee5f5fcc6.zip |
Move chat tab types into separate file.
Diffstat (limited to 'src/gui/widgets/tabs/chattab.cpp')
-rw-r--r-- | src/gui/widgets/tabs/chattab.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gui/widgets/tabs/chattab.cpp b/src/gui/widgets/tabs/chattab.cpp index e52f935b3..fccc421ae 100644 --- a/src/gui/widgets/tabs/chattab.cpp +++ b/src/gui/widgets/tabs/chattab.cpp @@ -38,6 +38,8 @@ #include "gui/widgets/itemlinkhandler.h" #include "gui/widgets/tabbedarea.h" +#include "gui/widgets/tabs/chattabtype.h" + #include "net/chathandler.h" #include "net/net.h" @@ -276,8 +278,8 @@ void ChatTab::chatLog(std::string line, Own own, mScrollArea->logic(); if (own != BY_PLAYER) { - if (own == BY_SERVER && (getType() == TAB_PARTY - || getType() == TAB_GUILD)) + if (own == BY_SERVER && (getType() == ChatTabType::PARTY + || getType() == ChatTabType::GUILD)) { return; } @@ -446,11 +448,11 @@ void ChatTab::saveToLogFile(const std::string &msg) const { if (chatLogger) { - if (getType() == TAB_INPUT) + if (getType() == ChatTabType::INPUT) { chatLogger->log(msg); } - else if (getType() == TAB_DEBUG + else if (getType() == ChatTabType::DEBUG && config.getBoolValue("enableDebugLog")) { chatLogger->log("#Debug", msg); @@ -461,11 +463,11 @@ void ChatTab::saveToLogFile(const std::string &msg) const int ChatTab::getType() const { if (getCaption() == "General" || getCaption() == _("General")) - return TAB_INPUT; + return ChatTabType::INPUT; else if (getCaption() == "Debug" || getCaption() == _("Debug")) - return TAB_DEBUG; + return ChatTabType::DEBUG; else - return TAB_UNKNOWN; + return ChatTabType::UNKNOWN; } void ChatTab::addRow(std::string &line) |