diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/main.cc b/src/main.cc index d69ce2d..1cca774 100644 --- a/src/main.cc +++ b/src/main.cc | |||
@@ -191,7 +191,7 @@ int main(int argc, char **argv) { | |||
191 | int i; | 191 | int i; |
192 | for (i = 1; i < argc; ++i) { | 192 | for (i = 1; i < argc; ++i) { |
193 | string arg(argv[i]); | 193 | string arg(argv[i]); |
194 | if (arg == "-rc") { | 194 | if (arg == "-rc" || arg == "--rc") { |
195 | // look for alternative rc file to use | 195 | // look for alternative rc file to use |
196 | 196 | ||
197 | if ((++i) >= argc) { | 197 | if ((++i) >= argc) { |
@@ -201,7 +201,7 @@ int main(int argc, char **argv) { | |||
201 | } | 201 | } |
202 | 202 | ||
203 | rc_file = argv[i]; | 203 | rc_file = argv[i]; |
204 | } else if (arg == "-display") { | 204 | } else if (arg == "-display" || arg == "--display") { |
205 | // check for -display option... to run on a display other than the one | 205 | // check for -display option... to run on a display other than the one |
206 | // set by the environment variable DISPLAY | 206 | // set by the environment variable DISPLAY |
207 | 207 | ||
@@ -220,19 +220,19 @@ int main(int argc, char **argv) { | |||
220 | "")<<endl; | 220 | "")<<endl; |
221 | perror("putenv()"); | 221 | perror("putenv()"); |
222 | } | 222 | } |
223 | } else if (arg == "-version" || arg == "-v") { | 223 | } else if (arg == "-version" || arg == "-v" || arg == "--version") { |
224 | // print current version string | 224 | // print current version string |
225 | cout << "Fluxbox " << __fluxbox_version << " : (c) 2001-2008 Fluxbox Team " << endl << endl; | 225 | cout << "Fluxbox " << __fluxbox_version << " : (c) 2001-2008 Fluxbox Team " << endl << endl; |
226 | exit(EXIT_SUCCESS); | 226 | exit(EXIT_SUCCESS); |
227 | } else if (arg == "-log") { | 227 | } else if (arg == "-log" || arg == "--log") { |
228 | if (++i >= argc) { | 228 | if (++i >= argc) { |
229 | cerr<<_FB_CONSOLETEXT(main, LOGRequiresArg, "error: '-log' needs an argument", "")<<endl; | 229 | cerr<<_FB_CONSOLETEXT(main, LOGRequiresArg, "error: '-log' needs an argument", "")<<endl; |
230 | exit(EXIT_FAILURE); | 230 | exit(EXIT_FAILURE); |
231 | } | 231 | } |
232 | log_filename = argv[i]; | 232 | log_filename = argv[i]; |
233 | } else if (arg == "-sync") { | 233 | } else if (arg == "-sync" || arg == "--sync") { |
234 | xsync = true; | 234 | xsync = true; |
235 | } else if (arg == "-help" || arg == "-h") { | 235 | } else if (arg == "-help" || arg == "-h" || arg == "--help") { |
236 | // print program usage and command line options | 236 | // print program usage and command line options |
237 | printf(_FB_CONSOLETEXT(main, Usage, | 237 | printf(_FB_CONSOLETEXT(main, Usage, |
238 | "Fluxbox %s : (c) %s Henrik Kinnunen\n" | 238 | "Fluxbox %s : (c) %s Henrik Kinnunen\n" |
@@ -250,17 +250,17 @@ int main(int argc, char **argv) { | |||
250 | "Main usage string. Please lay it out nicely. There is one %s that is given the version").c_str(), | 250 | "Main usage string. Please lay it out nicely. There is one %s that is given the version").c_str(), |
251 | __fluxbox_version, "2001-2008"); | 251 | __fluxbox_version, "2001-2008"); |
252 | exit(EXIT_SUCCESS); | 252 | exit(EXIT_SUCCESS); |
253 | } else if (arg == "-info" || arg == "-i") { | 253 | } else if (arg == "-info" || arg == "-i" || arg == "--info") { |
254 | showInfo(cout); | 254 | showInfo(cout); |
255 | exit(EXIT_SUCCESS); | 255 | exit(EXIT_SUCCESS); |
256 | } else if (arg == "-list-commands") { | 256 | } else if (arg == "-list-commands" || arg == "--list-commands") { |
257 | FbTk::CommandParser<void>::CreatorMap cmap = FbTk::CommandParser<void>::instance().creatorMap(); | 257 | FbTk::CommandParser<void>::CreatorMap cmap = FbTk::CommandParser<void>::instance().creatorMap(); |
258 | FbTk::CommandParser<void>::CreatorMap::const_iterator it = cmap.begin(); | 258 | FbTk::CommandParser<void>::CreatorMap::const_iterator it = cmap.begin(); |
259 | const FbTk::CommandParser<void>::CreatorMap::const_iterator it_end = cmap.end(); | 259 | const FbTk::CommandParser<void>::CreatorMap::const_iterator it_end = cmap.end(); |
260 | for (; it != it_end; ++it) | 260 | for (; it != it_end; ++it) |
261 | cout << it->first << endl; | 261 | cout << it->first << endl; |
262 | exit(EXIT_SUCCESS); | 262 | exit(EXIT_SUCCESS); |
263 | } else if (arg == "-verbose") { | 263 | } else if (arg == "-verbose" || arg == "--verbose") { |
264 | FbTk::ThemeManager::instance().setVerbose(true); | 264 | FbTk::ThemeManager::instance().setVerbose(true); |
265 | } | 265 | } |
266 | } | 266 | } |