summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-30 12:25:16 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-30 12:25:16 +0300
commit1680d159ecbf75591d2dab1416ff8144c27d4de5 (patch)
treecd34ad27487036265f08d7aa63476c160280d899 /src/gui/widgets/tabs
parent9913b4b481ddcaf0fa8499f3554c85bb588be7f0 (diff)
downloadmv-1680d159ecbf75591d2dab1416ff8144c27d4de5.tar.gz
mv-1680d159ecbf75591d2dab1416ff8144c27d4de5.tar.bz2
mv-1680d159ecbf75591d2dab1416ff8144c27d4de5.tar.xz
mv-1680d159ecbf75591d2dab1416ff8144c27d4de5.zip
Rename player_node variable into localPlayer.
Diffstat (limited to 'src/gui/widgets/tabs')
-rw-r--r--src/gui/widgets/tabs/chattab.cpp4
-rw-r--r--src/gui/widgets/tabs/debugwindowtabs.cpp12
-rw-r--r--src/gui/widgets/tabs/setup_relations.cpp8
-rw-r--r--src/gui/widgets/tabs/socialguildtab.h4
-rw-r--r--src/gui/widgets/tabs/socialguildtab2.h4
-rw-r--r--src/gui/widgets/tabs/socialnavigationtab.h20
-rw-r--r--src/gui/widgets/tabs/socialpartytab.h4
-rw-r--r--src/gui/widgets/tabs/socialtabbase.h2
-rw-r--r--src/gui/widgets/tabs/whispertab.cpp8
9 files changed, 33 insertions, 33 deletions
diff --git a/src/gui/widgets/tabs/chattab.cpp b/src/gui/widgets/tabs/chattab.cpp
index 684b9d4d5..f9a6e960f 100644
--- a/src/gui/widgets/tabs/chattab.cpp
+++ b/src/gui/widgets/tabs/chattab.cpp
@@ -344,10 +344,10 @@ void ChatTab::chatLog(std::string line, ChatMsgType::Type own,
void ChatTab::chatLog(const std::string &nick, std::string msg)
{
- if (!player_node)
+ if (!localPlayer)
return;
- const ChatMsgType::Type byWho = (nick == player_node->getName()
+ const ChatMsgType::Type byWho = (nick == localPlayer->getName()
? ChatMsgType::BY_PLAYER : ChatMsgType::BY_OTHER);
if (byWho == ChatMsgType::BY_OTHER && config.getBoolValue("removeColors"))
msg = removeColors(msg);
diff --git a/src/gui/widgets/tabs/debugwindowtabs.cpp b/src/gui/widgets/tabs/debugwindowtabs.cpp
index d538ba91a..b50baac78 100644
--- a/src/gui/widgets/tabs/debugwindowtabs.cpp
+++ b/src/gui/widgets/tabs/debugwindowtabs.cpp
@@ -160,11 +160,11 @@ MapDebugTab::MapDebugTab(const Widget2 *const widget) :
void MapDebugTab::logic()
{
BLOCK_START("MapDebugTab::logic")
- if (player_node)
+ if (localPlayer)
{
// TRANSLATORS: debug window label
mXYLabel->setCaption(strprintf("%s (%d, %d)", _("Player Position:"),
- player_node->getTileX(), player_node->getTileY()));
+ localPlayer->getTileX(), localPlayer->getTileY()));
}
else
{
@@ -305,9 +305,9 @@ TargetDebugTab::TargetDebugTab(const Widget2 *const widget) :
void TargetDebugTab::logic()
{
BLOCK_START("TargetDebugTab::logic")
- if (player_node && player_node->getTarget())
+ if (localPlayer && localPlayer->getTarget())
{
- const Being *const target = player_node->getTarget();
+ const Being *const target = localPlayer->getTarget();
// TRANSLATORS: debug window label
mTargetLabel->setCaption(strprintf("%s %s (%d, %d)", _("Target:"),
@@ -424,11 +424,11 @@ NetDebugTab::NetDebugTab(const Widget2 *const widget) :
void NetDebugTab::logic()
{
BLOCK_START("NetDebugTab::logic")
- if (player_node)
+ if (localPlayer)
{
// TRANSLATORS: debug window label
mPingLabel->setCaption(strprintf(_("Ping: %s ms"),
- player_node->getPingTime().c_str()));
+ localPlayer->getPingTime().c_str()));
}
else
{
diff --git a/src/gui/widgets/tabs/setup_relations.cpp b/src/gui/widgets/tabs/setup_relations.cpp
index b14208c3b..7ebf81017 100644
--- a/src/gui/widgets/tabs/setup_relations.cpp
+++ b/src/gui/widgets/tabs/setup_relations.cpp
@@ -179,8 +179,8 @@ void Setup_Relations::apply()
if (actorManager)
actorManager->updatePlayerNames();
- if (player_node)
- player_node->setCheckNameSetting(true);
+ if (localPlayer)
+ localPlayer->setCheckNameSetting(true);
}
void Setup_Relations::cancel()
@@ -231,8 +231,8 @@ void Setup_Relations::updatedPlayer(const std::string &name A_UNUSED)
player_relations.getDefault() & PlayerRelation::TRADE);
mDefaultWhisper->setSelected(
player_relations.getDefault() & PlayerRelation::WHISPER);
- if (player_node)
- player_node->updateName();
+ if (localPlayer)
+ localPlayer->updateName();
}
void Setup_Relations::updateAll()
diff --git a/src/gui/widgets/tabs/socialguildtab.h b/src/gui/widgets/tabs/socialguildtab.h
index 0347087b7..ba9127418 100644
--- a/src/gui/widgets/tabs/socialguildtab.h
+++ b/src/gui/widgets/tabs/socialguildtab.h
@@ -145,10 +145,10 @@ class SocialGuildTab final : public SocialTab,
}
else
{
- if (!player_node)
+ if (!localPlayer)
return;
- const Guild *const guild = player_node->getGuild();
+ const Guild *const guild = localPlayer->getGuild();
if (!guild)
return;
diff --git a/src/gui/widgets/tabs/socialguildtab2.h b/src/gui/widgets/tabs/socialguildtab2.h
index ba40d7c4f..cf7086708 100644
--- a/src/gui/widgets/tabs/socialguildtab2.h
+++ b/src/gui/widgets/tabs/socialguildtab2.h
@@ -74,10 +74,10 @@ class SocialGuildTab2 final : public SocialTab,
void buildCounter(const int online0 A_UNUSED,
const int total0 A_UNUSED)
{
- if (!player_node)
+ if (!localPlayer)
return;
- const Guild *const guild = player_node->getGuild();
+ const Guild *const guild = localPlayer->getGuild();
if (!guild)
return;
diff --git a/src/gui/widgets/tabs/socialnavigationtab.h b/src/gui/widgets/tabs/socialnavigationtab.h
index 4344e1251..cee569e86 100644
--- a/src/gui/widgets/tabs/socialnavigationtab.h
+++ b/src/gui/widgets/tabs/socialnavigationtab.h
@@ -71,7 +71,7 @@ class SocialNavigationTab final : public SocialTab
void updateList() override final
{
- if (!socialWindow || !player_node)
+ if (!socialWindow || !localPlayer)
return;
const Map *const map = socialWindow->getMap();
@@ -114,8 +114,8 @@ class SocialNavigationTab final : public SocialTab
portal->getComment().c_str(), x, y);
Avatar *const ava = new Avatar(name);
- if (player_node)
- ava->setOnline(player_node->isReachable(x, y, true));
+ if (localPlayer)
+ ava->setOnline(localPlayer->isReachable(x, y, true));
else
ava->setOnline(false);
ava->setLevel(-1);
@@ -166,7 +166,7 @@ class SocialNavigationTab final : public SocialTab
void selectIndex(const unsigned num) override final
{
- if (!player_node)
+ if (!localPlayer)
return;
std::vector<Avatar*> *const avatars = mBeings->getMembers();
@@ -174,8 +174,8 @@ class SocialNavigationTab final : public SocialTab
return;
const Avatar *const ava = avatars->at(num);
- if (ava && player_node)
- player_node->navigateTo(ava->getX(), ava->getY());
+ if (ava && localPlayer)
+ localPlayer->navigateTo(ava->getX(), ava->getY());
}
void updateNames()
@@ -247,7 +247,7 @@ class SocialNavigationTab final : public SocialTab
void addPortal(const int x, const int y)
{
- if (!socialWindow || !player_node)
+ if (!socialWindow || !localPlayer)
return;
const Map *const map = socialWindow->getMap();
@@ -267,8 +267,8 @@ class SocialNavigationTab final : public SocialTab
portal->getComment().c_str(), x, y);
Avatar *const ava = new Avatar(name);
- if (player_node)
- ava->setOnline(player_node->isReachable(x, y, true));
+ if (localPlayer)
+ ava->setOnline(localPlayer->isReachable(x, y, true));
else
ava->setOnline(false);
ava->setLevel(-1);
@@ -280,7 +280,7 @@ class SocialNavigationTab final : public SocialTab
void removePortal(const int x, const int y)
{
- if (!socialWindow || !player_node)
+ if (!socialWindow || !localPlayer)
return;
const Map *const map = socialWindow->getMap();
diff --git a/src/gui/widgets/tabs/socialpartytab.h b/src/gui/widgets/tabs/socialpartytab.h
index 847a43d42..9aea998d2 100644
--- a/src/gui/widgets/tabs/socialpartytab.h
+++ b/src/gui/widgets/tabs/socialpartytab.h
@@ -137,10 +137,10 @@ class SocialPartyTab final : public SocialTab,
void buildCounter(const int online0 A_UNUSED,
const int total0 A_UNUSED)
{
- if (!player_node)
+ if (!localPlayer)
return;
- const Party *const party = player_node->getParty();
+ const Party *const party = localPlayer->getParty();
if (!party)
return;
diff --git a/src/gui/widgets/tabs/socialtabbase.h b/src/gui/widgets/tabs/socialtabbase.h
index d15f39a6c..715d63370 100644
--- a/src/gui/widgets/tabs/socialtabbase.h
+++ b/src/gui/widgets/tabs/socialtabbase.h
@@ -64,7 +64,7 @@
}
#define updateAtkListStart() \
- if (!socialWindow || !player_node || !actorManager)\
+ if (!socialWindow || !localPlayer || !actorManager)\
return;\
std::vector<Avatar*> *const avatars = mBeings->getMembers();\
std::vector<Avatar*>::iterator ia = avatars->begin();\
diff --git a/src/gui/widgets/tabs/whispertab.cpp b/src/gui/widgets/tabs/whispertab.cpp
index 2d295dc14..d0a29797f 100644
--- a/src/gui/widgets/tabs/whispertab.cpp
+++ b/src/gui/widgets/tabs/whispertab.cpp
@@ -56,8 +56,8 @@ void WhisperTab::handleInput(const std::string &msg)
newMsg = ChatWindow::doReplace(msg);
Net::getChatHandler()->privateMessage(mNick, newMsg);
- if (player_node)
- chatLog(player_node->getName(), newMsg);
+ if (localPlayer)
+ chatLog(localPlayer->getName(), newMsg);
else
chatLog("?", newMsg);
}
@@ -79,8 +79,8 @@ void WhisperTab::handleCommand(const std::string &msg)
{
std::string str = strprintf("*%s*", args.c_str());
Net::getChatHandler()->privateMessage(mNick, str);
- if (player_node)
- chatLog(player_node->getName(), str);
+ if (localPlayer)
+ chatLog(localPlayer->getName(), str);
else
chatLog("?", str);
}