summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-11 19:10:19 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-11 19:10:19 +0300
commitee1fc0b63cb7f27df85c43474497b805df6e31f5 (patch)
treed233f17e1bfd751b6939646a24f1253ae8d14796 /src/gui/windows
parenta80f4ac5c1c3ef4d3ac5f026591b16074d0bf451 (diff)
downloadplus-ee1fc0b63cb7f27df85c43474497b805df6e31f5.tar.gz
plus-ee1fc0b63cb7f27df85c43474497b805df6e31f5.tar.bz2
plus-ee1fc0b63cb7f27df85c43474497b805df6e31f5.tar.xz
plus-ee1fc0b63cb7f27df85c43474497b805df6e31f5.zip
Remove default parameters from ChatTab::chatLog.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/chatwindow.cpp56
-rw-r--r--src/gui/windows/socialwindow.cpp38
-rw-r--r--src/gui/windows/tradewindow.cpp12
3 files changed, 83 insertions, 23 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index aa899202d..2afbe7caf 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -716,7 +716,10 @@ void ChatWindow::doPresent() const
// TRANSLATORS: chat message
_("Present: %s; %d players are present."),
response.c_str(), playercount);
- tab->chatLog(log, ChatMsgType::BY_SERVER);
+ tab->chatLog(log,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
@@ -1018,7 +1021,9 @@ void ChatWindow::attributeChanged(const AttributesT id,
{
battleChatLog(std::string("+").append(toString(
CAST_U64(change))).append(" xp"),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
break;
}
@@ -1026,7 +1031,9 @@ void ChatWindow::attributeChanged(const AttributesT id,
battleChatLog(std::string(
"Level: ").append(toString(CAST_S32(
newVal))),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
break;
case Attributes::PLAYER_JOB_EXP:
{
@@ -1043,7 +1050,9 @@ void ChatWindow::attributeChanged(const AttributesT id,
{
battleChatLog(std::string("+").append(toString(CAST_U64(
change))).append(" job"),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
break;
}
@@ -1126,7 +1135,10 @@ void ChatWindow::addWhisper(const std::string &restrict nick,
}
else if (own == ChatMsgType::BY_SERVER)
{
- tab->chatLog(mes, ChatMsgType::BY_SERVER);
+ tab->chatLog(mes,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
else
{
@@ -1149,7 +1161,10 @@ void ChatWindow::addWhisper(const std::string &restrict nick,
{
if (config.getBoolValue("removeColors"))
msg = removeColors(msg);
- tab->chatLog(msg, ChatMsgType::BY_SERVER);
+ tab->chatLog(msg,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
else
@@ -1168,14 +1183,17 @@ void ChatWindow::addWhisper(const std::string &restrict nick,
// TRANSLATORS: chat message
localChatTab->chatLog(strprintf(_("Whispering to %s: %s"),
nick.c_str(), mes.c_str()),
- ChatMsgType::BY_PLAYER);
+ ChatMsgType::BY_PLAYER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
else
{
localChatTab->chatLog(std::string(nick).append(
" : ").append(mes),
ChatMsgType::ACT_WHISPER,
- IgnoreRecord_false);
+ IgnoreRecord_false,
+ TryRemoveColors_true);
if (localPlayer != nullptr)
localPlayer->afkRespond(nullptr, nick);
}
@@ -1694,7 +1712,10 @@ bool ChatWindow::resortChatLog(std::string line,
{
if (langChatTab->getChannelName() == channel)
{
- langChatTab->chatLog(line, own, ignoreRecord, tryRemoveColors);
+ langChatTab->chatLog(line,
+ own,
+ ignoreRecord,
+ tryRemoveColors);
}
else if (mShowAllLang)
{
@@ -2118,11 +2139,17 @@ void ChatWindow::addGlobalMessage(const std::string &line)
if (debugChatTab != nullptr &&
findI(line, mGlobalsFilter) != std::string::npos)
{
- debugChatTab->chatLog(line, ChatMsgType::BY_OTHER);
+ debugChatTab->chatLog(line,
+ ChatMsgType::BY_OTHER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
else
{
- localChatTab->chatLog(line, ChatMsgType::BY_GM);
+ localChatTab->chatLog(line,
+ ChatMsgType::BY_GM,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
@@ -2134,7 +2161,12 @@ bool ChatWindow::isTabPresent(const ChatTab *const tab) const
void ChatWindow::debugMessage(const std::string &msg)
{
if (debugChatTab != nullptr)
- debugChatTab->chatLog(msg, ChatMsgType::BY_SERVER);
+ {
+ debugChatTab->chatLog(msg,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
+ }
}
void ChatWindow::showGMTab()
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index 174762100..cbdf1d68d 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -276,7 +276,9 @@ void SocialWindow::action(const ActionEvent &event)
// TRANSLATORS: chat message
strprintf(_("Accepted party invite from %s."),
mPartyInviter.c_str()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
partyHandler->inviteResponse(mPartyId, true);
}
@@ -288,7 +290,9 @@ void SocialWindow::action(const ActionEvent &event)
// TRANSLATORS: chat message
strprintf(_("Rejected party invite from %s."),
mPartyInviter.c_str()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
partyHandler->inviteResponse(mPartyId, false);
}
@@ -306,7 +310,9 @@ void SocialWindow::action(const ActionEvent &event)
// TRANSLATORS: chat message
strprintf(_("Accepted guild invite from %s."),
mPartyInviter.c_str()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
#ifdef TMWA_SUPPORT
if (guildManager == nullptr || !GuildManager::getEnableGuildBot())
@@ -326,7 +332,9 @@ void SocialWindow::action(const ActionEvent &event)
// TRANSLATORS: chat message
strprintf(_("Rejected guild invite from %s."),
mPartyInviter.c_str()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
#ifdef TMWA_SUPPORT
if (guildManager == nullptr || !GuildManager::getEnableGuildBot())
@@ -384,7 +392,9 @@ void SocialWindow::showGuildInvite(const std::string &restrict guildName,
// TRANSLATORS: chat message
localChatTab->chatLog(_("Received guild request, but one already "
"exists."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
return;
}
@@ -395,7 +405,12 @@ void SocialWindow::showGuildInvite(const std::string &restrict guildName,
inviterName.c_str(), guildName.c_str());
if (localChatTab != nullptr)
- localChatTab->chatLog(msg, ChatMsgType::BY_SERVER);
+ {
+ localChatTab->chatLog(msg,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
+ }
CREATEWIDGETV(mGuildAcceptDialog, ConfirmDialog,
// TRANSLATORS: guild invite message
@@ -421,7 +436,9 @@ void SocialWindow::showPartyInvite(const std::string &restrict partyName,
// TRANSLATORS: chat message
localChatTab->chatLog(_("Received party request, but one already "
"exists."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
return;
}
@@ -458,7 +475,12 @@ void SocialWindow::showPartyInvite(const std::string &restrict partyName,
}
if (localChatTab != nullptr)
- localChatTab->chatLog(msg, ChatMsgType::BY_SERVER);
+ {
+ localChatTab->chatLog(msg,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
+ }
// show invite
CREATEWIDGETV(mPartyAcceptDialog, ConfirmDialog,
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index 66f4e0550..bd8ba020f 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -438,7 +438,9 @@ void TradeWindow::action(const ActionEvent &event)
{
// TRANSLATORS: trade error
localChatTab->chatLog(_("You don't have enough money."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
v = curMoney;
}
@@ -528,7 +530,9 @@ bool TradeWindow::checkItem(const Item *const item) const
// TRANSLATORS: trade error
localChatTab->chatLog(_("Failed adding item. You can not "
"overlap one kind of item on the window."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
return false;
}
@@ -540,7 +544,9 @@ bool TradeWindow::checkItem(const Item *const item) const
localChatTab->chatLog(
// TRANSLATORS: trade error
_("Failed adding item. You can not trade equipped items."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
return false;
}