diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/FbCommandFactory.cc | 6 | ||||
-rw-r--r-- | src/WorkspaceCmd.cc | 12 | ||||
-rw-r--r-- | src/WorkspaceCmd.hh | 10 |
4 files changed, 31 insertions, 0 deletions
@@ -1,5 +1,8 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 1.1: | 2 | Changes for 1.1: |
3 | *07/06/01: | ||
4 | * Added key commands AddWorkspace and RemoveLastWorkspace (Mark) | ||
5 | FbCommandFactory.cc WorkspaceCmd.cc/hh | ||
3 | *07/05/23: | 6 | *07/05/23: |
4 | * Added key command :Attach <pattern> which groups all windows matching the | 7 | * Added key command :Attach <pattern> which groups all windows matching the |
5 | given pattern (Mark) | 8 | given pattern (Mark) |
diff --git a/src/FbCommandFactory.cc b/src/FbCommandFactory.cc index 1e5b506..2e19700 100644 --- a/src/FbCommandFactory.cc +++ b/src/FbCommandFactory.cc | |||
@@ -84,6 +84,7 @@ void parseNextWindowArgs(const string &in, int &opts, string &pat) { | |||
84 | FbCommandFactory::FbCommandFactory() { | 84 | FbCommandFactory::FbCommandFactory() { |
85 | // setup commands that we can handle | 85 | // setup commands that we can handle |
86 | const char* commands[] = { | 86 | const char* commands[] = { |
87 | "addworkspace", | ||
87 | "arrangewindows", | 88 | "arrangewindows", |
88 | "attach", | 89 | "attach", |
89 | "bindkey", | 90 | "bindkey", |
@@ -142,6 +143,7 @@ FbCommandFactory::FbCommandFactory() { | |||
142 | "reconfig", | 143 | "reconfig", |
143 | "reconfigure", | 144 | "reconfigure", |
144 | "reloadstyle", | 145 | "reloadstyle", |
146 | "removelastworkspace", | ||
145 | "resizeto", | 147 | "resizeto", |
146 | "resize", | 148 | "resize", |
147 | "resizehorizontal", | 149 | "resizehorizontal", |
@@ -260,6 +262,10 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command, | |||
260 | return new SetResourceValueCmd(name, value); | 262 | return new SetResourceValueCmd(name, value); |
261 | } else if (command == "setresourcevaluedialog") | 263 | } else if (command == "setresourcevaluedialog") |
262 | return new SetResourceValueDialogCmd(); | 264 | return new SetResourceValueDialogCmd(); |
265 | else if (command == "addworkspace") | ||
266 | return new AddWorkspaceCmd(); | ||
267 | else if (command == "removelastworkspace") | ||
268 | return new RemoveLastWorkspaceCmd(); | ||
263 | // | 269 | // |
264 | // Current focused window commands | 270 | // Current focused window commands |
265 | // | 271 | // |
diff --git a/src/WorkspaceCmd.cc b/src/WorkspaceCmd.cc index a9b7aca..79c002e 100644 --- a/src/WorkspaceCmd.cc +++ b/src/WorkspaceCmd.cc | |||
@@ -137,6 +137,18 @@ void DirFocusCmd::execute() { | |||
137 | screen->focusControl().dirFocus(*win, m_dir); | 137 | screen->focusControl().dirFocus(*win, m_dir); |
138 | } | 138 | } |
139 | 139 | ||
140 | void AddWorkspaceCmd::execute() { | ||
141 | BScreen *screen = Fluxbox::instance()->mouseScreen(); | ||
142 | if (screen != 0) | ||
143 | screen->addWorkspace(); | ||
144 | } | ||
145 | |||
146 | void RemoveLastWorkspaceCmd::execute() { | ||
147 | BScreen *screen = Fluxbox::instance()->mouseScreen(); | ||
148 | if (screen != 0) | ||
149 | screen->removeLastWorkspace(); | ||
150 | } | ||
151 | |||
140 | void NextWorkspaceCmd::execute() { | 152 | void NextWorkspaceCmd::execute() { |
141 | BScreen *screen = Fluxbox::instance()->mouseScreen(); | 153 | BScreen *screen = Fluxbox::instance()->mouseScreen(); |
142 | if (screen != 0) | 154 | if (screen != 0) |
diff --git a/src/WorkspaceCmd.hh b/src/WorkspaceCmd.hh index e1727f5..8053dc9 100644 --- a/src/WorkspaceCmd.hh +++ b/src/WorkspaceCmd.hh | |||
@@ -103,6 +103,16 @@ private: | |||
103 | const FocusControl::FocusDir m_dir; | 103 | const FocusControl::FocusDir m_dir; |
104 | }; | 104 | }; |
105 | 105 | ||
106 | class AddWorkspaceCmd: public FbTk::Command { | ||
107 | public: | ||
108 | void execute(); | ||
109 | }; | ||
110 | |||
111 | class RemoveLastWorkspaceCmd: public FbTk::Command { | ||
112 | public: | ||
113 | void execute(); | ||
114 | }; | ||
115 | |||
106 | class NextWorkspaceCmd: public FbTk::Command { | 116 | class NextWorkspaceCmd: public FbTk::Command { |
107 | public: | 117 | public: |
108 | explicit NextWorkspaceCmd(int option):m_option(option) { } | 118 | explicit NextWorkspaceCmd(int option):m_option(option) { } |