allow restart with no argument from fluxbox-remote
This commit is contained in:
parent
2cdb04cc1e
commit
e71892d99c
2 changed files with 10 additions and 1 deletions
|
@ -243,7 +243,14 @@ void SaveResources::execute() {
|
|||
Fluxbox::instance()->save_rc();
|
||||
}
|
||||
|
||||
REGISTER_UNTRUSTED_COMMAND_WITH_ARGS(restart, FbCommands::RestartFluxboxCmd, void);
|
||||
REGISTER_COMMAND_PARSER(restart, RestartFluxboxCmd::parse, void);
|
||||
|
||||
FbTk::Command<void> *RestartFluxboxCmd::parse(const string &command,
|
||||
const string &args, bool trusted) {
|
||||
if (!trusted && !args.empty())
|
||||
return 0;
|
||||
return new RestartFluxboxCmd(args);
|
||||
}
|
||||
|
||||
RestartFluxboxCmd::RestartFluxboxCmd(const string &cmd):m_cmd(cmd){
|
||||
}
|
||||
|
|
|
@ -77,6 +77,8 @@ class RestartFluxboxCmd: public FbTk::Command<void> {
|
|||
public:
|
||||
RestartFluxboxCmd(const std::string &cmd);
|
||||
void execute();
|
||||
static FbTk::Command<void> *parse(const std::string &command,
|
||||
const std::string &args, bool trusted);
|
||||
private:
|
||||
std::string m_cmd;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue