summaryrefslogtreecommitdiff
path: root/src/gui/windows/chatwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-24 22:04:29 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-24 22:04:29 +0300
commit7ae8a11e0e99ab28730a8ca98388a6ec0ea1923e (patch)
tree6b440c246a9ed2c3d915c98f6b090a45673a2fb7 /src/gui/windows/chatwindow.cpp
parent860d3e8e1bbe99b77763d533aebba9fde01e74c6 (diff)
downloadmanaverse-7ae8a11e0e99ab28730a8ca98388a6ec0ea1923e.tar.gz
manaverse-7ae8a11e0e99ab28730a8ca98388a6ec0ea1923e.tar.bz2
manaverse-7ae8a11e0e99ab28730a8ca98388a6ec0ea1923e.tar.xz
manaverse-7ae8a11e0e99ab28730a8ca98388a6ec0ea1923e.zip
Add strong typed bool type TryRemoveColors.
Diffstat (limited to 'src/gui/windows/chatwindow.cpp')
-rw-r--r--src/gui/windows/chatwindow.cpp34
1 files changed, 22 insertions, 12 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 44053c50c..178f41c7e 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -1509,7 +1509,7 @@ bool ChatWindow::resortChatLog(std::string line,
ChatMsgType::Type own,
const std::string &channel,
const IgnoreRecord ignoreRecord,
- const bool tryRemoveColors)
+ const TryRemoveColors tryRemoveColors)
{
if (own == ChatMsgType::BY_UNKNOWN)
{
@@ -1537,8 +1537,10 @@ bool ChatWindow::resortChatLog(std::string line,
{
if (tradeChatTab)
{
- tradeChatTab->chatLog(prefix + line, own,
- ignoreRecord, tryRemoveColors);
+ tradeChatTab->chatLog(prefix + line,
+ own,
+ ignoreRecord,
+ tryRemoveColors);
}
return false;
}
@@ -1600,7 +1602,9 @@ bool ChatWindow::resortChatLog(std::string line,
if (tradeChatTab)
{
line = line.erase(idx + 2, 2);
- tradeChatTab->chatLog(prefix + line, own, ignoreRecord,
+ tradeChatTab->chatLog(prefix + line,
+ own,
+ ignoreRecord,
tryRemoveColors);
}
return false;
@@ -1620,8 +1624,10 @@ bool ChatWindow::resortChatLog(std::string line,
{
if (line.find("http", idx1) != idx1 + 2)
{
- tradeChatTab->chatLog(prefix + line, own,
- ignoreRecord, tryRemoveColors);
+ tradeChatTab->chatLog(prefix + line,
+ own,
+ ignoreRecord,
+ tryRemoveColors);
return false;
}
}
@@ -1639,8 +1645,10 @@ bool ChatWindow::resortChatLog(std::string line,
}
else if (mShowAllLang)
{
- langChatTab->chatLog(prefix + line, own,
- ignoreRecord, tryRemoveColors);
+ langChatTab->chatLog(prefix + line,
+ own,
+ ignoreRecord,
+ tryRemoveColors);
}
}
else if (serverFeatures->haveChatChannels())
@@ -1650,8 +1658,10 @@ bool ChatWindow::resortChatLog(std::string line,
}
else if (mShowAllLang)
{
- localChatTab->chatLog(prefix + line, own,
- ignoreRecord, tryRemoveColors);
+ localChatTab->chatLog(prefix + line,
+ own,
+ ignoreRecord,
+ tryRemoveColors);
}
}
else if (localChatTab && channel.empty())
@@ -1663,7 +1673,7 @@ bool ChatWindow::resortChatLog(std::string line,
void ChatWindow::battleChatLog(const std::string &line, ChatMsgType::Type own,
const IgnoreRecord ignoreRecord,
- const bool tryRemoveColors)
+ const TryRemoveColors tryRemoveColors)
{
if (own == ChatMsgType::BY_UNKNOWN)
own = ChatMsgType::BY_SERVER;
@@ -1677,7 +1687,7 @@ void ChatWindow::channelChatLog(const std::string &channel,
const std::string &line,
ChatMsgType::Type own,
const IgnoreRecord ignoreRecord,
- const bool tryRemoveColors)
+ const TryRemoveColors tryRemoveColors)
{
std::string tempChannel = channel;
toLower(tempChannel);