diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2008-08-14 05:52:39 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2008-08-14 05:52:39 (GMT) |
commit | e169d33552c8e7070aa6e13da0187f2013b4cfc3 (patch) | |
tree | ae9e92c7e885791c7f47645184070cbcd441ab94 /src/main.cc | |
parent | c82e7c0080f8a5c14dcf95ec92dc42f59ea9dd8b (diff) | |
parent | 91ca3bc5c8e2b892a9a81b18246f72aba7deebfd (diff) | |
download | fluxbox-e169d33552c8e7070aa6e13da0187f2013b4cfc3.zip fluxbox-e169d33552c8e7070aa6e13da0187f2013b4cfc3.tar.bz2 |
Merge branch 'master' into to_push
Diffstat (limited to 'src/main.cc')
-rw-r--r-- | src/main.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/main.cc b/src/main.cc index 9da51ec..fb47bc7 100644 --- a/src/main.cc +++ b/src/main.cc | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | #include "FbTk/Theme.hh" | 27 | #include "FbTk/Theme.hh" |
28 | #include "FbTk/I18n.hh" | 28 | #include "FbTk/I18n.hh" |
29 | #include "FbTk/StringUtil.hh" | 29 | #include "FbTk/CommandParser.hh" |
30 | 30 | ||
31 | #ifdef HAVE_CONFIG_H | 31 | #ifdef HAVE_CONFIG_H |
32 | #include "config.h" | 32 | #include "config.h" |
@@ -221,7 +221,7 @@ int main(int argc, char **argv) { | |||
221 | } | 221 | } |
222 | } else if (arg == "-version" || arg == "-v") { | 222 | } else if (arg == "-version" || arg == "-v") { |
223 | // print current version string | 223 | // print current version string |
224 | cout << "Fluxbox " << __fluxbox_version << " : (c) 2001-2007 Fluxbox Team " << endl << endl; | 224 | cout << "Fluxbox " << __fluxbox_version << " : (c) 2001-2008 Fluxbox Team " << endl << endl; |
225 | exit(EXIT_SUCCESS); | 225 | exit(EXIT_SUCCESS); |
226 | } else if (arg == "-log") { | 226 | } else if (arg == "-log") { |
227 | if (++i >= argc) { | 227 | if (++i >= argc) { |
@@ -239,15 +239,23 @@ int main(int argc, char **argv) { | |||
239 | "-rc <string>\t\t\tuse alternate resource file.\n" | 239 | "-rc <string>\t\t\tuse alternate resource file.\n" |
240 | "-version\t\t\tdisplay version and exit.\n" | 240 | "-version\t\t\tdisplay version and exit.\n" |
241 | "-info\t\t\t\tdisplay some useful information.\n" | 241 | "-info\t\t\t\tdisplay some useful information.\n" |
242 | "-list-commands\t\t\tlist all valid key commands.\n" | ||
242 | "-log <filename>\t\t\tlog output to file.\n" | 243 | "-log <filename>\t\t\tlog output to file.\n" |
243 | "-help\t\t\t\tdisplay this help text and exit.\n\n", | 244 | "-help\t\t\t\tdisplay this help text and exit.\n\n", |
244 | 245 | ||
245 | "Main usage string. Please lay it out nicely. There is one %s that is given the version").c_str(), | 246 | "Main usage string. Please lay it out nicely. There is one %s that is given the version").c_str(), |
246 | __fluxbox_version, "2001-2007"); | 247 | __fluxbox_version, "2001-2008"); |
247 | exit(EXIT_SUCCESS); | 248 | exit(EXIT_SUCCESS); |
248 | } else if (arg == "-info" || arg == "-i") { | 249 | } else if (arg == "-info" || arg == "-i") { |
249 | showInfo(cout); | 250 | showInfo(cout); |
250 | exit(EXIT_SUCCESS); | 251 | exit(EXIT_SUCCESS); |
252 | } else if (arg == "-list-commands") { | ||
253 | FbTk::CommandParser<void>::CreatorMap cmap = FbTk::CommandParser<void>::instance().creatorMap(); | ||
254 | FbTk::CommandParser<void>::CreatorMap::const_iterator it = cmap.begin(); | ||
255 | const FbTk::CommandParser<void>::CreatorMap::const_iterator it_end = cmap.end(); | ||
256 | for (; it != it_end; ++it) | ||
257 | cout << it->first << endl; | ||
258 | exit(EXIT_SUCCESS); | ||
251 | } else if (arg == "-verbose") { | 259 | } else if (arg == "-verbose") { |
252 | FbTk::ThemeManager::instance().setVerbose(true); | 260 | FbTk::ThemeManager::instance().setVerbose(true); |
253 | } | 261 | } |