From 383b667c30665377ee5bd5c1167530eb44ce4571 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 12 Aug 2011 03:24:12 +0300 Subject: Allow hide setup window by pressing key "Setup window". --- src/gui/setup.cpp | 9 +++++++-- src/gui/setup.h | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src/gui') diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp index 0b40d8c01..690871189 100644 --- a/src/gui/setup.cpp +++ b/src/gui/setup.cpp @@ -145,8 +145,7 @@ void Setup::action(const gcn::ActionEvent &event) } else if (event.getId() == "Cancel") { - setVisible(false); - for_each(mTabs.begin(), mTabs.end(), std::mem_fun(&SetupTab::cancel)); + doCancel(); } else if (event.getId() == "Store") { @@ -189,4 +188,10 @@ void Setup::registerWindowForReset(Window *window) mWindowsToReset.push_back(window); } +void Setup::doCancel() +{ + setVisible(false); + for_each(mTabs.begin(), mTabs.end(), std::mem_fun(&SetupTab::cancel)); +} + Setup *setupWindow; diff --git a/src/gui/setup.h b/src/gui/setup.h index ad5ba53d9..cdaf7db99 100644 --- a/src/gui/setup.h +++ b/src/gui/setup.h @@ -71,6 +71,8 @@ class Setup : public Window, public gcn::ActionListener void clearWindowsForReset() { mWindowsToReset.clear(); } + void doCancel(); + private: std::list mTabs; std::list mWindowsToReset; -- cgit v1.2.3-60-g2f50