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)
|
||||
Changes for 1.0.0:
|
||||
*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,
|
||||
plus a minor fix for pixmap styles (Mark)
|
||||
Ewmh.cc Window.cc AttentionNoticeHandler.cc/hh WinClient.cc
|
||||
|
|
|
@ -60,6 +60,7 @@ static int getint(const char *str, int defaultvalue) {
|
|||
FbCommandFactory::FbCommandFactory() {
|
||||
// setup commands that we can handle
|
||||
const char* commands[] = {
|
||||
"addworkspace",
|
||||
"arrangewindows",
|
||||
"bindkey",
|
||||
"close",
|
||||
|
@ -115,6 +116,7 @@ FbCommandFactory::FbCommandFactory() {
|
|||
"reconfig",
|
||||
"reconfigure",
|
||||
"reloadstyle",
|
||||
"removelastworkspace",
|
||||
"resizeto",
|
||||
"resize",
|
||||
"resizehorizontal",
|
||||
|
@ -232,6 +234,10 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command,
|
|||
return new SetResourceValueCmd(name, value);
|
||||
} else if (command == "setresourcevaluedialog")
|
||||
return new SetResourceValueDialogCmd();
|
||||
else if (command == "addworkspace")
|
||||
return new AddWorkspaceCmd();
|
||||
else if (command == "removelastworkspace")
|
||||
return new RemoveLastWorkspaceCmd();
|
||||
//
|
||||
// Current focused window commands
|
||||
//
|
||||
|
|
|
@ -63,6 +63,18 @@ void DirFocusCmd::execute() {
|
|||
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() {
|
||||
BScreen *screen = Fluxbox::instance()->mouseScreen();
|
||||
if (screen != 0)
|
||||
|
|
|
@ -53,6 +53,16 @@ private:
|
|||
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 {
|
||||
public:
|
||||
explicit NextWorkspaceCmd(int option):m_option(option) { }
|
||||
|
|
Loading…
Reference in a new issue