summaryrefslogtreecommitdiff
path: root/src/gui/trade.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-19 15:09:27 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-19 15:09:27 +0000
commit3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6 (patch)
tree5084eaa47d4874a3a573de226f19c4be072e4888 /src/gui/trade.cpp
parent19d5cc3a6bbbd911361b7e8b956840d0189d4c2b (diff)
downloadmana-client-3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6.tar.gz
mana-client-3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6.tar.bz2
mana-client-3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6.tar.xz
mana-client-3ddaec5f355ed1d231514cf0a863c4b9e35cf2a6.zip
Reverted changeset r2269 (toString) as requested by ElvenProgrammer.
Diffstat (limited to 'src/gui/trade.cpp')
-rw-r--r--src/gui/trade.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gui/trade.cpp b/src/gui/trade.cpp
index 9b98fa09..ee7bca06 100644
--- a/src/gui/trade.cpp
+++ b/src/gui/trade.cpp
@@ -43,8 +43,6 @@
#include "../resources/iteminfo.h"
-#include "../utils/tostring.h"
-
TradeWindow::TradeWindow(Network *network):
Window("Trade: You"),
mNetwork(network),
@@ -132,7 +130,9 @@ TradeWindow::~TradeWindow()
void TradeWindow::addMoney(int amount)
{
- mMoneyLabel->setCaption("You get: " + toString(amount) + "z");
+ std::stringstream tempMoney;
+ tempMoney << "You get: " << amount << "z";
+ mMoneyLabel->setCaption(tempMoney.str());
mMoneyLabel->adjustSize();
}
@@ -292,12 +292,14 @@ void TradeWindow::action(const std::string &eventId)
}
else if (eventId == "ok")
{
- std::stringstream tempMoney(mMoneyField->getText());
+ std::stringstream tempMoney[2];
+ tempMoney[0] << mMoneyField->getText();
int tempInt;
- if (tempMoney >> tempInt)
+ if (tempMoney[0] >> tempInt)
{
- mMoneyField->setText(toString(tempInt));
-
+ tempMoney[1] << tempInt;
+ mMoneyField->setText(tempMoney[1].str());
+
MessageOut outMsg(mNetwork);
outMsg.writeInt16(CMSG_TRADE_ITEM_ADD_REQUEST);
outMsg.writeInt16(0);