summaryrefslogtreecommitdiff
path: root/src/gui/storagewindow.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-05-06 16:34:06 -0600
committerJared Adams <jaxad0127@gmail.com>2009-05-06 16:36:11 -0600
commit574ef501d32c7735d2aed022f2a3761d053bbe7c (patch)
treeca5dd0709d6a0d1989af3fab6b1f85c6726a2fb0 /src/gui/storagewindow.cpp
parent3603521356ad1646d456a1681ff9f8a7c88ab458 (diff)
downloadmana-574ef501d32c7735d2aed022f2a3761d053bbe7c.tar.gz
mana-574ef501d32c7735d2aed022f2a3761d053bbe7c.tar.bz2
mana-574ef501d32c7735d2aed022f2a3761d053bbe7c.tar.xz
mana-574ef501d32c7735d2aed022f2a3761d053bbe7c.zip
Clean up the bypass code for the ItemAmountWindow
Diffstat (limited to 'src/gui/storagewindow.cpp')
-rw-r--r--src/gui/storagewindow.cpp21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/gui/storagewindow.cpp b/src/gui/storagewindow.cpp
index f3558830..309fcafc 100644
--- a/src/gui/storagewindow.cpp
+++ b/src/gui/storagewindow.cpp
@@ -128,15 +128,7 @@ void StorageWindow::action(const gcn::ActionEvent &event)
if (!item)
return;
- if (item->getQuantity() == 1)
- {
- addStore(item, 1);
- }
- else
- {
- // Choose amount of items to trade
- new ItemAmountWindow(ItemAmountWindow::StoreAdd, this, item);
- }
+ ItemAmountWindow::showWindow(ItemAmountWindow::StoreAdd, this, item);
}
else if (event.getId() == "retrieve")
{
@@ -145,15 +137,8 @@ void StorageWindow::action(const gcn::ActionEvent &event)
if (!item)
return;
- if (item->getQuantity() == 1)
- {
- removeStore(item, 1);
- }
- else
- {
- // Choose amount of items to trade
- new ItemAmountWindow(ItemAmountWindow::StoreRemove, this, item);
- }
+ ItemAmountWindow::showWindow(ItemAmountWindow::StoreRemove, this,
+ item);
}
}