summaryrefslogtreecommitdiff
path: root/src/gui/trade.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-01-14 14:54:39 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-01-14 14:54:39 +0000
commitf842e0b40d8382011f0bc46b1446945d99ac0425 (patch)
tree5ddbb7c146a8ece28a4260d788350b1c2cf0dbed /src/gui/trade.cpp
parentcbbcc5489e2f72a76b66ae849cbe8f1dc44246ca (diff)
downloadmana-client-f842e0b40d8382011f0bc46b1446945d99ac0425.tar.gz
mana-client-f842e0b40d8382011f0bc46b1446945d99ac0425.tar.bz2
mana-client-f842e0b40d8382011f0bc46b1446945d99ac0425.tar.xz
mana-client-f842e0b40d8382011f0bc46b1446945d99ac0425.zip
Upgraded to Guichan 0.6.0 (merge from guichan-0.6.0 branch).
Diffstat (limited to 'src/gui/trade.cpp')
-rw-r--r--src/gui/trade.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/trade.cpp b/src/gui/trade.cpp
index c1d86d70..06daf3ef 100644
--- a/src/gui/trade.cpp
+++ b/src/gui/trade.cpp
@@ -258,11 +258,11 @@ void TradeWindow::selectionChanged(const SelectionEvent &event)
}
}
-void TradeWindow::action(const std::string& eventId, gcn::Widget* widget)
+void TradeWindow::action(const gcn::ActionEvent &event)
{
Item *item = inventoryWindow->getItem();
- if (eventId == "add")
+ if (event.getId() == "add")
{
if (!item)
{
@@ -288,12 +288,12 @@ void TradeWindow::action(const std::string& eventId, gcn::Widget* widget)
new ItemAmountWindow(AMOUNT_TRADE_ADD, this, item);
}
}
- else if (eventId == "cancel")
+ else if (event.getId() == "cancel")
{
MessageOut outMsg(mNetwork);
outMsg.writeInt16(CMSG_TRADE_CANCEL_REQUEST);
}
- else if (eventId == "ok")
+ else if (event.getId() == "ok")
{
std::stringstream tempMoney(mMoneyField->getText());
int tempInt;
@@ -312,7 +312,7 @@ void TradeWindow::action(const std::string& eventId, gcn::Widget* widget)
MessageOut outMsg(mNetwork);
outMsg.writeInt16(CMSG_TRADE_ADD_COMPLETE);
}
- else if (eventId == "trade")
+ else if (event.getId() == "trade")
{
MessageOut outMsg(mNetwork);
outMsg.writeInt16(CMSG_TRADE_OK);