diff options
author | fluxgen <fluxgen> | 2003-12-19 17:22:04 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-12-19 17:22:04 (GMT) |
commit | 6c647097c218cae3eabf2d380e603177b16ce8fc (patch) | |
tree | 921e931831cf65d5223ef6e40f0ca7fa9266bf84 /src/FbCommands.cc | |
parent | 694c4489e8de6179273cd8770004d6fd74a15d1b (diff) | |
download | fluxbox_pavel-6c647097c218cae3eabf2d380e603177b16ce8fc.zip fluxbox_pavel-6c647097c218cae3eabf2d380e603177b16ce8fc.tar.bz2 |
SetResourceValueCmd and SetResourceValueDialogCmd
Diffstat (limited to 'src/FbCommands.cc')
-rw-r--r-- | src/FbCommands.cc | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/src/FbCommands.cc b/src/FbCommands.cc index 1a1c74d..91ec11c 100644 --- a/src/FbCommands.cc +++ b/src/FbCommands.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: FbCommands.cc,v 1.20 2003/12/19 03:56:51 fluxgen Exp $ | 22 | // $Id: FbCommands.cc,v 1.21 2003/12/19 17:22:04 fluxgen Exp $ |
23 | 23 | ||
24 | #include "FbCommands.hh" | 24 | #include "FbCommands.hh" |
25 | #include "fluxbox.hh" | 25 | #include "fluxbox.hh" |
@@ -174,10 +174,8 @@ void SetWorkspaceNameCmd::execute() { | |||
174 | BScreen *screen = Fluxbox::instance()->mouseScreen(); | 174 | BScreen *screen = Fluxbox::instance()->mouseScreen(); |
175 | if (screen == 0) { | 175 | if (screen == 0) { |
176 | screen = Fluxbox::instance()->keyScreen(); | 176 | screen = Fluxbox::instance()->keyScreen(); |
177 | if (screen == 0) { | 177 | if (screen == 0) |
178 | cerr<<"Screen == 0!"<<endl; | ||
179 | return; | 178 | return; |
180 | } | ||
181 | } | 179 | } |
182 | 180 | ||
183 | if (m_workspace < 0) { | 181 | if (m_workspace < 0) { |
@@ -213,4 +211,29 @@ void CommandDialogCmd::execute() { | |||
213 | win->show(); | 211 | win->show(); |
214 | } | 212 | } |
215 | 213 | ||
214 | |||
215 | SetResourceValueCmd::SetResourceValueCmd(const std::string &resname, | ||
216 | const std::string &value): | ||
217 | m_resname(resname), | ||
218 | m_value(value) { | ||
219 | |||
220 | } | ||
221 | |||
222 | void SetResourceValueCmd::execute() { | ||
223 | BScreen *screen = Fluxbox::instance()->mouseScreen(); | ||
224 | if (screen == 0) | ||
225 | return; | ||
226 | screen->resourceManager().setResourceValue(m_resname, m_value); | ||
227 | Fluxbox::instance()->save_rc(); | ||
228 | } | ||
229 | |||
230 | void SetResourceValueDialogCmd::execute() { | ||
231 | BScreen *screen = Fluxbox::instance()->mouseScreen(); | ||
232 | if (screen == 0) | ||
233 | return; | ||
234 | |||
235 | FbTk::FbWindow *win = new CommandDialog(*screen, "Type resource name and the value", "SetResourceValue "); | ||
236 | win->show(); | ||
237 | }; | ||
238 | |||
216 | }; // end namespace FbCommands | 239 | }; // end namespace FbCommands |