enhanced :NextWindow / :PrevWindow to accept <delta> as parameter, patch from marcus obst
mathias mathias
4 files changed,
16 insertions(+),
6 deletions(-)
M
ChangeLog
→
ChangeLog
@@ -1,6 +1,10 @@
(Format: Year/Month/Day) Changes for 0.9.15: *06/03/09: + * Enhanced :NextWindow and :PrevWindow to accept a <delta>,see + :RightWindow and :LeftWindow + (Thanks Marcus Obst, marcus dot obst at s2003 dot tu minus chemnitz dot de) + FbCommandFactory.cc WorkspaceCmd.hh WorkspaceCmd.cc * Bugfix for _net_wm_state_hidden (Thanks Mark) Ewmh.cc * Updated ko_KR translations (Thanks Jo Hyunseok)
M
src/FbCommandFactory.cc
→
src/FbCommandFactory.cc
@@ -350,10 +350,10 @@ return new CurrentWindowCmd(&FluxboxWindow::popupMenu);
// // Workspace commands // - else if (command == "nextworkspace" && arguments.empty()) - return new NextWorkspaceCmd(); - else if (command == "prevworkspace" && arguments.empty()) - return new PrevWorkspaceCmd(); + else if (command == "nextworkspace") + return new NextWorkspaceCmd(atoi(arguments.c_str())); + else if (command == "prevworkspace") + return new PrevWorkspaceCmd(atoi(arguments.c_str())); else if (command == "rightworkspace") return new RightWorkspaceCmd(atoi(arguments.c_str())); else if (command == "leftworkspace")
M
src/WorkspaceCmd.cc
→
src/WorkspaceCmd.cc
@@ -103,13 +103,13 @@
void NextWorkspaceCmd::execute() { BScreen *screen = Fluxbox::instance()->mouseScreen(); if (screen != 0) - screen->nextWorkspace(); + screen->nextWorkspace(m_option == 0 ? 1 : m_option); } void PrevWorkspaceCmd::execute() { BScreen *screen = Fluxbox::instance()->mouseScreen(); if (screen != 0) - screen->prevWorkspace(); + screen->prevWorkspace(m_option == 0 ? 1 : m_option); } void LeftWorkspaceCmd::execute() {
M
src/WorkspaceCmd.hh
→
src/WorkspaceCmd.hh
@@ -55,12 +55,18 @@ };
class NextWorkspaceCmd: public FbTk::Command { public: + explicit NextWorkspaceCmd(int option):m_option(option) { } void execute(); +private: + const int m_option; }; class PrevWorkspaceCmd: public FbTk::Command { public: + explicit PrevWorkspaceCmd(int option):m_option(option) { } void execute(); +private: + const int m_option; }; class LeftWorkspaceCmd: public FbTk::Command {