diff options
author | mathias <mathias> | 2007-04-17 07:52:40 (GMT) |
---|---|---|
committer | mathias <mathias> | 2007-04-17 07:52:40 (GMT) |
commit | 6ac57655d9b0cf02d449aa9a01c7a82f5f3bbffa (patch) | |
tree | 13906ff4f8b3beee31b866695f742971407ee795 /src | |
parent | 20a339fc066e5580777ea17f22bec8fde0e817dd (diff) | |
download | fluxbox_lack-6ac57655d9b0cf02d449aa9a01c7a82f5f3bbffa.zip fluxbox_lack-6ac57655d9b0cf02d449aa9a01c7a82f5f3bbffa.tar.bz2 |
basicly cosmetic changes, patch by slava semushin
Diffstat (limited to 'src')
-rw-r--r-- | src/FbTk/FbWindow.hh | 1 | ||||
-rw-r--r-- | src/FbTk/I18n.hh | 2 | ||||
-rw-r--r-- | src/FbTk/ImageControl.cc | 4 | ||||
-rw-r--r-- | src/FbTk/MenuItem.hh | 1 | ||||
-rw-r--r-- | src/FbTk/Timer.hh | 11 | ||||
-rw-r--r-- | src/FbTk/XLayer.hh | 2 | ||||
-rw-r--r-- | src/FbTk/XLayerItem.hh | 3 | ||||
-rw-r--r-- | src/Keys.cc | 8 | ||||
-rw-r--r-- | src/Screen.cc | 4 | ||||
-rw-r--r-- | src/fluxbox.cc | 12 | ||||
-rw-r--r-- | src/main.cc | 42 |
11 files changed, 28 insertions, 62 deletions
diff --git a/src/FbTk/FbWindow.hh b/src/FbTk/FbWindow.hh index c5494b0..a1b93cc 100644 --- a/src/FbTk/FbWindow.hh +++ b/src/FbTk/FbWindow.hh | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | #include "FbDrawable.hh" | 27 | #include "FbDrawable.hh" |
28 | 28 | ||
29 | #include <X11/Xlib.h> | ||
30 | #include <memory> | 29 | #include <memory> |
31 | #include <string> | 30 | #include <string> |
32 | #include <set> | 31 | #include <set> |
diff --git a/src/FbTk/I18n.hh b/src/FbTk/I18n.hh index 9a936d8..298c64c 100644 --- a/src/FbTk/I18n.hh +++ b/src/FbTk/I18n.hh | |||
@@ -60,8 +60,6 @@ void catclose(nl_catd cat); | |||
60 | 60 | ||
61 | #endif // HAVE_NL_TYPES_H | 61 | #endif // HAVE_NL_TYPES_H |
62 | 62 | ||
63 | #include <string> | ||
64 | |||
65 | // Some defines to help out | 63 | // Some defines to help out |
66 | #ifdef NLS | 64 | #ifdef NLS |
67 | #define _FB_USES_NLS \ | 65 | #define _FB_USES_NLS \ |
diff --git a/src/FbTk/ImageControl.cc b/src/FbTk/ImageControl.cc index c1fa7a5..5f9f644 100644 --- a/src/FbTk/ImageControl.cc +++ b/src/FbTk/ImageControl.cc | |||
@@ -61,10 +61,6 @@ | |||
61 | #include <stdio.h> | 61 | #include <stdio.h> |
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | #ifdef HAVE_CTYPE_H | ||
65 | #include <ctype.h> | ||
66 | #endif // HAVE_CTYPE_H | ||
67 | |||
68 | #include <iostream> | 64 | #include <iostream> |
69 | 65 | ||
70 | using std::cerr; | 66 | using std::cerr; |
diff --git a/src/FbTk/MenuItem.hh b/src/FbTk/MenuItem.hh index 701b624..afb6be9 100644 --- a/src/FbTk/MenuItem.hh +++ b/src/FbTk/MenuItem.hh | |||
@@ -30,7 +30,6 @@ | |||
30 | #include "ITypeAheadable.hh" | 30 | #include "ITypeAheadable.hh" |
31 | #include "FbString.hh" | 31 | #include "FbString.hh" |
32 | 32 | ||
33 | #include <string> | ||
34 | #include <memory> | 33 | #include <memory> |
35 | 34 | ||
36 | namespace FbTk { | 35 | namespace FbTk { |
diff --git a/src/FbTk/Timer.hh b/src/FbTk/Timer.hh index 189c2af..bd55435 100644 --- a/src/FbTk/Timer.hh +++ b/src/FbTk/Timer.hh | |||
@@ -76,9 +76,9 @@ public: | |||
76 | 76 | ||
77 | int isTiming() const { return m_timing; } | 77 | int isTiming() const { return m_timing; } |
78 | int getInterval() const { return m_interval; } | 78 | int getInterval() const { return m_interval; } |
79 | 79 | ||
80 | int doOnce() const { return m_once; } | 80 | int doOnce() const { return m_once; } |
81 | 81 | ||
82 | const timeval &getTimeout() const { return m_timeout; } | 82 | const timeval &getTimeout() const { return m_timeout; } |
83 | const timeval &getStartTime() const { return m_start; } | 83 | const timeval &getStartTime() const { return m_start; } |
84 | void makeEndTime(timeval &tm) const; | 84 | void makeEndTime(timeval &tm) const; |
@@ -92,12 +92,12 @@ private: | |||
92 | static void addTimer(Timer *timer); | 92 | static void addTimer(Timer *timer); |
93 | /// remove a timer from the static list | 93 | /// remove a timer from the static list |
94 | static void removeTimer(Timer *timer); | 94 | static void removeTimer(Timer *timer); |
95 | 95 | ||
96 | typedef std::list<Timer *> TimerList; | 96 | typedef std::list<Timer *> TimerList; |
97 | static TimerList m_timerlist; ///< list of all timers, sorted by next trigger time (start + timeout) | 97 | static TimerList m_timerlist; ///< list of all timers, sorted by next trigger time (start + timeout) |
98 | 98 | ||
99 | RefCount<Command> m_handler; ///< what to do on a timeout | 99 | RefCount<Command> m_handler; ///< what to do on a timeout |
100 | 100 | ||
101 | bool m_timing; ///< clock running? | 101 | bool m_timing; ///< clock running? |
102 | bool m_once; ///< do timeout only once? | 102 | bool m_once; ///< do timeout only once? |
103 | int m_interval; ///< Is an interval-only timer (e.g. clock) | 103 | int m_interval; ///< Is an interval-only timer (e.g. clock) |
@@ -105,7 +105,6 @@ private: | |||
105 | 105 | ||
106 | timeval m_start; ///< start time | 106 | timeval m_start; ///< start time |
107 | timeval m_timeout; ///< time length | 107 | timeval m_timeout; ///< time length |
108 | |||
109 | }; | 108 | }; |
110 | 109 | ||
111 | } // end namespace FbTk | 110 | } // end namespace FbTk |
diff --git a/src/FbTk/XLayer.hh b/src/FbTk/XLayer.hh index 660886e..238f698 100644 --- a/src/FbTk/XLayer.hh +++ b/src/FbTk/XLayer.hh | |||
@@ -42,7 +42,7 @@ public: | |||
42 | 42 | ||
43 | typedef std::list<XLayerItem *> ItemList; | 43 | typedef std::list<XLayerItem *> ItemList; |
44 | typedef std::list<XLayerItem *>::iterator iterator; | 44 | typedef std::list<XLayerItem *>::iterator iterator; |
45 | 45 | ||
46 | //typedef std::list<XLayerItem *>::reverse_iterator reverse_iterator; | 46 | //typedef std::list<XLayerItem *>::reverse_iterator reverse_iterator; |
47 | 47 | ||
48 | void setLayerNum(int layernum) { m_layernum = layernum; }; | 48 | void setLayerNum(int layernum) { m_layernum = layernum; }; |
diff --git a/src/FbTk/XLayerItem.hh b/src/FbTk/XLayerItem.hh index 90d2167..e17d162 100644 --- a/src/FbTk/XLayerItem.hh +++ b/src/FbTk/XLayerItem.hh | |||
@@ -30,9 +30,6 @@ | |||
30 | #include "NotCopyable.hh" | 30 | #include "NotCopyable.hh" |
31 | #include "FbWindow.hh" | 31 | #include "FbWindow.hh" |
32 | 32 | ||
33 | #include <X11/Xlib.h> | ||
34 | |||
35 | |||
36 | namespace FbTk { | 33 | namespace FbTk { |
37 | 34 | ||
38 | class XLayerItem : public LayerItem, private NotCopyable { | 35 | class XLayerItem : public LayerItem, private NotCopyable { |
diff --git a/src/Keys.cc b/src/Keys.cc index 97a83bf..fd96fe8 100644 --- a/src/Keys.cc +++ b/src/Keys.cc | |||
@@ -39,9 +39,11 @@ | |||
39 | #endif // HAVE_CONFIG_H | 39 | #endif // HAVE_CONFIG_H |
40 | 40 | ||
41 | 41 | ||
42 | #ifdef HAVE_CTYPE_H | 42 | #ifdef HAVE_CCTYPE |
43 | #include <ctype.h> | 43 | #include <cctype> |
44 | #endif // HAVE_CTYPE_H | 44 | #else |
45 | #include <ctype.h> | ||
46 | #endif // HAVE_CCTYPE | ||
45 | 47 | ||
46 | #ifdef HAVE_CSTDIO | 48 | #ifdef HAVE_CSTDIO |
47 | #include <cstdio> | 49 | #include <cstdio> |
diff --git a/src/Screen.cc b/src/Screen.cc index 9612a04..0075c4b 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -101,10 +101,6 @@ class Slit {}; | |||
101 | #include <sys/types.h> | 101 | #include <sys/types.h> |
102 | #endif // STDC_HEADERS | 102 | #endif // STDC_HEADERS |
103 | 103 | ||
104 | #ifdef HAVE_CTYPE_H | ||
105 | #include <ctype.h> | ||
106 | #endif // HAVE_CTYPE_H | ||
107 | |||
108 | #ifdef HAVE_UNISTD_H | 104 | #ifdef HAVE_UNISTD_H |
109 | #include <sys/types.h> | 105 | #include <sys/types.h> |
110 | #include <unistd.h> | 106 | #include <unistd.h> |
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 5dc2b52..e0bb345 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -134,21 +134,9 @@ class Toolbar { }; | |||
134 | #include <sys/stat.h> | 134 | #include <sys/stat.h> |
135 | #endif // HAVE_SYS_STAT_H | 135 | #endif // HAVE_SYS_STAT_H |
136 | 136 | ||
137 | #ifdef TIME_WITH_SYS_TIME | ||
138 | #include <sys/time.h> | ||
139 | #include <time.h> | ||
140 | #else // !TIME_WITH_SYS_TIME | ||
141 | #ifdef HAVE_SYS_TIME_H | ||
142 | #include <sys/time.h> | ||
143 | #else // !HAVE_SYS_TIME_H | ||
144 | #include <time.h> | ||
145 | #endif // HAVE_SYS_TIME_H | ||
146 | #endif // TIME_WITH_SYS_TIME | ||
147 | |||
148 | #include <sys/wait.h> | 137 | #include <sys/wait.h> |
149 | 138 | ||
150 | #include <iostream> | 139 | #include <iostream> |
151 | #include <string> | ||
152 | #include <memory> | 140 | #include <memory> |
153 | #include <algorithm> | 141 | #include <algorithm> |
154 | #include <typeinfo> | 142 | #include <typeinfo> |
diff --git a/src/main.cc b/src/main.cc index 1c5e283..7b98597 100644 --- a/src/main.cc +++ b/src/main.cc | |||
@@ -39,21 +39,12 @@ | |||
39 | #define _GNU_SOURCE | 39 | #define _GNU_SOURCE |
40 | #endif // _GNU_SOURCE | 40 | #endif // _GNU_SOURCE |
41 | 41 | ||
42 | #ifdef HAVE_CSTDIO | ||
43 | #include <cstdio> | ||
44 | #else | ||
45 | #include <stdio.h> | ||
46 | #endif | ||
47 | #ifdef HAVE_CSTDLIB | 42 | #ifdef HAVE_CSTDLIB |
48 | #include <cstdlib> | 43 | #include <cstdlib> |
49 | #else | 44 | #else |
50 | #include <stdlib.h> | 45 | #include <stdlib.h> |
51 | #endif | 46 | #endif |
52 | #ifdef HAVE_CSTRING | 47 | |
53 | #include <cstring> | ||
54 | #else | ||
55 | #include <string.h> | ||
56 | #endif | ||
57 | #include <iostream> | 48 | #include <iostream> |
58 | #include <fstream> | 49 | #include <fstream> |
59 | #include <stdexcept> | 50 | #include <stdexcept> |
@@ -199,17 +190,18 @@ int main(int argc, char **argv) { | |||
199 | 190 | ||
200 | int i; | 191 | int i; |
201 | for (i = 1; i < argc; ++i) { | 192 | for (i = 1; i < argc; ++i) { |
202 | if (! strcmp(argv[i], "-rc")) { | 193 | string arg(argv[i]); |
194 | if (arg == "-rc") { | ||
203 | // look for alternative rc file to use | 195 | // look for alternative rc file to use |
204 | 196 | ||
205 | if ((++i) >= argc) { | 197 | if ((++i) >= argc) { |
206 | cerr<<_FB_CONSOLETEXT(main, RCRequiresArg, | 198 | cerr<<_FB_CONSOLETEXT(main, RCRequiresArg, |
207 | "error: '-rc' requires an argument", "the -rc option requires a file argument")<<endl; | 199 | "error: '-rc' requires an argument", "the -rc option requires a file argument")<<endl; |
208 | exit(1); | 200 | exit(EXIT_FAILURE); |
209 | } | 201 | } |
210 | 202 | ||
211 | rc_file = argv[i]; | 203 | rc_file = arg; |
212 | } else if (! strcmp(argv[i], "-display")) { | 204 | } else if (arg == "-display") { |
213 | // 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 |
214 | // set by the environment variable DISPLAY | 206 | // set by the environment variable DISPLAY |
215 | 207 | ||
@@ -217,10 +209,10 @@ int main(int argc, char **argv) { | |||
217 | cerr<<_FB_CONSOLETEXT(main, DISPLAYRequiresArg, | 209 | cerr<<_FB_CONSOLETEXT(main, DISPLAYRequiresArg, |
218 | "error: '-display' requires an argument", | 210 | "error: '-display' requires an argument", |
219 | "")<<endl; | 211 | "")<<endl; |
220 | exit(1); | 212 | exit(EXIT_FAILURE); |
221 | } | 213 | } |
222 | 214 | ||
223 | session_display = argv[i]; | 215 | session_display = arg; |
224 | string display_env = "DISPLAY=" + session_display; | 216 | string display_env = "DISPLAY=" + session_display; |
225 | if (putenv(const_cast<char *>(display_env.c_str()))) { | 217 | if (putenv(const_cast<char *>(display_env.c_str()))) { |
226 | cerr<<_FB_CONSOLETEXT(main, WarnDisplayEnv, | 218 | cerr<<_FB_CONSOLETEXT(main, WarnDisplayEnv, |
@@ -228,17 +220,17 @@ int main(int argc, char **argv) { | |||
228 | "")<<endl; | 220 | "")<<endl; |
229 | perror("putenv()"); | 221 | perror("putenv()"); |
230 | } | 222 | } |
231 | } else if (strcmp(argv[i], "-version") == 0 || strcmp(argv[i], "-v") == 0) { | 223 | } else if (arg == "-version" || arg == "-v") { |
232 | // print current version string | 224 | // print current version string |
233 | cout << "Fluxbox " << __fluxbox_version << " : (c) 2001-2007 Henrik Kinnunen " << endl << endl; | 225 | cout << "Fluxbox " << __fluxbox_version << " : (c) 2001-2007 Henrik Kinnunen " << endl << endl; |
234 | exit(0); | 226 | exit(EXIT_SUCCESS); |
235 | } else if (strcmp(argv[i], "-log") == 0 ) { | 227 | } else if (arg == "-log") { |
236 | if (i + 1 >= argc) { | 228 | if (i + 1 >= argc) { |
237 | cerr<<_FB_CONSOLETEXT(main, LOGRequiresArg, "error: '-log' needs an argument", "")<<endl; | 229 | cerr<<_FB_CONSOLETEXT(main, LOGRequiresArg, "error: '-log' needs an argument", "")<<endl; |
238 | exit(1); | 230 | exit(EXIT_FAILURE); |
239 | } | 231 | } |
240 | log_filename = argv[++i]; | 232 | log_filename = argv[++i]; |
241 | } else if (strcmp(argv[i], "-help") == 0 || strcmp(argv[i], "-h") == 0) { | 233 | } else if (arg == "-help" || arg == "-h") { |
242 | // print program usage and command line options | 234 | // print program usage and command line options |
243 | printf(_FB_CONSOLETEXT(main, Usage, | 235 | printf(_FB_CONSOLETEXT(main, Usage, |
244 | "Fluxbox %s : (c) %s Henrik Kinnunen\n" | 236 | "Fluxbox %s : (c) %s Henrik Kinnunen\n" |
@@ -253,11 +245,11 @@ int main(int argc, char **argv) { | |||
253 | 245 | ||
254 | "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(), |
255 | __fluxbox_version, "2001-2007"); | 247 | __fluxbox_version, "2001-2007"); |
256 | exit(0); | 248 | exit(EXIT_SUCCESS); |
257 | } else if (strcmp(argv[i], "-info") == 0 || strcmp(argv[i], "-i") == 0) { | 249 | } else if (arg == "-info" || arg == "-i") { |
258 | showInfo(cout); | 250 | showInfo(cout); |
259 | exit(0); | 251 | exit(EXIT_SUCCESS); |
260 | } else if (strcmp(argv[i], "-verbose") == 0) { | 252 | } else if (arg == "-verbose") { |
261 | FbTk::ThemeManager::instance().setVerbose(true); | 253 | FbTk::ThemeManager::instance().setVerbose(true); |
262 | } | 254 | } |
263 | } | 255 | } |