diff options
author | mathias <mathias> | 2006-10-30 19:31:15 (GMT) |
---|---|---|
committer | mathias <mathias> | 2006-10-30 19:31:15 (GMT) |
commit | e5e76e7761f52ba7c0deca75bcecae4fbd3e2ff5 (patch) | |
tree | c84838a84802805e9b1463045e86200b7cef917f /src/FbCommands.cc | |
parent | 426c12c25c2ef095a882619ad7424684b88465b8 (diff) | |
download | fluxbox_pavel-e5e76e7761f52ba7c0deca75bcecae4fbd3e2ff5.zip fluxbox_pavel-e5e76e7761f52ba7c0deca75bcecae4fbd3e2ff5.tar.bz2 |
Cosmetic patch from Slava Semushin
Diffstat (limited to 'src/FbCommands.cc')
-rw-r--r-- | src/FbCommands.cc | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/src/FbCommands.cc b/src/FbCommands.cc index 08f1f93..83025ec 100644 --- a/src/FbCommands.cc +++ b/src/FbCommands.cc | |||
@@ -54,7 +54,12 @@ | |||
54 | #include <process.h> // for P_NOWAIT | 54 | #include <process.h> // for P_NOWAIT |
55 | #endif // __EMX__ | 55 | #endif // __EMX__ |
56 | 56 | ||
57 | using namespace std; | 57 | using std::string; |
58 | using std::pair; | ||
59 | using std::set; | ||
60 | using std::ofstream; | ||
61 | using std::endl; | ||
62 | using std::ios; | ||
58 | 63 | ||
59 | namespace { | 64 | namespace { |
60 | 65 | ||
@@ -107,7 +112,7 @@ void showMenu(const BScreen &screen, FbTk::Menu &menu) { | |||
107 | 112 | ||
108 | namespace FbCommands { | 113 | namespace FbCommands { |
109 | 114 | ||
110 | ExecuteCmd::ExecuteCmd(const std::string &cmd, int screen_num):m_cmd(cmd), m_screen_num(screen_num) { | 115 | ExecuteCmd::ExecuteCmd(const string &cmd, int screen_num):m_cmd(cmd), m_screen_num(screen_num) { |
111 | 116 | ||
112 | } | 117 | } |
113 | 118 | ||
@@ -125,7 +130,7 @@ int ExecuteCmd::run() { | |||
125 | if (pid) | 130 | if (pid) |
126 | return pid; | 131 | return pid; |
127 | 132 | ||
128 | std::string displaystring("DISPLAY="); | 133 | string displaystring("DISPLAY="); |
129 | displaystring += DisplayString(FbTk::App::instance()->display()); | 134 | displaystring += DisplayString(FbTk::App::instance()->display()); |
130 | char intbuff[64]; | 135 | char intbuff[64]; |
131 | int screen_num = m_screen_num; | 136 | int screen_num = m_screen_num; |
@@ -149,7 +154,7 @@ int ExecuteCmd::run() { | |||
149 | return pid; // compiler happy -> we are happy ;) | 154 | return pid; // compiler happy -> we are happy ;) |
150 | } | 155 | } |
151 | 156 | ||
152 | SetModKeyCmd::SetModKeyCmd(const std::string& modkey) : m_modkey(modkey) { } | 157 | SetModKeyCmd::SetModKeyCmd(const string& modkey) : m_modkey(modkey) { } |
153 | 158 | ||
154 | void SetModKeyCmd::execute() { | 159 | void SetModKeyCmd::execute() { |
155 | Fluxbox::instance()->setModKey(m_modkey.c_str()); | 160 | Fluxbox::instance()->setModKey(m_modkey.c_str()); |
@@ -158,7 +163,7 @@ void SetModKeyCmd::execute() { | |||
158 | Fluxbox::instance()->reconfigure(); | 163 | Fluxbox::instance()->reconfigure(); |
159 | } | 164 | } |
160 | 165 | ||
161 | ExportCmd::ExportCmd(const std::string& name, const std::string& value) : | 166 | ExportCmd::ExportCmd(const string& name, const string& value) : |
162 | m_name(name), m_value(value) { | 167 | m_name(name), m_value(value) { |
163 | } | 168 | } |
164 | 169 | ||
@@ -167,7 +172,7 @@ void ExportCmd::execute() { | |||
167 | // the setenv()-routine is not everywhere available and | 172 | // the setenv()-routine is not everywhere available and |
168 | // putenv() doesnt manage the strings in the environment | 173 | // putenv() doesnt manage the strings in the environment |
169 | // and hence we have to do that on our own to avoid memleaking | 174 | // and hence we have to do that on our own to avoid memleaking |
170 | static std::set<char*> stored; | 175 | static set<char*> stored; |
171 | char* newenv = new char[m_name.size() + m_value.size() + 2]; | 176 | char* newenv = new char[m_name.size() + m_value.size() + 2]; |
172 | if (newenv) { | 177 | if (newenv) { |
173 | 178 | ||
@@ -203,7 +208,7 @@ void SaveResources::execute() { | |||
203 | Fluxbox::instance()->save_rc(); | 208 | Fluxbox::instance()->save_rc(); |
204 | } | 209 | } |
205 | 210 | ||
206 | RestartFluxboxCmd::RestartFluxboxCmd(const std::string &cmd):m_cmd(cmd){ | 211 | RestartFluxboxCmd::RestartFluxboxCmd(const string &cmd):m_cmd(cmd){ |
207 | } | 212 | } |
208 | 213 | ||
209 | void RestartFluxboxCmd::execute() { | 214 | void RestartFluxboxCmd::execute() { |
@@ -223,7 +228,7 @@ void ReloadStyleCmd::execute() { | |||
223 | cmd.execute(); | 228 | cmd.execute(); |
224 | } | 229 | } |
225 | 230 | ||
226 | SetStyleCmd::SetStyleCmd(const std::string &filename):m_filename(filename) { | 231 | SetStyleCmd::SetStyleCmd(const string &filename):m_filename(filename) { |
227 | 232 | ||
228 | } | 233 | } |
229 | 234 | ||
@@ -234,7 +239,7 @@ void SetStyleCmd::execute() { | |||
234 | Fluxbox::instance()->getStyleOverlayFilename()); | 239 | Fluxbox::instance()->getStyleOverlayFilename()); |
235 | } | 240 | } |
236 | 241 | ||
237 | KeyModeCmd::KeyModeCmd(const std::string &arguments):m_keymode(arguments),m_end_args("None Escape") { | 242 | KeyModeCmd::KeyModeCmd(const string &arguments):m_keymode(arguments),m_end_args("None Escape") { |
238 | string::size_type second_pos = m_keymode.find_first_of(" \t", 0); | 243 | string::size_type second_pos = m_keymode.find_first_of(" \t", 0); |
239 | if (second_pos != string::npos) { | 244 | if (second_pos != string::npos) { |
240 | // ok we have arguments, parsing them here | 245 | // ok we have arguments, parsing them here |
@@ -267,7 +272,7 @@ void ShowWorkspaceMenuCmd::execute() { | |||
267 | 272 | ||
268 | 273 | ||
269 | 274 | ||
270 | SetWorkspaceNameCmd::SetWorkspaceNameCmd(const std::string &name, int spaceid): | 275 | SetWorkspaceNameCmd::SetWorkspaceNameCmd(const string &name, int spaceid): |
271 | m_name(name), m_workspace(spaceid) { } | 276 | m_name(name), m_workspace(spaceid) { } |
272 | 277 | ||
273 | void SetWorkspaceNameCmd::execute() { | 278 | void SetWorkspaceNameCmd::execute() { |
@@ -312,8 +317,8 @@ void CommandDialogCmd::execute() { | |||
312 | } | 317 | } |
313 | 318 | ||
314 | 319 | ||
315 | SetResourceValueCmd::SetResourceValueCmd(const std::string &resname, | 320 | SetResourceValueCmd::SetResourceValueCmd(const string &resname, |
316 | const std::string &value): | 321 | const string &value): |
317 | m_resname(resname), | 322 | m_resname(resname), |
318 | m_value(value) { | 323 | m_value(value) { |
319 | 324 | ||
@@ -336,7 +341,7 @@ void SetResourceValueDialogCmd::execute() { | |||
336 | win->show(); | 341 | win->show(); |
337 | }; | 342 | }; |
338 | 343 | ||
339 | BindKeyCmd::BindKeyCmd(const std::string &keybind):m_keybind(keybind) { } | 344 | BindKeyCmd::BindKeyCmd(const string &keybind):m_keybind(keybind) { } |
340 | 345 | ||
341 | void BindKeyCmd::execute() { | 346 | void BindKeyCmd::execute() { |
342 | if (Fluxbox::instance()->keys() != 0) { | 347 | if (Fluxbox::instance()->keys() != 0) { |