diff options
author | fluxgen <fluxgen> | 2004-04-22 21:12:34 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2004-04-22 21:12:34 (GMT) |
commit | c5fb252a6f75c6a07a90ea49623de259db2cbeb4 (patch) | |
tree | 8e276570a7284219a240cb0e704f22e16d7a6958 /src/FbCommandFactory.cc | |
parent | 1b38322d99a855c567c4c6d74aaaf6295c149a7b (diff) | |
download | fluxbox-c5fb252a6f75c6a07a90ea49623de259db2cbeb4.zip fluxbox-c5fb252a6f75c6a07a90ea49623de259db2cbeb4.tar.bz2 |
deiconify cmd, patch from Mathias Gumz
Diffstat (limited to 'src/FbCommandFactory.cc')
-rw-r--r-- | src/FbCommandFactory.cc | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/src/FbCommandFactory.cc b/src/FbCommandFactory.cc index ee22b28..9853b50 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.28 2004/03/08 12:23:16 rathnor Exp $ | 23 | // $Id: FbCommandFactory.cc,v 1.29 2004/04/22 21:12:34 fluxgen Exp $ |
24 | 24 | ||
25 | #include "FbCommandFactory.hh" | 25 | #include "FbCommandFactory.hh" |
26 | 26 | ||
@@ -64,6 +64,7 @@ FbCommandFactory::FbCommandFactory() { | |||
64 | "bindkey", | 64 | "bindkey", |
65 | "close", | 65 | "close", |
66 | "commanddialog", | 66 | "commanddialog", |
67 | "deiconify", | ||
67 | "detachclient", | 68 | "detachclient", |
68 | "exec", | 69 | "exec", |
69 | "execcommand", | 70 | "execcommand", |
@@ -298,7 +299,39 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command, | |||
298 | // | 299 | // |
299 | // special commands | 300 | // special commands |
300 | // | 301 | // |
301 | else if (command == "macrocmd") { | 302 | else if (command == "deiconify") { |
303 | |||
304 | FB_istringstream iss(arguments); | ||
305 | string mode; | ||
306 | string d; | ||
307 | DeiconifyCmd::Destination dest; | ||
308 | |||
309 | iss >> mode; | ||
310 | if (iss.fail()) | ||
311 | mode="lastworkspace"; | ||
312 | mode= FbTk::StringUtil::toLower(mode); | ||
313 | |||
314 | iss >> d; | ||
315 | if (iss.fail()) | ||
316 | d="current"; | ||
317 | d= FbTk::StringUtil::toLower(d); | ||
318 | if (d == "origin" ) | ||
319 | dest= DeiconifyCmd::ORIGIN; | ||
320 | else if (d == "originquiet") | ||
321 | dest= DeiconifyCmd::ORIGINQUIET; | ||
322 | else | ||
323 | dest= DeiconifyCmd::CURRENT; | ||
324 | |||
325 | if ( mode == "all" ) | ||
326 | return new DeiconifyCmd(DeiconifyCmd::ALL, dest); | ||
327 | else if ( mode == "allworkspace" ) | ||
328 | return new DeiconifyCmd(DeiconifyCmd::ALLWORKSPACE, dest); | ||
329 | else if ( mode == "last" ) | ||
330 | return new DeiconifyCmd(DeiconifyCmd::LAST, dest); | ||
331 | else // lastworkspace, default | ||
332 | return new DeiconifyCmd(DeiconifyCmd::LASTWORKSPACE, dest); | ||
333 | |||
334 | } else if (command == "macrocmd") { | ||
302 | std::string cmd; | 335 | std::string cmd; |
303 | int err= 0; | 336 | int err= 0; |
304 | int parse_pos= 0; | 337 | int parse_pos= 0; |