diff options
author | markt <markt> | 2007-12-13 05:48:00 (GMT) |
---|---|---|
committer | markt <markt> | 2007-12-13 05:48:00 (GMT) |
commit | 8b7464046cea5e521ac46811591b0fce0c45aca1 (patch) | |
tree | 09df752f426a249ae15375a626a98436c8727593 /src/Screen.cc | |
parent | daca07edafc2e75eb9ee04d35fe80759308a8583 (diff) | |
download | fluxbox-8b7464046cea5e521ac46811591b0fce0c45aca1.zip fluxbox-8b7464046cea5e521ac46811591b0fce0c45aca1.tar.bz2 |
added FbTk::CommandRegistry, decentralized command parsing, and made them auto-register
Diffstat (limited to 'src/Screen.cc')
-rw-r--r-- | src/Screen.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 79a75ef..1651824 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -60,7 +60,7 @@ | |||
60 | #include "WinClient.hh" | 60 | #include "WinClient.hh" |
61 | #include "FbWinFrame.hh" | 61 | #include "FbWinFrame.hh" |
62 | #include "Strut.hh" | 62 | #include "Strut.hh" |
63 | #include "CommandParser.hh" | 63 | #include "FbTk/CommandRegistry.hh" |
64 | #include "AtomHandler.hh" | 64 | #include "AtomHandler.hh" |
65 | #include "HeadArea.hh" | 65 | #include "HeadArea.hh" |
66 | #include "FbCommands.hh" | 66 | #include "FbCommands.hh" |
@@ -815,7 +815,7 @@ void BScreen::propertyNotify(Atom atom) { | |||
815 | &ret_bytes_after, (unsigned char **)&str); | 815 | &ret_bytes_after, (unsigned char **)&str); |
816 | } | 816 | } |
817 | 817 | ||
818 | FbTk::RefCount<FbTk::Command> cmd(CommandParser::instance().parseLine(str, false)); | 818 | FbTk::RefCount<FbTk::Command> cmd(FbTk::CommandRegistry::instance().parseLine(str, false)); |
819 | if (cmd.get()) | 819 | if (cmd.get()) |
820 | cmd->execute(); | 820 | cmd->execute(); |
821 | XFree(str); | 821 | XFree(str); |
@@ -1531,9 +1531,9 @@ void BScreen::initMenu() { | |||
1531 | if (m_rootmenu.get() == 0) { | 1531 | if (m_rootmenu.get() == 0) { |
1532 | _FB_USES_NLS; | 1532 | _FB_USES_NLS; |
1533 | m_rootmenu.reset(createMenu(_FB_XTEXT(Menu, DefaultRootMenu, "Fluxbox default menu", "Title of fallback root menu"))); | 1533 | m_rootmenu.reset(createMenu(_FB_XTEXT(Menu, DefaultRootMenu, "Fluxbox default menu", "Title of fallback root menu"))); |
1534 | FbTk::RefCount<FbTk::Command> restart_fb(CommandParser::instance().parseLine("restart")); | 1534 | FbTk::RefCount<FbTk::Command> restart_fb(FbTk::CommandRegistry::instance().parseLine("restart")); |
1535 | FbTk::RefCount<FbTk::Command> exit_fb(CommandParser::instance().parseLine("exit")); | 1535 | FbTk::RefCount<FbTk::Command> exit_fb(FbTk::CommandRegistry::instance().parseLine("exit")); |
1536 | FbTk::RefCount<FbTk::Command> execute_xterm(CommandParser::instance().parseLine("exec xterm")); | 1536 | FbTk::RefCount<FbTk::Command> execute_xterm(FbTk::CommandRegistry::instance().parseLine("exec xterm")); |
1537 | m_rootmenu->setInternalMenu(); | 1537 | m_rootmenu->setInternalMenu(); |
1538 | m_rootmenu->insert("xterm", execute_xterm); | 1538 | m_rootmenu->insert("xterm", execute_xterm); |
1539 | m_rootmenu->insert(_FB_XTEXT(Menu, Restart, "Restart", "Restart command"), | 1539 | m_rootmenu->insert(_FB_XTEXT(Menu, Restart, "Restart", "Restart command"), |
@@ -1578,7 +1578,7 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) { | |||
1578 | FbTk::RefCount<FbTk::Command> saverc_cmd(new FbTk::SimpleCommand<Fluxbox>( | 1578 | FbTk::RefCount<FbTk::Command> saverc_cmd(new FbTk::SimpleCommand<Fluxbox>( |
1579 | *Fluxbox::instance(), | 1579 | *Fluxbox::instance(), |
1580 | &Fluxbox::save_rc)); | 1580 | &Fluxbox::save_rc)); |
1581 | FbTk::RefCount<FbTk::Command> reconf_cmd(CommandParser::instance().parseLine("reconfigure")); | 1581 | FbTk::RefCount<FbTk::Command> reconf_cmd(FbTk::CommandRegistry::instance().parseLine("reconfigure")); |
1582 | 1582 | ||
1583 | FbTk::RefCount<FbTk::Command> reconftabs_cmd(new FbTk::SimpleCommand<BScreen>( | 1583 | FbTk::RefCount<FbTk::Command> reconftabs_cmd(new FbTk::SimpleCommand<BScreen>( |
1584 | *this, | 1584 | *this, |