aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-08-30 11:59:29 (GMT)
committerfluxgen <fluxgen>2003-08-30 11:59:29 (GMT)
commitf20bcea618d52659c60ce96e885d20f60b2367d5 (patch)
treee33795314d086ef6e18a5d5b242e2f3a890baa52
parent685a3e36b36b5181cdcb10c762b3a190f50b1255 (diff)
downloadfluxbox-f20bcea618d52659c60ce96e885d20f60b2367d5.zip
fluxbox-f20bcea618d52659c60ce96e885d20f60b2367d5.tar.bz2
added workspacemenu action, thanks Mathias Gumz
-rw-r--r--src/FbCommandFactory.cc77
-rw-r--r--src/FbCommands.cc13
-rw-r--r--src/FbCommands.hh7
3 files changed, 58 insertions, 39 deletions
diff --git a/src/FbCommandFactory.cc b/src/FbCommandFactory.cc
index 237b16c..bdbe305 100644
--- a/src/FbCommandFactory.cc
+++ b/src/FbCommandFactory.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: FbCommandFactory.cc,v 1.13 2003/08/26 23:53:01 fluxgen Exp $ 23// $Id: FbCommandFactory.cc,v 1.14 2003/08/30 11:59:29 fluxgen Exp $
24 24
25#include "FbCommandFactory.hh" 25#include "FbCommandFactory.hh"
26 26
@@ -38,56 +38,57 @@ FbCommandFactory FbCommandFactory::s_autoreg;
38 38
39FbCommandFactory::FbCommandFactory() { 39FbCommandFactory::FbCommandFactory() {
40 // setup commands that we can handle 40 // setup commands that we can handle
41 const char commands[][32] = { 41 const char commands[][33] = {
42 "setstyle", 42 "arrangewindows",
43 "saverc", 43 "close",
44 "reconfigure", 44 "detachclient",
45 "execcommand",
46 "exec", 45 "exec",
46 "execcommand",
47 "execute", 47 "execute",
48 "quit",
49 "restart",
50 "minimizewindow",
51 "minimize",
52 "iconfiy", 48 "iconfiy",
53 "maximizewindow", 49 "killwindow",
50 "leftworkspace",
51 "lower",
54 "maximize", 52 "maximize",
55 "maximizevertical",
56 "maximizehorizontal", 53 "maximizehorizontal",
57 "resizevertical", 54 "maximizevertical",
58 "resizehorizontal", 55 "maximizewindow",
59 "moveright", 56 "minimize",
57 "minimizewindow",
58 "movedown",
60 "moveleft", 59 "moveleft",
60 "moveright",
61 "movetableft",
62 "movetabright",
61 "moveup", 63 "moveup",
62 "movedown", 64 "nextgroup",
65 "nexttab",
66 "nextwindow",
67 "nextworkspace",
68 "prevgroup",
69 "prevtab",
70 "prevwindow",
71 "prevworkspace",
72 "quit",
63 "raise", 73 "raise",
64 "lower", 74 "reconfigure",
65 "close", 75 "resizehorizontal",
76 "resizevertical",
77 "restart",
78 "rightworkspace",
79 "rootmenu",
80 "saverc",
81 "sendtoworkspace",
82 "setstyle",
83 "setworkspacename",
66 "shade", 84 "shade",
67 "shadewindow", 85 "shadewindow",
86 "showdesktop",
68 "stick", 87 "stick",
69 "stickwindow", 88 "stickwindow",
70 "toggledecor", 89 "toggledecor",
71 "sendtoworkspace",
72 "killwindow",
73 "nexttab",
74 "prevtab",
75 "movetableft",
76 "movetabright",
77 "detachclient",
78 "nextworkspace",
79 "rightworkspace",
80 "leftworkspace",
81 "prevworkspace",
82 "workspace", 90 "workspace",
83 "nextwindow", 91 "workspacemenu",
84 "prevwindow",
85 "nextgroup",
86 "prevgroup",
87 "showdesktop",
88 "arrangewindows",
89 "rootmenu",
90 "setworkspacename",
91 "" 92 ""
92 }; 93 };
93 94
@@ -196,6 +197,8 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command,
196 return new ShowDesktopCmd(); 197 return new ShowDesktopCmd();
197 else if (command == "rootmenu") 198 else if (command == "rootmenu")
198 return new ShowRootMenuCmd(); 199 return new ShowRootMenuCmd();
200 else if (command == "workspacemenu")
201 return new ShowWorkspaceMenuCmd();
199 else if (command == "setworkspacename") 202 else if (command == "setworkspacename")
200 return new SetWorkspaceNameCmd(); 203 return new SetWorkspaceNameCmd();
201 return 0; 204 return 0;
diff --git a/src/FbCommands.cc b/src/FbCommands.cc
index 61e22e7..61b9e3e 100644
--- a/src/FbCommands.cc
+++ b/src/FbCommands.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbCommands.cc,v 1.14 2003/08/26 23:52:09 fluxgen Exp $ 22// $Id: FbCommands.cc,v 1.15 2003/08/30 11:59:29 fluxgen Exp $
23 23
24#include "FbCommands.hh" 24#include "FbCommands.hh"
25#include "fluxbox.hh" 25#include "fluxbox.hh"
@@ -114,6 +114,17 @@ void ShowRootMenuCmd::execute() {
114 } 114 }
115} 115}
116 116
117void ShowWorkspaceMenuCmd::execute() {
118 BScreen *screen = Fluxbox::instance()->mouseScreen();
119 if (screen == 0)
120 return;
121
122 if (screen->getWorkspacemenu()) {
123 screen->getWorkspacemenu()->show();
124 screen->getWorkspacemenu()->grabInputFocus();
125 }
126}
127
117void SetWorkspaceNameCmd::execute() { 128void SetWorkspaceNameCmd::execute() {
118 129
119 BScreen *screen = Fluxbox::instance()->mouseScreen(); 130 BScreen *screen = Fluxbox::instance()->mouseScreen();
diff --git a/src/FbCommands.hh b/src/FbCommands.hh
index 53482f3..83fe0f9 100644
--- a/src/FbCommands.hh
+++ b/src/FbCommands.hh
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbCommands.hh,v 1.9 2003/08/26 23:51:16 fluxgen Exp $ 22// $Id: FbCommands.hh,v 1.10 2003/08/30 11:59:29 fluxgen Exp $
23 23
24// \file contains basic commands to restart, reconfigure, execute command and exit fluxbox 24// \file contains basic commands to restart, reconfigure, execute command and exit fluxbox
25 25
@@ -83,6 +83,11 @@ public:
83 void execute(); 83 void execute();
84}; 84};
85 85
86class ShowWorkspaceMenuCmd: public FbTk::Command {
87public:
88 void execute();
89};
90
86class SetWorkspaceNameCmd: public FbTk::Command { 91class SetWorkspaceNameCmd: public FbTk::Command {
87public: 92public:
88 void execute(); 93 void execute();