aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathias <mathias>2004-11-20 04:20:46 (GMT)
committermathias <mathias>2004-11-20 04:20:46 (GMT)
commitf6382f08ba0695f46e72d4dc1ad0f12133d468c2 (patch)
tree0c26cb0380a88aecd84d0f5348a55145334c1c9a
parent16c84203c8aa942ef7aeb130ff913d2993836f17 (diff)
downloadfluxbox_paul-f6382f08ba0695f46e72d4dc1ad0f12133d468c2.zip
fluxbox_paul-f6382f08ba0695f46e72d4dc1ad0f12133d468c2.tar.bz2
fix for adding/removing desktops (thanx Øyvind Albrigtsen)
-rw-r--r--src/WorkspaceMenu.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/WorkspaceMenu.cc b/src/WorkspaceMenu.cc
index f505cea..6403319 100644
--- a/src/WorkspaceMenu.cc
+++ b/src/WorkspaceMenu.cc
@@ -49,6 +49,9 @@ WorkspaceMenu::WorkspaceMenu(BScreen &screen):
49} 49}
50 50
51void WorkspaceMenu::update(FbTk::Subject *subj) { 51void WorkspaceMenu::update(FbTk::Subject *subj) {
52
53 _FB_USES_NLS;
54
52 if (subj != 0 && typeid(*subj) == typeid(BScreen::ScreenSubject)) { 55 if (subj != 0 && typeid(*subj) == typeid(BScreen::ScreenSubject)) {
53 BScreen::ScreenSubject &screen_subj = *static_cast<BScreen::ScreenSubject *>(subj); 56 BScreen::ScreenSubject &screen_subj = *static_cast<BScreen::ScreenSubject *>(subj);
54 BScreen &screen = screen_subj.screen(); 57 BScreen &screen = screen_subj.screen();
@@ -66,8 +69,8 @@ void WorkspaceMenu::update(FbTk::Subject *subj) {
66 FbTk::Menu::update(screen.currentWorkspace()->workspaceID() + 2); 69 FbTk::Menu::update(screen.currentWorkspace()->workspaceID() + 2);
67 } else if (subj == &screen.workspaceCountSig() || 70 } else if (subj == &screen.workspaceCountSig() ||
68 subj == &screen.workspaceNamesSig()) { 71 subj == &screen.workspaceNamesSig()) {
69 while (numberOfItems() != 3) { 72 while (numberOfItems() > 2) {
70 remove(2); 73 remove(numberOfItems()-1);
71 } 74 }
72 // for each workspace add workspace name and it's menu 75 // for each workspace add workspace name and it's menu
73 // to our workspace menu 76 // to our workspace menu
@@ -82,6 +85,8 @@ void WorkspaceMenu::update(FbTk::Subject *subj) {
82 mb_menu->setCommand(2, jump_cmd); 85 mb_menu->setCommand(2, jump_cmd);
83 insert(mb_menu); 86 insert(mb_menu);
84 } 87 }
88 insert(_FBTEXT(Menu, Icons, "Icons", "Iconic windows menu title"),
89 MenuCreator::createMenuType("iconmenu", screen.screenNumber()));
85 90
86 FbTk::Menu::update(-1); 91 FbTk::Menu::update(-1);
87 } 92 }