added key commands :AddWorkspace and :RemoveLastWorkspace
This commit is contained in:
parent
7783a8c84e
commit
69d63da542
4 changed files with 30 additions and 0 deletions
|
@ -1,6 +1,8 @@
|
||||||
(Format: Year/Month/Day)
|
(Format: Year/Month/Day)
|
||||||
Changes for 1.0.0:
|
Changes for 1.0.0:
|
||||||
*07/07/01:
|
*07/07/01:
|
||||||
|
* Added keycommands :AddWorkspace and :RemoveLastWorkspace (Mark)
|
||||||
|
WorkspaceCmd.cc/hh FbCommandFactory.cc
|
||||||
* More fixes for _NET_WM_STATE_MODAL and _NET_WM_STATE_DEMANDS_ATTENTION,
|
* More fixes for _NET_WM_STATE_MODAL and _NET_WM_STATE_DEMANDS_ATTENTION,
|
||||||
plus a minor fix for pixmap styles (Mark)
|
plus a minor fix for pixmap styles (Mark)
|
||||||
Ewmh.cc Window.cc AttentionNoticeHandler.cc/hh WinClient.cc
|
Ewmh.cc Window.cc AttentionNoticeHandler.cc/hh WinClient.cc
|
||||||
|
|
|
@ -60,6 +60,7 @@ static int getint(const char *str, int defaultvalue) {
|
||||||
FbCommandFactory::FbCommandFactory() {
|
FbCommandFactory::FbCommandFactory() {
|
||||||
// setup commands that we can handle
|
// setup commands that we can handle
|
||||||
const char* commands[] = {
|
const char* commands[] = {
|
||||||
|
"addworkspace",
|
||||||
"arrangewindows",
|
"arrangewindows",
|
||||||
"bindkey",
|
"bindkey",
|
||||||
"close",
|
"close",
|
||||||
|
@ -115,6 +116,7 @@ FbCommandFactory::FbCommandFactory() {
|
||||||
"reconfig",
|
"reconfig",
|
||||||
"reconfigure",
|
"reconfigure",
|
||||||
"reloadstyle",
|
"reloadstyle",
|
||||||
|
"removelastworkspace",
|
||||||
"resizeto",
|
"resizeto",
|
||||||
"resize",
|
"resize",
|
||||||
"resizehorizontal",
|
"resizehorizontal",
|
||||||
|
@ -232,6 +234,10 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command,
|
||||||
return new SetResourceValueCmd(name, value);
|
return new SetResourceValueCmd(name, value);
|
||||||
} else if (command == "setresourcevaluedialog")
|
} else if (command == "setresourcevaluedialog")
|
||||||
return new SetResourceValueDialogCmd();
|
return new SetResourceValueDialogCmd();
|
||||||
|
else if (command == "addworkspace")
|
||||||
|
return new AddWorkspaceCmd();
|
||||||
|
else if (command == "removelastworkspace")
|
||||||
|
return new RemoveLastWorkspaceCmd();
|
||||||
//
|
//
|
||||||
// Current focused window commands
|
// Current focused window commands
|
||||||
//
|
//
|
||||||
|
|
|
@ -63,6 +63,18 @@ void DirFocusCmd::execute() {
|
||||||
screen->focusControl().dirFocus(*win, m_dir);
|
screen->focusControl().dirFocus(*win, m_dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AddWorkspaceCmd::execute() {
|
||||||
|
BScreen *screen = Fluxbox::instance()->mouseScreen();
|
||||||
|
if (screen != 0)
|
||||||
|
screen->addWorkspace();
|
||||||
|
}
|
||||||
|
|
||||||
|
void RemoveLastWorkspaceCmd::execute() {
|
||||||
|
BScreen *screen = Fluxbox::instance()->mouseScreen();
|
||||||
|
if (screen != 0)
|
||||||
|
screen->removeLastWorkspace();
|
||||||
|
}
|
||||||
|
|
||||||
void NextWorkspaceCmd::execute() {
|
void NextWorkspaceCmd::execute() {
|
||||||
BScreen *screen = Fluxbox::instance()->mouseScreen();
|
BScreen *screen = Fluxbox::instance()->mouseScreen();
|
||||||
if (screen != 0)
|
if (screen != 0)
|
||||||
|
|
|
@ -53,6 +53,16 @@ private:
|
||||||
const FocusControl::FocusDir m_dir;
|
const FocusControl::FocusDir m_dir;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class AddWorkspaceCmd: public FbTk::Command {
|
||||||
|
public:
|
||||||
|
void execute();
|
||||||
|
};
|
||||||
|
|
||||||
|
class RemoveLastWorkspaceCmd: public FbTk::Command {
|
||||||
|
public:
|
||||||
|
void execute();
|
||||||
|
};
|
||||||
|
|
||||||
class NextWorkspaceCmd: public FbTk::Command {
|
class NextWorkspaceCmd: public FbTk::Command {
|
||||||
public:
|
public:
|
||||||
explicit NextWorkspaceCmd(int option):m_option(option) { }
|
explicit NextWorkspaceCmd(int option):m_option(option) { }
|
||||||
|
|
Loading…
Reference in a new issue