summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/popups/popupmenu.cpp2
-rw-r--r--src/gui/widgets/itemcontainer.cpp3
-rw-r--r--src/gui/windows/shopwindow.cpp2
-rw-r--r--src/gui/windows/tradewindow.cpp14
4 files changed, 10 insertions, 11 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 31ae42b4a..d9690a11f 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -908,7 +908,7 @@ void PopupMenu::handleLink(const std::string &link,
else if (link == "trade" && being &&
being->getType() == ActorType::Player)
{
- Net::getTradeHandler()->request(being);
+ tradeHandler->request(being);
tradePartnerName = being->getName();
if (tradeWindow)
tradeWindow->clear();
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index aa8966620..1d18c3e2e 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -579,8 +579,7 @@ void ItemContainer::mouseReleased(MouseEvent &event)
if (!checkProtection || !PlayerInfo::isItemProtected(
item->getId()))
{
- Net::getTradeHandler()->addItem(item,
- item->getQuantity());
+ tradeHandler->addItem(item, item->getQuantity());
}
}
}
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index e846e0dce..a78a8fbcd 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -310,7 +310,7 @@ void ShopWindow::startTrade()
tradeWindow->addAutoItem(mTradeNick, mTradeItem,
mTradeItem->getQuantity());
}
- Net::getTradeHandler()->request(being);
+ tradeHandler->request(being);
tradePartnerName = mTradeNick;
mTradeNick.clear();
}
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index 7707bf360..7f6e78a9b 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -273,7 +273,7 @@ void TradeWindow::tradeItem(const Item *const item, const int quantity,
if (check && !checkItem(item))
return;
- Net::getTradeHandler()->addItem(item, quantity);
+ tradeHandler->addItem(item, quantity);
}
void TradeWindow::valueChanged(const SelectionEvent &event)
@@ -365,7 +365,7 @@ void TradeWindow::action(const ActionEvent &event)
setVisible(false);
reset();
PlayerInfo::setTrading(false);
- Net::getTradeHandler()->cancel();
+ tradeHandler->cancel();
}
else if (eventId == "ok")
{
@@ -374,13 +374,13 @@ void TradeWindow::action(const ActionEvent &event)
mMoneyChangeButton->setEnabled(false);
receivedOk(true);
setStatus(PROPOSING);
- Net::getTradeHandler()->confirm();
+ tradeHandler->confirm();
}
else if (eventId == "trade")
{
receivedOk(true);
setStatus(ACCEPTED);
- Net::getTradeHandler()->finish();
+ tradeHandler->finish();
}
else if (eventId == "money")
{
@@ -399,14 +399,14 @@ void TradeWindow::action(const ActionEvent &event)
}
v = curMoney;
}
- Net::getTradeHandler()->setMoney(v);
+ tradeHandler->setMoney(v);
mMoneyField->setText(strprintf("%d", v));
}
}
void TradeWindow::close()
{
- Net::getTradeHandler()->cancel();
+ tradeHandler->cancel();
clear();
}
@@ -457,7 +457,7 @@ void TradeWindow::initTrade(const std::string &nick)
}
if (mAutoMoney)
{
- Net::getTradeHandler()->setMoney(mAutoMoney);
+ tradeHandler->setMoney(mAutoMoney);
mMoneyField->setText(strprintf("%d", mAutoMoney));
}
}