diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-02-07 18:03:09 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-02-07 18:03:09 +0200 |
commit | b2ce88bae2b95adb612456d9659669d6b686de7b (patch) | |
tree | b165a1f2a98c4c99ce1c0a142a53e71f3d0b3b00 /src/gui/widgets/container.cpp | |
parent | 2c765dc21314b1b32f7a75686571127f8af38bf9 (diff) | |
download | manaplus-b2ce88bae2b95adb612456d9659669d6b686de7b.tar.gz manaplus-b2ce88bae2b95adb612456d9659669d6b686de7b.tar.bz2 manaplus-b2ce88bae2b95adb612456d9659669d6b686de7b.tar.xz manaplus-b2ce88bae2b95adb612456d9659669d6b686de7b.zip |
Add ability to show/hide buttons in top right window corner.
Diffstat (limited to 'src/gui/widgets/container.cpp')
-rw-r--r-- | src/gui/widgets/container.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/widgets/container.cpp b/src/gui/widgets/container.cpp index b788b0610..f6281d578 100644 --- a/src/gui/widgets/container.cpp +++ b/src/gui/widgets/container.cpp @@ -31,3 +31,17 @@ Container::~Container() while (!mWidgets.empty()) delete mWidgets.front(); } + +bool Container::safeRemove(gcn::Widget* widget) +{ + WidgetListIterator iter; + for (iter = mWidgets.begin(); iter != mWidgets.end(); ++iter) + { + if (*iter == widget) + { + remove(widget); + return true; + } + } + return false; +}
\ No newline at end of file |