diff options
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; |