summaryrefslogtreecommitdiff
path: root/src/gui/popupmenu.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-10-05 01:41:54 +0300
committerAndrei Karas <akaras@inbox.ru>2011-10-05 01:41:54 +0300
commitab545fee3daf930dc46aaf303355c1c578320484 (patch)
tree24c8286acb9fea22b1e689810be5534de2323623 /src/gui/popupmenu.cpp
parent851bee28374c5c60114c9f78299e28eaa14891b3 (diff)
downloadmv-ab545fee3daf930dc46aaf303355c1c578320484.tar.gz
mv-ab545fee3daf930dc46aaf303355c1c578320484.tar.bz2
mv-ab545fee3daf930dc46aaf303355c1c578320484.tar.xz
mv-ab545fee3daf930dc46aaf303355c1c578320484.zip
Add blacklist relation. In this mode blocked trades, emotes, speech text.
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r--src/gui/popupmenu.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index 16e3d9ec7..d7c7e54df 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -144,12 +144,21 @@ void PopupMenu::showPopup(int x, int y, Being *being)
mBrowserBox->addRow("friend", _("Be friend"));
mBrowserBox->addRow("disregard", _("Disregard"));
mBrowserBox->addRow("ignore", _("Ignore"));
+ mBrowserBox->addRow("blacklist", _("Black list"));
mBrowserBox->addRow("erase", _("Erase"));
break;
case PlayerRelation::FRIEND:
mBrowserBox->addRow("disregard", _("Disregard"));
mBrowserBox->addRow("ignore", _("Ignore"));
+ mBrowserBox->addRow("blacklist", _("Black list"));
+ mBrowserBox->addRow("erase", _("Erase"));
+ break;
+
+ case PlayerRelation::BLACKLISTED:
+ mBrowserBox->addRow("unignore", _("Unignore"));
+ mBrowserBox->addRow("disregard", _("Disregard"));
+ mBrowserBox->addRow("ignore", _("Ignore"));
mBrowserBox->addRow("erase", _("Erase"));
break;
@@ -369,12 +378,21 @@ void PopupMenu::showPlayerPopup(int x, int y, std::string nick)
mBrowserBox->addRow("friend", _("Be friend"));
mBrowserBox->addRow("disregard", _("Disregard"));
mBrowserBox->addRow("ignore", _("Ignore"));
+ mBrowserBox->addRow("blacklist", _("Black list"));
mBrowserBox->addRow("erase", _("Erase"));
break;
case PlayerRelation::FRIEND:
mBrowserBox->addRow("disregard", _("Disregard"));
mBrowserBox->addRow("ignore", _("Ignore"));
+ mBrowserBox->addRow("blacklist", _("Black list"));
+ mBrowserBox->addRow("erase", _("Erase"));
+ break;
+
+ case PlayerRelation::BLACKLISTED:
+ mBrowserBox->addRow("unignore", _("Unignore"));
+ mBrowserBox->addRow("disregard", _("Disregard"));
+ mBrowserBox->addRow("ignore", _("Ignore"));
mBrowserBox->addRow("erase", _("Erase"));
break;
@@ -606,12 +624,21 @@ void PopupMenu::showChatPopup(int x, int y, ChatTab *tab)
mBrowserBox->addRow("friend", _("Be friend"));
mBrowserBox->addRow("disregard", _("Disregard"));
mBrowserBox->addRow("ignore", _("Ignore"));
+ mBrowserBox->addRow("blacklist", _("Black list"));
mBrowserBox->addRow("erase", _("Erase"));
break;
case PlayerRelation::FRIEND:
mBrowserBox->addRow("disregard", _("Disregard"));
mBrowserBox->addRow("ignore", _("Ignore"));
+ mBrowserBox->addRow("blacklist", _("Black list"));
+ mBrowserBox->addRow("erase", _("Erase"));
+ break;
+
+ case PlayerRelation::BLACKLISTED:
+ mBrowserBox->addRow("unignore", _("Unignore"));
+ mBrowserBox->addRow("disregard", _("Disregard"));
+ mBrowserBox->addRow("ignore", _("Ignore"));
mBrowserBox->addRow("erase", _("Erase"));
break;
@@ -857,6 +884,17 @@ void PopupMenu::handleLink(const std::string &link,
{
player_relations.setRelation(mNick, PlayerRelation::IGNORED);
}
+
+ else if (link == "blacklist" && being &&
+ being->getType() == ActorSprite::PLAYER)
+ {
+ player_relations.setRelation(being->getName(),
+ PlayerRelation::BLACKLISTED);
+ }
+ else if (link == "blacklist" && !mNick.empty())
+ {
+ player_relations.setRelation(mNick, PlayerRelation::BLACKLISTED);
+ }
else if (link == "erase" && being &&
being->getType() == ActorSprite::PLAYER)
{