diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-03-10 12:23:50 -0600 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-03-10 12:43:02 -0600 |
commit | 75fc8e62d25ff1d39408588f76d95df4a9a7e663 (patch) | |
tree | baea474d54281912dfec08d75319a4a09f4e03bd /src/gui/setup.cpp | |
parent | 0540c611b48fd8dee14066b13755138192b7084b (diff) | |
download | mana-75fc8e62d25ff1d39408588f76d95df4a9a7e663.tar.gz mana-75fc8e62d25ff1d39408588f76d95df4a9a7e663.tar.bz2 mana-75fc8e62d25ff1d39408588f76d95df4a9a7e663.tar.xz mana-75fc8e62d25ff1d39408588f76d95df4a9a7e663.zip |
Fix some mem leaks
Diffstat (limited to 'src/gui/setup.cpp')
-rw-r--r-- | src/gui/setup.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp index 4798f598..b24aeb5d 100644 --- a/src/gui/setup.cpp +++ b/src/gui/setup.cpp @@ -65,9 +65,9 @@ Setup::Setup(): btn->setPosition(x, height - btn->getHeight() - 5); add(btn); - // Disable this button when the windows aren't created yet + // Store this button, as it needs to be enabled/disabled if (!strcmp(*curBtn, "Reset Windows")) - btn->setEnabled(statusWindow != NULL); + mResetWindows = btn; } TabbedArea *panel = new TabbedArea(); @@ -102,6 +102,8 @@ Setup::Setup(): add(panel); setLocationRelativeTo(getParent()); + + setInGame(false); } Setup::~Setup() @@ -141,3 +143,8 @@ void Setup::action(const gcn::ActionEvent &event) tradeWindow->resetToDefaultSize(); } } + +void Setup::setInGame(bool inGame) +{ + mResetWindows->setEnabled(inGame); +}
\ No newline at end of file |