summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-24 22:31:47 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-24 22:31:47 +0300
commit7da1fab7ee72517bf2359a184d544734e92be6a9 (patch)
tree02b48427edcbdf55924d65d4dfe91beaff8c2b0c /src/gui
parent7ae8a11e0e99ab28730a8ca98388a6ec0ea1923e (diff)
downloadplus-7da1fab7ee72517bf2359a184d544734e92be6a9.tar.gz
plus-7da1fab7ee72517bf2359a184d544734e92be6a9.tar.bz2
plus-7da1fab7ee72517bf2359a184d544734e92be6a9.tar.xz
plus-7da1fab7ee72517bf2359a184d544734e92be6a9.zip
From ChatTab::chatLog removed default parameter for message owner type.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/tabs/chat/chattab.cpp6
-rw-r--r--src/gui/widgets/tabs/chat/chattab.h4
-rw-r--r--src/gui/widgets/tabs/chat/partytab.cpp6
-rw-r--r--src/gui/windows/chatwindow.cpp14
-rw-r--r--src/gui/windows/socialwindow.cpp24
5 files changed, 35 insertions, 19 deletions
diff --git a/src/gui/widgets/tabs/chat/chattab.cpp b/src/gui/widgets/tabs/chat/chattab.cpp
index dd2ff9a54..58f8ec019 100644
--- a/src/gui/widgets/tabs/chat/chattab.cpp
+++ b/src/gui/widgets/tabs/chat/chattab.cpp
@@ -562,11 +562,13 @@ void ChatTab::showOnline(const std::string &nick,
if (online == Online_true)
{
// TRANSLATORS: chat message
- chatLog(strprintf(_("%s is now Online."), nick.c_str()));
+ chatLog(strprintf(_("%s is now Online."), nick.c_str()),
+ ChatMsgType::BY_SERVER);
}
else
{
// TRANSLATORS: chat message
- chatLog(strprintf(_("%s is now Offline."), nick.c_str()));
+ chatLog(strprintf(_("%s is now Offline."), nick.c_str()),
+ ChatMsgType::BY_SERVER);
}
}
diff --git a/src/gui/widgets/tabs/chat/chattab.h b/src/gui/widgets/tabs/chat/chattab.h
index 6eee19b9d..df3c7913f 100644
--- a/src/gui/widgets/tabs/chat/chattab.h
+++ b/src/gui/widgets/tabs/chat/chattab.h
@@ -41,7 +41,7 @@ class ScrollArea;
#define debugMsg(str) \
if (debugChatTab) \
- debugChatTab->chatLog(str);
+ debugChatTab->chatLog(str, ChatMsgType::BY_SERVER);
#define setTabColors(name) \
setTabColor(&getThemeColor(name), \
@@ -80,7 +80,7 @@ class ChatTab notfinal : public Tab
* @param removeColors try remove color if configured
*/
void chatLog(std::string line,
- ChatMsgType::Type own = ChatMsgType::BY_SERVER,
+ ChatMsgType::Type own,
const IgnoreRecord ignoreRecord = IgnoreRecord_false,
const TryRemoveColors tryRemoveColors
= TryRemoveColors_true);
diff --git a/src/gui/widgets/tabs/chat/partytab.cpp b/src/gui/widgets/tabs/chat/partytab.cpp
index 093549139..45f420703 100644
--- a/src/gui/widgets/tabs/chat/partytab.cpp
+++ b/src/gui/widgets/tabs/chat/partytab.cpp
@@ -131,7 +131,8 @@ bool PartyTab::handleCommand(const std::string &restrict type,
Net::PartyShare::NO);
break;
case -1:
- chatLog(strprintf(BOOLEAN_OPTIONS, "item"));
+ chatLog(strprintf(BOOLEAN_OPTIONS, "item"),
+ ChatMsgType::BY_SERVER);
break;
default:
break;
@@ -181,7 +182,8 @@ bool PartyTab::handleCommand(const std::string &restrict type,
Net::PartyShare::NO);
break;
case -1:
- chatLog(strprintf(BOOLEAN_OPTIONS, "exp"));
+ chatLog(strprintf(BOOLEAN_OPTIONS, "exp"),
+ ChatMsgType::BY_SERVER);
break;
default:
break;
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 178f41c7e..f4641670d 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -963,7 +963,8 @@ void ChatWindow::statChanged(const int id,
if (change != 0)
{
battleChatLog(std::string("+").append(toString(
- change)).append(" job"));
+ change)).append(" job"),
+ ChatMsgType::BY_SERVER);
}
}
@@ -983,12 +984,14 @@ void ChatWindow::attributeChanged(const int id,
if (change != 0)
{
battleChatLog(std::string("+").append(toString(
- change)).append(" xp"));
+ change)).append(" xp"),
+ ChatMsgType::BY_SERVER);
}
break;
}
case Attributes::LEVEL:
- battleChatLog(std::string("Level: ").append(toString(newVal)));
+ battleChatLog(std::string("Level: ").append(toString(newVal)),
+ ChatMsgType::BY_SERVER);
break;
default:
break;
@@ -1068,7 +1071,7 @@ void ChatWindow::addWhisper(const std::string &restrict nick,
}
else if (own == ChatMsgType::BY_SERVER)
{
- tab->chatLog(mes);
+ tab->chatLog(mes, ChatMsgType::BY_SERVER);
}
else
{
@@ -1109,7 +1112,8 @@ 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);
+ nick.c_str(), mes.c_str()),
+ ChatMsgType::BY_PLAYER);
}
else
{
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index 83935ed49..4f453e576 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -269,7 +269,8 @@ void SocialWindow::action(const ActionEvent &event)
localChatTab->chatLog(
// TRANSLATORS: chat message
strprintf(_("Accepted party invite from %s."),
- mPartyInviter.c_str()));
+ mPartyInviter.c_str()),
+ ChatMsgType::BY_SERVER);
}
partyHandler->inviteResponse(mPartyInviter, mPartyId, true);
}
@@ -280,7 +281,8 @@ void SocialWindow::action(const ActionEvent &event)
localChatTab->chatLog(
// TRANSLATORS: chat message
strprintf(_("Rejected party invite from %s."),
- mPartyInviter.c_str()));
+ mPartyInviter.c_str()),
+ ChatMsgType::BY_SERVER);
}
partyHandler->inviteResponse(mPartyInviter, mPartyId, false);
}
@@ -297,7 +299,8 @@ void SocialWindow::action(const ActionEvent &event)
localChatTab->chatLog(
// TRANSLATORS: chat message
strprintf(_("Accepted guild invite from %s."),
- mPartyInviter.c_str()));
+ mPartyInviter.c_str()),
+ ChatMsgType::BY_SERVER);
}
#ifdef TMWA_SUPPORT
if (!guildManager || !GuildManager::getEnableGuildBot())
@@ -315,7 +318,8 @@ void SocialWindow::action(const ActionEvent &event)
localChatTab->chatLog(
// TRANSLATORS: chat message
strprintf(_("Rejected guild invite from %s."),
- mPartyInviter.c_str()));
+ mPartyInviter.c_str()),
+ ChatMsgType::BY_SERVER);
}
#ifdef TMWA_SUPPORT
if (!guildManager || !GuildManager::getEnableGuildBot())
@@ -359,7 +363,8 @@ void SocialWindow::action(const ActionEvent &event)
{
// TRANSLATORS: chat message
localChatTab->chatLog(strprintf(_("Creating guild called %s."),
- name.c_str()), ChatMsgType::BY_SERVER);
+ name.c_str()),
+ ChatMsgType::BY_SERVER);
}
mGuildCreateDialog = nullptr;
@@ -380,7 +385,8 @@ void SocialWindow::action(const ActionEvent &event)
{
// TRANSLATORS: chat message
localChatTab->chatLog(strprintf(_("Creating party called %s."),
- name.c_str()), ChatMsgType::BY_SERVER);
+ name.c_str()),
+ ChatMsgType::BY_SERVER);
}
mPartyCreateDialog = nullptr;
@@ -413,7 +419,8 @@ void SocialWindow::showGuildInvite(const std::string &restrict guildName,
{
// TRANSLATORS: chat message
localChatTab->chatLog(_("Received guild request, but one already "
- "exists."), ChatMsgType::BY_SERVER);
+ "exists."),
+ ChatMsgType::BY_SERVER);
}
return;
}
@@ -445,7 +452,8 @@ void SocialWindow::showPartyInvite(const std::string &restrict partyName,
{
// TRANSLATORS: chat message
localChatTab->chatLog(_("Received party request, but one already "
- "exists."), ChatMsgType::BY_SERVER);
+ "exists."),
+ ChatMsgType::BY_SERVER);
}
return;
}