From 3aaebb5b7f1faf46d9f437ba00e7650147453952 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 17 Sep 2014 11:59:03 +0300 Subject: Remove getter for tradeHandler. --- src/gui/windows/shopwindow.cpp | 2 +- src/gui/windows/tradewindow.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/gui/windows') 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)); } } -- cgit v1.2.3-70-g09d2