From ec4656af8e2d1946ea2b1d036457c885a9e420dd Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Thu, 7 May 2009 23:18:19 -0600 Subject: Remove the cancel button from ItemAmountWindow It's completely superfluous, due to the close button (which the cancel button was just calling anyways). --- src/gui/itemamount.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/gui/itemamount.cpp') diff --git a/src/gui/itemamount.cpp b/src/gui/itemamount.cpp index e3891d29..32ad4706 100644 --- a/src/gui/itemamount.cpp +++ b/src/gui/itemamount.cpp @@ -86,7 +86,6 @@ ItemAmountWindow::ItemAmountWindow(Usage usage, Window *parent, Item *item, Button *minusButton = new Button("-", "Minus", this); Button *plusButton = new Button("+", "Plus", this); Button *okButton = new Button(_("Ok"), "Ok", this); - Button *cancelButton = new Button(_("Cancel"), "Cancel", this); Button *addAllButton = new Button(_("All"), "All", this); minusButton->adjustSize(); @@ -102,7 +101,6 @@ ItemAmountWindow::ItemAmountWindow(Usage usage, Window *parent, Item *item, place = getPlacer(0, 1); place(0, 0, mItemAmountSlide, 6); place = getPlacer(0, 2); - place(4, 0, cancelButton); place(5, 0, okButton); reflowLayout(225, 0); @@ -140,11 +138,7 @@ void ItemAmountWindow::action(const gcn::ActionEvent &event) { int amount = mItemAmountTextField->getValue(); - if (event.getId() == "Cancel") - { - close(); - } - else if (event.getId() == "Plus" && amount < mMax) + if (event.getId() == "Plus" && amount < mMax) { amount++; } -- cgit v1.2.3-70-g09d2