diff options
author | mathias <mathias> | 2006-03-09 19:38:18 (GMT) |
---|---|---|
committer | mathias <mathias> | 2006-03-09 19:38:18 (GMT) |
commit | 70bd45e8e1c4b91676f80099aa87d11eeb3bf7d1 (patch) | |
tree | 50159f22f55eade81e9dc93b0159bff39d8fd0f7 | |
parent | 918d1994fab393e88f422cf0e66875d2d77f7531 (diff) | |
download | fluxbox_pavel-70bd45e8e1c4b91676f80099aa87d11eeb3bf7d1.zip fluxbox_pavel-70bd45e8e1c4b91676f80099aa87d11eeb3bf7d1.tar.bz2 |
enhanced :NextWindow / :PrevWindow to accept <delta> as parameter, patch from marcus obst
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/FbCommandFactory.cc | 8 | ||||
-rw-r--r-- | src/WorkspaceCmd.cc | 4 | ||||
-rw-r--r-- | src/WorkspaceCmd.hh | 6 |
4 files changed, 16 insertions, 6 deletions
@@ -1,6 +1,10 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 0.9.15: | 2 | Changes for 0.9.15: |
3 | *06/03/09: | 3 | *06/03/09: |
4 | * Enhanced :NextWindow and :PrevWindow to accept a <delta>,see | ||
5 | :RightWindow and :LeftWindow | ||
6 | (Thanks Marcus Obst, marcus dot obst at s2003 dot tu minus chemnitz dot de) | ||
7 | FbCommandFactory.cc WorkspaceCmd.hh WorkspaceCmd.cc | ||
4 | * Bugfix for _net_wm_state_hidden (Thanks Mark) | 8 | * Bugfix for _net_wm_state_hidden (Thanks Mark) |
5 | Ewmh.cc | 9 | Ewmh.cc |
6 | * Updated ko_KR translations (Thanks Jo Hyunseok) | 10 | * Updated ko_KR translations (Thanks Jo Hyunseok) |
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 { |