aboutsummaryrefslogtreecommitdiff
path: root/src/WorkspaceNameTool.cc
diff options
context:
space:
mode:
authorHenrik Kinnunen <fluxgen@fluxbox.org>2008-09-21 11:44:48 (GMT)
committerHenrik Kinnunen <fluxgen@fluxbox.org>2008-09-21 11:44:48 (GMT)
commit86819abab91cf3ea20540278d00bad6a6b86d4b0 (patch)
treec8020d6015f3607a67730c6873a062fe29743356 /src/WorkspaceNameTool.cc
parentf5113e2ec1743d76ac414a020f617917c7933bb7 (diff)
downloadfluxbox-86819abab91cf3ea20540278d00bad6a6b86d4b0.zip
fluxbox-86819abab91cf3ea20540278d00bad6a6b86d4b0.tar.bz2
Changed current workspace signal in BScreen to use the new signal system
Diffstat (limited to 'src/WorkspaceNameTool.cc')
-rw-r--r--src/WorkspaceNameTool.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/WorkspaceNameTool.cc b/src/WorkspaceNameTool.cc
index 6c73df5..b6afad8 100644
--- a/src/WorkspaceNameTool.cc
+++ b/src/WorkspaceNameTool.cc
@@ -27,6 +27,7 @@
27#include "Workspace.hh" 27#include "Workspace.hh"
28 28
29#include "FbTk/ImageControl.hh" 29#include "FbTk/ImageControl.hh"
30#include "FbTk/MemFun.hh"
30 31
31#include <algorithm> 32#include <algorithm>
32 33
@@ -43,7 +44,10 @@ WorkspaceNameTool::WorkspaceNameTool(const FbTk::FbWindow &parent,
43 44
44 // setup signals 45 // setup signals
45 screen.workspaceNamesSig().attach(this); 46 screen.workspaceNamesSig().attach(this);
46 screen.currentWorkspaceSig().attach(this); 47
48 join(screen.currentWorkspaceSig(),
49 FbTk::MemFun(*this, &WorkspaceNameTool::updateForScreen));
50
47 theme.reconfigSig().attach(this); 51 theme.reconfigSig().attach(this);
48} 52}
49 53
@@ -67,8 +71,11 @@ void WorkspaceNameTool::moveResize(int x, int y,
67} 71}
68 72
69void WorkspaceNameTool::update(FbTk::Subject *subj) { 73void WorkspaceNameTool::update(FbTk::Subject *subj) {
74 updateForScreen(m_screen);
75}
70 76
71 m_button.setText(m_screen.currentWorkspace()->name()); 77void WorkspaceNameTool::updateForScreen(BScreen &screen) {
78 m_button.setText(screen.currentWorkspace()->name());
72 if (m_button.width() != width()) { 79 if (m_button.width() != width()) {
73 resize(width(), height()); 80 resize(width(), height());
74 resizeSig().notify(); 81 resizeSig().notify();