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/WorkspaceMenu.cc | |
parent | 86819abab91cf3ea20540278d00bad6a6b86d4b0 (diff) | |
download | fluxbox_pavel-71674739ec6de376273cb3c5b938da132e7035c5.zip fluxbox_pavel-71674739ec6de376273cb3c5b938da132e7035c5.tar.bz2 |
Changed workspace names signal in BScreen to use the new signal system
Diffstat (limited to 'src/WorkspaceMenu.cc')
-rw-r--r-- | src/WorkspaceMenu.cc | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/WorkspaceMenu.cc b/src/WorkspaceMenu.cc index dd7b96e..c343920 100644 --- a/src/WorkspaceMenu.cc +++ b/src/WorkspaceMenu.cc | |||
@@ -97,27 +97,14 @@ void WorkspaceMenu::workspaceChanged(BScreen& screen) { | |||
97 | updateMenu(screen.currentWorkspace()->workspaceID() + IDX_AFTER_ICONS); | 97 | updateMenu(screen.currentWorkspace()->workspaceID() + IDX_AFTER_ICONS); |
98 | } | 98 | } |
99 | 99 | ||
100 | void WorkspaceMenu::update(FbTk::Subject *subj) { | ||
101 | |||
102 | if (subj != 0 && typeid(*subj) == typeid(BScreen::ScreenSubject)) { | ||
103 | BScreen::ScreenSubject &screen_subj = *static_cast<BScreen::ScreenSubject *>(subj); | ||
104 | BScreen &screen = screen_subj.screen(); | ||
105 | if ( subj == &screen.workspaceNamesSig() ) { | ||
106 | workspaceInfoChanged( screen ); | ||
107 | } | ||
108 | } else { | ||
109 | FbTk::Menu::update(subj); | ||
110 | } | ||
111 | } | ||
112 | |||
113 | void WorkspaceMenu::init(BScreen &screen) { | 100 | void WorkspaceMenu::init(BScreen &screen) { |
114 | 101 | ||
115 | screen.workspaceNamesSig().attach(this); | ||
116 | |||
117 | join(screen.currentWorkspaceSig(), | 102 | join(screen.currentWorkspaceSig(), |
118 | FbTk::MemFun(*this, &WorkspaceMenu::workspaceChanged)); | 103 | FbTk::MemFun(*this, &WorkspaceMenu::workspaceChanged)); |
119 | join(screen.workspaceCountSig(), | 104 | join(screen.workspaceCountSig(), |
120 | FbTk::MemFun(*this, &WorkspaceMenu::workspaceInfoChanged)); | 105 | FbTk::MemFun(*this, &WorkspaceMenu::workspaceInfoChanged)); |
106 | join(screen.workspaceNamesSig(), | ||
107 | FbTk::MemFun(*this, &WorkspaceMenu::workspaceInfoChanged)); | ||
121 | 108 | ||
122 | using namespace FbTk; | 109 | using namespace FbTk; |
123 | _FB_USES_NLS; | 110 | _FB_USES_NLS; |