aboutsummaryrefslogtreecommitdiff
path: root/src/WorkspaceCmd.cc
diff options
context:
space:
mode:
authorsimonb <simonb>2006-04-16 11:29:38 (GMT)
committersimonb <simonb>2006-04-16 11:29:38 (GMT)
commit4d0a0c9e114cbadf3d06f4a71d5043bda847c844 (patch)
treec4cfc295858dcb23cc9637a413e7a75f4be6c14e /src/WorkspaceCmd.cc
parent553104ee1d53104fa0790a9793a7047c61dd073f (diff)
downloadfluxbox-4d0a0c9e114cbadf3d06f4a71d5043bda847c844.zip
fluxbox-4d0a0c9e114cbadf3d06f4a71d5043bda847c844.tar.bz2
add CloseAllWindows key action
thanks Adriano Dal Bosco - adbosco at users.sourceforge.net
Diffstat (limited to 'src/WorkspaceCmd.cc')
-rw-r--r--src/WorkspaceCmd.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/WorkspaceCmd.cc b/src/WorkspaceCmd.cc
index 3673e17..9951e0e 100644
--- a/src/WorkspaceCmd.cc
+++ b/src/WorkspaceCmd.cc
@@ -238,3 +238,24 @@ void ShowDesktopCmd::execute() {
238 windows.end(), 238 windows.end(),
239 std::mem_fun(&FluxboxWindow::iconify)); 239 std::mem_fun(&FluxboxWindow::iconify));
240} 240}
241
242void CloseAllWindowsCmd::execute() {
243 BScreen *screen = Fluxbox::instance()->mouseScreen();
244 if (screen == 0)
245 return;
246
247 BScreen::Workspaces::iterator workspace_it = screen->getWorkspacesList().begin();
248 BScreen::Workspaces::iterator workspace_it_end = screen->getWorkspacesList().end();
249 for (; workspace_it != workspace_it_end; ++workspace_it) {
250 Workspace::Windows windows((*workspace_it)->windowList());
251 std::for_each(windows.begin(),
252 windows.end(),
253 std::mem_fun(&FluxboxWindow::close));
254 }
255 BScreen::Icons::iterator icon_it = screen->iconList().begin();
256 BScreen::Icons::iterator icon_it_end = screen->iconList().end();
257 for (; icon_it != icon_it_end; ++icon_it ) {
258 (*icon_it)->close();
259 }
260
261}