summaryrefslogtreecommitdiff
path: root/src/gui/popups
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-11 12:41:58 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-11 12:41:58 +0300
commita2bbfcce05d3f40b0ce2ed21608bfc59a3a916c8 (patch)
treec40d09d3367e42a7123d6c1534e9dab3acc1f918 /src/gui/popups
parent30445ed459b803d8ec5a2a847c8e20feab4d14f2 (diff)
downloadplus-a2bbfcce05d3f40b0ce2ed21608bfc59a3a916c8.tar.gz
plus-a2bbfcce05d3f40b0ce2ed21608bfc59a3a916c8.tar.bz2
plus-a2bbfcce05d3f40b0ce2ed21608bfc59a3a916c8.tar.xz
plus-a2bbfcce05d3f40b0ce2ed21608bfc59a3a916c8.zip
Remove "buy" popup menu handler.
Diffstat (limited to 'src/gui/popups')
-rw-r--r--src/gui/popups/popupmenu.cpp21
1 files changed, 5 insertions, 16 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 7202c74e4..e575232d5 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -260,7 +260,7 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being)
}
// TRANSLATORS: popup menu item
// TRANSLATORS: buy from npc
- mBrowserBox->addRow("buy", _("Buy"));
+ mBrowserBox->addRow("/buy 'NAME'", _("Buy"));
// TRANSLATORS: popup menu item
// TRANSLATORS: sell to npc
mBrowserBox->addRow("sell", _("Sell"));
@@ -979,18 +979,7 @@ void PopupMenu::handleLink(const std::string &link,
if (actorManager)
being = actorManager->findBeing(mBeingId);
- if (link == "buy" && being && mBeingId != 0)
- {
- if (being->getType() == ActorType::Npc)
- npcHandler->buy(mBeingId);
- else if (being->getType() == ActorType::Player)
- buySellHandler->requestSellList(being->getName());
- }
- else if (link == "buy" && !mNick.empty())
- {
- buySellHandler->requestSellList(mNick);
- }
- else if (link == "sell" && being && mBeingId != 0)
+ if (link == "sell" && being && mBeingId != 0)
{
if (being->getType() == ActorType::Npc)
npcHandler->sell(mBeingId);
@@ -2794,7 +2783,7 @@ void PopupMenu::addBuySell(const Being *const being)
{
// TRANSLATORS: popup menu item
// TRANSLATORS: buy item
- mBrowserBox->addRow("buy", _("Buy"));
+ mBrowserBox->addRow("/buy 'NAME'", _("Buy"));
// TRANSLATORS: popup menu item
// TRANSLATORS: sell item
mBrowserBox->addRow("sell", _("Sell"));
@@ -2804,7 +2793,7 @@ void PopupMenu::addBuySell(const Being *const being)
{
// TRANSLATORS: popup menu item
// TRANSLATORS: buy item
- mBrowserBox->addRow("buy", _("Buy (?)"));
+ mBrowserBox->addRow("/buy 'NAME'", _("Buy (?)"));
// TRANSLATORS: popup menu item
// TRANSLATORS: sell item
mBrowserBox->addRow("sell", _("Sell (?)"));
@@ -2819,7 +2808,7 @@ void PopupMenu::addBuySellDefault()
mBrowserBox->addRow("##3---");
// TRANSLATORS: popup menu item
// TRANSLATORS: buy item
- mBrowserBox->addRow("buy", _("Buy (?)"));
+ mBrowserBox->addRow("/buy 'NAME'", _("Buy (?)"));
// TRANSLATORS: popup menu item
// TRANSLATORS: sell item
mBrowserBox->addRow("sell", _("Sell (?)"));