diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/FbCommandFactory.cc | 8 | ||||
-rw-r--r-- | src/WorkspaceCmd.cc | 4 | ||||
-rw-r--r-- | src/WorkspaceCmd.hh | 6 |
3 files changed, 12 insertions, 6 deletions
diff --git a/src/FbCommandFactory.cc b/src/FbCommandFactory.cc index f1637b9..aa091bb 100644 --- a/src/FbCommandFactory.cc +++ b/src/FbCommandFactory.cc | |||
@@ -350,10 +350,10 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command, | |||
350 | // | 350 | // |
351 | // Workspace commands | 351 | // Workspace commands |
352 | // | 352 | // |
353 | else if (command == "nextworkspace" && arguments.empty()) | 353 | else if (command == "nextworkspace") |
354 | return new NextWorkspaceCmd(); | 354 | return new NextWorkspaceCmd(atoi(arguments.c_str())); |
355 | else if (command == "prevworkspace" && arguments.empty()) | 355 | else if (command == "prevworkspace") |
356 | return new PrevWorkspaceCmd(); | 356 | return new PrevWorkspaceCmd(atoi(arguments.c_str())); |
357 | else if (command == "rightworkspace") | 357 | else if (command == "rightworkspace") |
358 | return new RightWorkspaceCmd(atoi(arguments.c_str())); | 358 | return new RightWorkspaceCmd(atoi(arguments.c_str())); |
359 | else if (command == "leftworkspace") | 359 | else if (command == "leftworkspace") |
diff --git a/src/WorkspaceCmd.cc b/src/WorkspaceCmd.cc index 39b415b..e50913f 100644 --- a/src/WorkspaceCmd.cc +++ b/src/WorkspaceCmd.cc | |||
@@ -103,13 +103,13 @@ void DirFocusCmd::execute() { | |||
103 | void NextWorkspaceCmd::execute() { | 103 | void NextWorkspaceCmd::execute() { |
104 | BScreen *screen = Fluxbox::instance()->mouseScreen(); | 104 | BScreen *screen = Fluxbox::instance()->mouseScreen(); |
105 | if (screen != 0) | 105 | if (screen != 0) |
106 | screen->nextWorkspace(); | 106 | screen->nextWorkspace(m_option == 0 ? 1 : m_option); |
107 | } | 107 | } |
108 | 108 | ||
109 | void PrevWorkspaceCmd::execute() { | 109 | void PrevWorkspaceCmd::execute() { |
110 | BScreen *screen = Fluxbox::instance()->mouseScreen(); | 110 | BScreen *screen = Fluxbox::instance()->mouseScreen(); |
111 | if (screen != 0) | 111 | if (screen != 0) |
112 | screen->prevWorkspace(); | 112 | screen->prevWorkspace(m_option == 0 ? 1 : m_option); |
113 | } | 113 | } |
114 | 114 | ||
115 | void LeftWorkspaceCmd::execute() { | 115 | void LeftWorkspaceCmd::execute() { |
diff --git a/src/WorkspaceCmd.hh b/src/WorkspaceCmd.hh index 7051fa0..786492d 100644 --- a/src/WorkspaceCmd.hh +++ b/src/WorkspaceCmd.hh | |||
@@ -55,12 +55,18 @@ private: | |||
55 | 55 | ||
56 | class NextWorkspaceCmd: public FbTk::Command { | 56 | class NextWorkspaceCmd: public FbTk::Command { |
57 | public: | 57 | public: |
58 | explicit NextWorkspaceCmd(int option):m_option(option) { } | ||
58 | void execute(); | 59 | void execute(); |
60 | private: | ||
61 | const int m_option; | ||
59 | }; | 62 | }; |
60 | 63 | ||
61 | class PrevWorkspaceCmd: public FbTk::Command { | 64 | class PrevWorkspaceCmd: public FbTk::Command { |
62 | public: | 65 | public: |
66 | explicit PrevWorkspaceCmd(int option):m_option(option) { } | ||
63 | void execute(); | 67 | void execute(); |
68 | private: | ||
69 | const int m_option; | ||
64 | }; | 70 | }; |
65 | 71 | ||
66 | class LeftWorkspaceCmd: public FbTk::Command { | 72 | class LeftWorkspaceCmd: public FbTk::Command { |