aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathias <mathias>2006-03-09 19:38:18 (GMT)
committermathias <mathias>2006-03-09 19:38:18 (GMT)
commit70bd45e8e1c4b91676f80099aa87d11eeb3bf7d1 (patch)
tree50159f22f55eade81e9dc93b0159bff39d8fd0f7
parent918d1994fab393e88f422cf0e66875d2d77f7531 (diff)
downloadfluxbox_pavel-70bd45e8e1c4b91676f80099aa87d11eeb3bf7d1.zip
fluxbox_pavel-70bd45e8e1c4b91676f80099aa87d11eeb3bf7d1.tar.bz2
enhanced :NextWindow / :PrevWindow to accept <delta> as parameter, patch from marcus obst
-rw-r--r--ChangeLog4
-rw-r--r--src/FbCommandFactory.cc8
-rw-r--r--src/WorkspaceCmd.cc4
-rw-r--r--src/WorkspaceCmd.hh6
4 files changed, 16 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index f062a8d..27d204b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,10 @@
1(Format: Year/Month/Day) 1(Format: Year/Month/Day)
2Changes for 0.9.15: 2Changes 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() {
103void NextWorkspaceCmd::execute() { 103void 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
109void PrevWorkspaceCmd::execute() { 109void 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
115void LeftWorkspaceCmd::execute() { 115void 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
56class NextWorkspaceCmd: public FbTk::Command { 56class NextWorkspaceCmd: public FbTk::Command {
57public: 57public:
58 explicit NextWorkspaceCmd(int option):m_option(option) { }
58 void execute(); 59 void execute();
60private:
61 const int m_option;
59}; 62};
60 63
61class PrevWorkspaceCmd: public FbTk::Command { 64class PrevWorkspaceCmd: public FbTk::Command {
62public: 65public:
66 explicit PrevWorkspaceCmd(int option):m_option(option) { }
63 void execute(); 67 void execute();
68private:
69 const int m_option;
64}; 70};
65 71
66class LeftWorkspaceCmd: public FbTk::Command { 72class LeftWorkspaceCmd: public FbTk::Command {