summaryrefslogtreecommitdiff
path: root/src/gui/widgets/container.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-02-07 18:03:09 +0200
committerAndrei Karas <akaras@inbox.ru>2011-02-07 18:03:09 +0200
commitb2ce88bae2b95adb612456d9659669d6b686de7b (patch)
treeb165a1f2a98c4c99ce1c0a142a53e71f3d0b3b00 /src/gui/widgets/container.cpp
parent2c765dc21314b1b32f7a75686571127f8af38bf9 (diff)
downloadplus-b2ce88bae2b95adb612456d9659669d6b686de7b.tar.gz
plus-b2ce88bae2b95adb612456d9659669d6b686de7b.tar.bz2
plus-b2ce88bae2b95adb612456d9659669d6b686de7b.tar.xz
plus-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.cpp14
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