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:43:02 -0600
commit75fc8e62d25ff1d39408588f76d95df4a9a7e663 (patch)
treebaea474d54281912dfec08d75319a4a09f4e03bd /src/gui/setup.cpp
parent0540c611b48fd8dee14066b13755138192b7084b (diff)
downloadmana-client-75fc8e62d25ff1d39408588f76d95df4a9a7e663.tar.gz
mana-client-75fc8e62d25ff1d39408588f76d95df4a9a7e663.tar.bz2
mana-client-75fc8e62d25ff1d39408588f76d95df4a9a7e663.tar.xz
mana-client-75fc8e62d25ff1d39408588f76d95df4a9a7e663.zip
Fix some mem leaks
Diffstat (limited to 'src/gui/setup.cpp')
-rw-r--r--src/gui/setup.cpp11
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