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/CommandDialog.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/CommandDialog.cc')
-rw-r--r-- | src/CommandDialog.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/CommandDialog.cc b/src/CommandDialog.cc index e19cd53..436a942 100644 --- a/src/CommandDialog.cc +++ b/src/CommandDialog.cc | |||
@@ -27,7 +27,7 @@ | |||
27 | #include "Screen.hh" | 27 | #include "Screen.hh" |
28 | #include "FbWinFrameTheme.hh" | 28 | #include "FbWinFrameTheme.hh" |
29 | #include "WinClient.hh" | 29 | #include "WinClient.hh" |
30 | #include "CommandParser.hh" | 30 | #include "FbTk/CommandRegistry.hh" |
31 | #include "FocusControl.hh" | 31 | #include "FocusControl.hh" |
32 | #include "fluxbox.hh" | 32 | #include "fluxbox.hh" |
33 | 33 | ||
@@ -139,7 +139,7 @@ void CommandDialog::keyPressEvent(XKeyEvent &event) { | |||
139 | if (ks == XK_Return) { | 139 | if (ks == XK_Return) { |
140 | hide(); // hide and return focus to a FluxboxWindow | 140 | hide(); // hide and return focus to a FluxboxWindow |
141 | // create command from line | 141 | // create command from line |
142 | auto_ptr<FbTk::Command> cmd(CommandParser::instance(). | 142 | auto_ptr<FbTk::Command> cmd(FbTk::CommandRegistry::instance(). |
143 | parseLine(m_precommand + m_textbox.text())); | 143 | parseLine(m_precommand + m_textbox.text())); |
144 | if (cmd.get()) | 144 | if (cmd.get()) |
145 | cmd->execute(); | 145 | cmd->execute(); |
@@ -170,8 +170,8 @@ void CommandDialog::tabComplete() { | |||
170 | return; | 170 | return; |
171 | } | 171 | } |
172 | 172 | ||
173 | CommandParser::CommandFactoryMap::const_iterator it = CommandParser::instance().factorys().begin(); | 173 | FbTk::CommandRegistry::CreatorMap::const_iterator it = FbTk::CommandRegistry::instance().commandMap().begin(); |
174 | const CommandParser::CommandFactoryMap::const_iterator it_end = CommandParser::instance().factorys().end(); | 174 | const FbTk::CommandRegistry::CreatorMap::const_iterator it_end = FbTk::CommandRegistry::instance().commandMap().end(); |
175 | vector<string> matches; | 175 | vector<string> matches; |
176 | for (; it != it_end; ++it) { | 176 | for (; it != it_end; ++it) { |
177 | if ((*it).first.find(prefix) == 0) { | 177 | if ((*it).first.find(prefix) == 0) { |