From 8f6f916bb53d15dd2b6a466501e50b32f03d7a9d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 11 Dec 2014 13:19:20 +0300 Subject: Remove "sell" popup menu handler. --- src/gui/popups/popupmenu.cpp | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'src/gui/popups/popupmenu.cpp') diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index e575232d5..4850b2a2c 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -263,7 +263,7 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being) mBrowserBox->addRow("/buy 'NAME'", _("Buy")); // TRANSLATORS: popup menu item // TRANSLATORS: sell to npc - mBrowserBox->addRow("sell", _("Sell")); + mBrowserBox->addRow("/sell 'NAME'", _("Sell")); } mBrowserBox->addRow("##3---"); @@ -979,18 +979,7 @@ void PopupMenu::handleLink(const std::string &link, if (actorManager) being = actorManager->findBeing(mBeingId); - if (link == "sell" && being && mBeingId != 0) - { - if (being->getType() == ActorType::Npc) - npcHandler->sell(mBeingId); - else if (being->getType() == ActorType::Player) - buySellHandler->requestBuyList(being->getName()); - } - else if (link == "sell" && !mNick.empty()) - { - buySellHandler->requestBuyList(mNick); - } - else if (link == "attack" && being) + if (link == "attack" && being) { if (localPlayer) localPlayer->attack(being, true); @@ -2786,7 +2775,7 @@ void PopupMenu::addBuySell(const Being *const being) mBrowserBox->addRow("/buy 'NAME'", _("Buy")); // TRANSLATORS: popup menu item // TRANSLATORS: sell item - mBrowserBox->addRow("sell", _("Sell")); + mBrowserBox->addRow("/sell 'NAME'", _("Sell")); } } else @@ -2796,7 +2785,7 @@ void PopupMenu::addBuySell(const Being *const being) mBrowserBox->addRow("/buy 'NAME'", _("Buy (?)")); // TRANSLATORS: popup menu item // TRANSLATORS: sell item - mBrowserBox->addRow("sell", _("Sell (?)")); + mBrowserBox->addRow("/sell 'NAME'", _("Sell (?)")); } } } @@ -2811,7 +2800,7 @@ void PopupMenu::addBuySellDefault() mBrowserBox->addRow("/buy 'NAME'", _("Buy (?)")); // TRANSLATORS: popup menu item // TRANSLATORS: sell item - mBrowserBox->addRow("sell", _("Sell (?)")); + mBrowserBox->addRow("/sell 'NAME'", _("Sell (?)")); } } -- cgit v1.2.3-60-g2f50