diff options
author | Henrik Kinnunen <fluxgen@fluxbox.org> | 2008-09-21 13:25:47 (GMT) |
---|---|---|
committer | Henrik Kinnunen <fluxgen@fluxbox.org> | 2008-09-21 13:25:47 (GMT) |
commit | 71674739ec6de376273cb3c5b938da132e7035c5 (patch) | |
tree | abd6e295067347b6f95622c9ed1a00c6396dc314 /src/fluxbox.cc | |
parent | 86819abab91cf3ea20540278d00bad6a6b86d4b0 (diff) | |
download | fluxbox-71674739ec6de376273cb3c5b938da132e7035c5.zip fluxbox-71674739ec6de376273cb3c5b938da132e7035c5.tar.bz2 |
Changed workspace names signal in BScreen to use the new signal system
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r-- | src/fluxbox.cc | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index acbb55d..e9c548c 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -454,10 +454,11 @@ void Fluxbox::initScreen(BScreen *screen) { | |||
454 | 454 | ||
455 | // attach screen signals to this | 455 | // attach screen signals to this |
456 | screen->focusedWindowSig().attach(this); | 456 | screen->focusedWindowSig().attach(this); |
457 | screen->workspaceNamesSig().attach(this); | ||
458 | screen->workspaceAreaSig().attach(this); | 457 | screen->workspaceAreaSig().attach(this); |
459 | screen->clientListSig().attach(this); | 458 | screen->clientListSig().attach(this); |
460 | 459 | ||
460 | join(screen->workspaceNamesSig(), | ||
461 | FbTk::MemFun(*this, &Fluxbox::workspaceNamesChanged)); | ||
461 | join(screen->currentWorkspaceSig(), | 462 | join(screen->currentWorkspaceSig(), |
462 | FbTk::MemFun(*this, &Fluxbox::workspaceChanged)); | 463 | FbTk::MemFun(*this, &Fluxbox::workspaceChanged)); |
463 | 464 | ||
@@ -1102,13 +1103,7 @@ void Fluxbox::update(FbTk::Subject *changedsub) { | |||
1102 | } else if (typeid(*changedsub) == typeid(BScreen::ScreenSubject)) { | 1103 | } else if (typeid(*changedsub) == typeid(BScreen::ScreenSubject)) { |
1103 | BScreen::ScreenSubject *subj = dynamic_cast<BScreen::ScreenSubject *>(changedsub); | 1104 | BScreen::ScreenSubject *subj = dynamic_cast<BScreen::ScreenSubject *>(changedsub); |
1104 | BScreen &screen = subj->screen(); | 1105 | BScreen &screen = subj->screen(); |
1105 | if ((&(screen.workspaceNamesSig())) == changedsub) { | 1106 | if ((&(screen.focusedWindowSig())) == changedsub) { |
1106 | for (AtomHandlerContainerIt it= m_atomhandler.begin(); | ||
1107 | it != m_atomhandler.end(); ++it) { | ||
1108 | if ((*it).first->update()) | ||
1109 | (*it).first->updateWorkspaceNames(screen); | ||
1110 | } | ||
1111 | } else if ((&(screen.focusedWindowSig())) == changedsub) { | ||
1112 | for (AtomHandlerContainerIt it= m_atomhandler.begin(); | 1107 | for (AtomHandlerContainerIt it= m_atomhandler.begin(); |
1113 | it != m_atomhandler.end(); it++) { | 1108 | it != m_atomhandler.end(); it++) { |
1114 | (*it).first->updateFocusedWindow(screen, | 1109 | (*it).first->updateFocusedWindow(screen, |
@@ -1530,3 +1525,11 @@ void Fluxbox::workspaceChanged( BScreen& screen ) { | |||
1530 | (*it).first->updateCurrentWorkspace(screen); | 1525 | (*it).first->updateCurrentWorkspace(screen); |
1531 | } | 1526 | } |
1532 | } | 1527 | } |
1528 | |||
1529 | void Fluxbox::workspaceNamesChanged(BScreen &screen) { | ||
1530 | for (AtomHandlerContainerIt it= m_atomhandler.begin(); | ||
1531 | it != m_atomhandler.end(); ++it) { | ||
1532 | if ((*it).first->update()) | ||
1533 | (*it).first->updateWorkspaceNames(screen); | ||
1534 | } | ||
1535 | } | ||