diff options
Diffstat (limited to 'util/fbsetroot.cc')
-rw-r--r-- | util/fbsetroot.cc | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/util/fbsetroot.cc b/util/fbsetroot.cc index 2312e37..cb55e16 100644 --- a/util/fbsetroot.cc +++ b/util/fbsetroot.cc | |||
@@ -67,30 +67,29 @@ fbsetroot::fbsetroot(int argc, char **argv, char *dpy_name) | |||
67 | img_ctrl = new FbTk::ImageControl(screen); | 67 | img_ctrl = new FbTk::ImageControl(screen); |
68 | 68 | ||
69 | for (; i < argc; i++) { | 69 | for (; i < argc; i++) { |
70 | if (! strcmp("-help", argv[i])) { | 70 | string arg = argv[i]; |
71 | if (arg == "-help" || arg == "--help" || arg == "-h") { | ||
71 | usage(); | 72 | usage(); |
72 | 73 | ||
73 | } else if ((! strcmp("-fg", argv[i])) || | 74 | } else if (arg == "-fg" || arg == "-foreground" || |
74 | (! strcmp("-foreground", argv[i])) || | 75 | arg == "--foreground" || arg == "-from" || arg == "--from") { |
75 | (! strcmp("-from", argv[i]))) { | ||
76 | if ((++i) >= argc) | 76 | if ((++i) >= argc) |
77 | usage(1); | 77 | usage(1); |
78 | fore = argv[i]; | 78 | fore = argv[i]; |
79 | 79 | ||
80 | } else if ((! strcmp("-bg", argv[i])) || | 80 | } else if (arg == "-bg" || arg == "-background" || |
81 | (! strcmp("-background", argv[i])) || | 81 | arg == "--background" || arg == "-to" || arg == "--to") { |
82 | (! strcmp("-to", argv[i]))) { | ||
83 | if ((++i) >= argc) | 82 | if ((++i) >= argc) |
84 | usage(1); | 83 | usage(1); |
85 | back = argv[i]; | 84 | back = argv[i]; |
86 | 85 | ||
87 | } else if (! strcmp("-solid", argv[i])) { | 86 | } else if (arg == "-solid" || arg == "--solid") { |
88 | if ((++i) >= argc) | 87 | if ((++i) >= argc) |
89 | usage(1); | 88 | usage(1); |
90 | fore = argv[i]; | 89 | fore = argv[i]; |
91 | sol = true; | 90 | sol = true; |
92 | 91 | ||
93 | } else if (! strcmp("-mod", argv[i])) { | 92 | } else if (arg == "-mod" || arg == "--mod") { |
94 | if ((++i) >= argc) | 93 | if ((++i) >= argc) |
95 | usage(); | 94 | usage(); |
96 | mod_x = atoi(argv[i]); | 95 | mod_x = atoi(argv[i]); |
@@ -103,14 +102,14 @@ fbsetroot::fbsetroot(int argc, char **argv, char *dpy_name) | |||
103 | mod_y = 1; | 102 | mod_y = 1; |
104 | mod = true; | 103 | mod = true; |
105 | 104 | ||
106 | } else if (! strcmp("-gradient", argv[i])) { | 105 | } else if (arg == "-gradient" || arg == "--gradient") { |
107 | if ((++i) >= argc) | 106 | if ((++i) >= argc) |
108 | usage(); | 107 | usage(); |
109 | 108 | ||
110 | grad = argv[i]; | 109 | grad = argv[i]; |
111 | grd = true; | 110 | grd = true; |
112 | 111 | ||
113 | } else if (! strcmp("-display", argv[i])) { | 112 | } else if (arg == "-display" || arg == "--display") { |
114 | // -display passed through tests earlier... we just skip it now | 113 | // -display passed through tests earlier... we just skip it now |
115 | i++; | 114 | i++; |
116 | 115 | ||
@@ -382,7 +381,7 @@ int main(int argc, char **argv) { | |||
382 | FbTk::NLSInit("fluxbox.cat"); | 381 | FbTk::NLSInit("fluxbox.cat"); |
383 | 382 | ||
384 | for (; i < argc; i++) { | 383 | for (; i < argc; i++) { |
385 | if (! strcmp(argv[i], "-display")) { | 384 | if (!strcmp(argv[i], "-display") || !strcmp(argv[i], "--display")) { |
386 | // check for -display option | 385 | // check for -display option |
387 | 386 | ||
388 | if ((++i) >= argc) { | 387 | if ((++i) >= argc) { |