summaryrefslogtreecommitdiff
path: root/src/gui/setup.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-03-10 12:23:50 -0600
committerIra Rice <irarice@gmail.com>2009-03-10 12:50:39 -0600
commitcabb9735f2e31b9f1f64b2496e1775d54861da36 (patch)
tree6772eda38f08a77af7717c8f4747aab77061cfcf /src/gui/setup.cpp
parent75fc8e62d25ff1d39408588f76d95df4a9a7e663 (diff)
downloadMana-cabb9735f2e31b9f1f64b2496e1775d54861da36.tar.gz
Mana-cabb9735f2e31b9f1f64b2496e1775d54861da36.tar.bz2
Mana-cabb9735f2e31b9f1f64b2496e1775d54861da36.tar.xz
Mana-cabb9735f2e31b9f1f64b2496e1775d54861da36.zip
Fix some mem leaks
Diffstat (limited to 'src/gui/setup.cpp')
-rw-r--r--src/gui/setup.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp
index b24aeb5d..4798f598 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);
- // Store this button, as it needs to be enabled/disabled
+ // Disable this button when the windows aren't created yet
if (!strcmp(*curBtn, "Reset Windows"))
- mResetWindows = btn;
+ btn->setEnabled(statusWindow != NULL);
}
TabbedArea *panel = new TabbedArea();
@@ -102,8 +102,6 @@ Setup::Setup():
add(panel);
setLocationRelativeTo(getParent());
-
- setInGame(false);
}
Setup::~Setup()
@@ -143,8 +141,3 @@ void Setup::action(const gcn::ActionEvent &event)
tradeWindow->resetToDefaultSize();
}
}
-
-void Setup::setInGame(bool inGame)
-{
- mResetWindows->setEnabled(inGame);
-} \ No newline at end of file