From 303943ab196534c3b4a6d9cbec8580ca4bc29b91 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Wed, 29 Apr 2009 20:27:35 +0200 Subject: Fixed the name of the buy button member of BuySellDialog Missed the m prefix. --- src/gui/buysell.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/gui/buysell.cpp') diff --git a/src/gui/buysell.cpp b/src/gui/buysell.cpp index 3032b7b1..53c2419a 100644 --- a/src/gui/buysell.cpp +++ b/src/gui/buysell.cpp @@ -31,10 +31,11 @@ #include "utils/gettext.h" BuySellDialog::BuySellDialog(): - Window(_("Shop")) + Window(_("Shop")), + mBuyButton(0) { setWindowName("BuySell"); - buyButton = 0; + static const char *buttonNames[] = { N_("Buy"), N_("Sell"), N_("Cancel"), 0 }; @@ -43,15 +44,15 @@ BuySellDialog::BuySellDialog(): for (const char **curBtn = buttonNames; *curBtn; curBtn++) { Button *btn = new Button(gettext(*curBtn), *curBtn, this); - if (!buyButton) - buyButton = btn; // For focus request + if (!mBuyButton) + mBuyButton = btn; // For focus request btn->setPosition(x, y); add(btn); x += btn->getWidth() + 10; } - buyButton->requestFocus(); + mBuyButton->requestFocus(); - setContentSize(x, 2 * y + buyButton->getHeight()); + setContentSize(x, 2 * y + mBuyButton->getHeight()); center(); setDefaultSize(); @@ -71,7 +72,7 @@ void BuySellDialog::setVisible(bool visible) Window::setVisible(visible); if (visible) - buyButton->requestFocus(); + mBuyButton->requestFocus(); } void BuySellDialog::action(const gcn::ActionEvent &event) -- cgit v1.2.3-60-g2f50