diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-29 20:27:35 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-29 20:27:35 +0200 |
commit | 303943ab196534c3b4a6d9cbec8580ca4bc29b91 (patch) | |
tree | 7e98d31e661d4fd201a917fdf2ad34eea5d969b3 /src | |
parent | 86ec58bf1456a6349e3ac162387a630a8ffb11d7 (diff) | |
download | mana-303943ab196534c3b4a6d9cbec8580ca4bc29b91.tar.gz mana-303943ab196534c3b4a6d9cbec8580ca4bc29b91.tar.bz2 mana-303943ab196534c3b4a6d9cbec8580ca4bc29b91.tar.xz mana-303943ab196534c3b4a6d9cbec8580ca4bc29b91.zip |
Fixed the name of the buy button member of BuySellDialog
Missed the m prefix.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/buysell.cpp | 15 | ||||
-rw-r--r-- | src/gui/buysell.h | 2 |
2 files changed, 9 insertions, 8 deletions
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) diff --git a/src/gui/buysell.h b/src/gui/buysell.h index 13fbea8c..185a103d 100644 --- a/src/gui/buysell.h +++ b/src/gui/buysell.h @@ -55,7 +55,7 @@ class BuySellDialog : public Window, public gcn::ActionListener void action(const gcn::ActionEvent &event); private: - gcn::Button* buyButton; + gcn::Button *mBuyButton; }; extern BuySellDialog *buySellDialog; |