all repos — fluxbox @ f6382f08ba0695f46e72d4dc1ad0f12133d468c2

custom fork of the fluxbox windowmanager

fix for adding/removing desktops (thanx Øyvind Albrigtsen)
mathias mathias
commit

f6382f08ba0695f46e72d4dc1ad0f12133d468c2

parent

16c84203c8aa942ef7aeb130ff913d2993836f17

1 files changed, 7 insertions(+), 2 deletions(-)

jump to
M src/WorkspaceMenu.ccsrc/WorkspaceMenu.cc

@@ -49,6 +49,9 @@ init(screen);

} void WorkspaceMenu::update(FbTk::Subject *subj) { + + _FB_USES_NLS; + if (subj != 0 && typeid(*subj) == typeid(BScreen::ScreenSubject)) { BScreen::ScreenSubject &screen_subj = *static_cast<BScreen::ScreenSubject *>(subj); BScreen &screen = screen_subj.screen();

@@ -66,8 +69,8 @@ setItemSelected(screen.currentWorkspace()->workspaceID() + 2, true);

FbTk::Menu::update(screen.currentWorkspace()->workspaceID() + 2); } else if (subj == &screen.workspaceCountSig() || subj == &screen.workspaceNamesSig()) { - while (numberOfItems() != 3) { - remove(2); + while (numberOfItems() > 2) { + remove(numberOfItems()-1); } // for each workspace add workspace name and it's menu // to our workspace menu

@@ -82,6 +85,8 @@ FbTk::RefCount<FbTk::Command> jump_cmd(new JumpToWorkspaceCmd(wkspc->workspaceID()));

mb_menu->setCommand(2, jump_cmd); insert(mb_menu); } + insert(_FBTEXT(Menu, Icons, "Icons", "Iconic windows menu title"), + MenuCreator::createMenuType("iconmenu", screen.screenNumber())); FbTk::Menu::update(-1); }