From 5b9713d50b4b504e74e857b48a2c5d6e7153d9e2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 11 Dec 2014 22:03:14 +0300 Subject: Remove "erase" popup menu handler. --- src/gui/popups/popupmenu.cpp | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'src/gui') diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index b95f1d41e..605698acd 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -979,18 +979,8 @@ void PopupMenu::handleLink(const std::string &link, if (actorManager) being = actorManager->findBeing(mBeingId); - if (link == "erase" && being && + if (link == "disregard" && being && being->getType() == ActorType::Player) - { - player_relations.setRelation(being->getName(), PlayerRelation::ERASED); - being->updateName(); - } - else if (link == "erase" && !mNick.empty()) - { - player_relations.setRelation(mNick, PlayerRelation::ERASED); - } - else if (link == "disregard" && being && - being->getType() == ActorType::Player) { player_relations.setRelation(being->getName(), PlayerRelation::DISREGARDED); @@ -2606,7 +2596,7 @@ void PopupMenu::addNormalRelations() mBrowserBox->addRow("/enemy 'NAME'", _("Set as enemy")); // TRANSLATORS: popup menu item // TRANSLATORS: add player to erased list - mBrowserBox->addRow("erase", _("Erase")); + mBrowserBox->addRow("/erase 'NAME'", _("Erase")); } void PopupMenu::addPlayerRelation(const std::string &name) @@ -2639,7 +2629,7 @@ void PopupMenu::addPlayerRelation(const std::string &name) mBrowserBox->addRow("/enemy 'NAME'", _("Set as enemy")); // TRANSLATORS: popup menu item // TRANSLATORS: add player to erased list - mBrowserBox->addRow("erase", _("Erase")); + mBrowserBox->addRow("/erase 'NAME'", _("Erase")); break; case PlayerRelation::DISREGARDED: @@ -2651,7 +2641,7 @@ void PopupMenu::addPlayerRelation(const std::string &name) mBrowserBox->addRow("/ignore 'NAME'", _("Completely ignore")); // TRANSLATORS: popup menu item // TRANSLATORS: add player to erased list - mBrowserBox->addRow("erase", _("Erase")); + mBrowserBox->addRow("/erase 'NAME'", _("Erase")); break; case PlayerRelation::IGNORED: @@ -2660,7 +2650,7 @@ void PopupMenu::addPlayerRelation(const std::string &name) mBrowserBox->addRow("/unignore 'NAME'", _("Unignore")); // TRANSLATORS: popup menu item // TRANSLATORS: add player to erased list - mBrowserBox->addRow("erase", _("Erase")); + mBrowserBox->addRow("/erase 'NAME'", _("Erase")); break; case PlayerRelation::ENEMY2: @@ -2678,7 +2668,7 @@ void PopupMenu::addPlayerRelation(const std::string &name) mBrowserBox->addRow("/blacklist 'NAME'", _("Black list")); // TRANSLATORS: popup menu item // TRANSLATORS: add player to erased list - mBrowserBox->addRow("erase", _("Erase")); + mBrowserBox->addRow("/erase 'NAME'", _("Erase")); break; case PlayerRelation::ERASED: -- cgit v1.2.3-70-g09d2