diff options
Diffstat (limited to 'src/WorkspaceNameTool.cc')
-rw-r--r-- | src/WorkspaceNameTool.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/WorkspaceNameTool.cc b/src/WorkspaceNameTool.cc index 3a4b275..6451a0a 100644 --- a/src/WorkspaceNameTool.cc +++ b/src/WorkspaceNameTool.cc | |||
@@ -44,11 +44,11 @@ WorkspaceNameTool::WorkspaceNameTool(const FbTk::FbWindow &parent, | |||
44 | 44 | ||
45 | // setup signals | 45 | // setup signals |
46 | join(screen.currentWorkspaceSig(), | 46 | join(screen.currentWorkspaceSig(), |
47 | FbTk::MemFun(*this, &WorkspaceNameTool::updateForScreen)); | 47 | FbTk::MemFunIgnoreArgs(*this, &WorkspaceNameTool::update)); |
48 | join(screen.workspaceNamesSig(), | 48 | join(screen.workspaceNamesSig(), |
49 | FbTk::MemFun(*this, &WorkspaceNameTool::updateForScreen)); | 49 | FbTk::MemFunIgnoreArgs(*this, &WorkspaceNameTool::update)); |
50 | 50 | ||
51 | theme.reconfigSig().attach(this); | 51 | join(theme.reconfigSig(), FbTk::MemFun(*this, &WorkspaceNameTool::update)); |
52 | } | 52 | } |
53 | 53 | ||
54 | WorkspaceNameTool::~WorkspaceNameTool() { | 54 | WorkspaceNameTool::~WorkspaceNameTool() { |
@@ -70,12 +70,8 @@ void WorkspaceNameTool::moveResize(int x, int y, | |||
70 | m_button.moveResize(x, y, width, height); | 70 | m_button.moveResize(x, y, width, height); |
71 | } | 71 | } |
72 | 72 | ||
73 | void WorkspaceNameTool::update(FbTk::Subject *subj) { | 73 | void WorkspaceNameTool::update() { |
74 | updateForScreen(m_screen); | 74 | m_button.setText(m_screen.currentWorkspace()->name()); |
75 | } | ||
76 | |||
77 | void WorkspaceNameTool::updateForScreen(BScreen &screen) { | ||
78 | m_button.setText(screen.currentWorkspace()->name()); | ||
79 | if (m_button.width() != width()) { | 75 | if (m_button.width() != width()) { |
80 | resize(width(), height()); | 76 | resize(width(), height()); |
81 | resizeSig().notify(); | 77 | resizeSig().notify(); |