aboutsummaryrefslogtreecommitdiff
path: root/src/FbCommandFactory.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbCommandFactory.cc')
-rw-r--r--src/FbCommandFactory.cc37
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;