diff options
author | Matteo Galiazzo <matteo@maltesenarrazioni.it> | 2008-05-14 08:40:53 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-05-14 08:40:53 (GMT) |
commit | af0f2419541aa7edccce74267c839b830f14d381 (patch) | |
tree | 1a4a97c6badf7fd4b783f6ccf1e0228169803a68 /src/FbCommands.cc | |
parent | 7f45bae4629f345906e96c1fcb3a3d1e49c36382 (diff) | |
download | fluxbox-af0f2419541aa7edccce74267c839b830f14d381.zip fluxbox-af0f2419541aa7edccce74267c839b830f14d381.tar.bz2 |
don't save rc in SetStyle command if loading the style fails
Diffstat (limited to 'src/FbCommands.cc')
-rw-r--r-- | src/FbCommands.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/FbCommands.cc b/src/FbCommands.cc index e0d0768..49f727c 100644 --- a/src/FbCommands.cc +++ b/src/FbCommands.cc | |||
@@ -274,10 +274,11 @@ SetStyleCmd::SetStyleCmd(const string &filename):m_filename(filename) { | |||
274 | } | 274 | } |
275 | 275 | ||
276 | void SetStyleCmd::execute() { | 276 | void SetStyleCmd::execute() { |
277 | Fluxbox::instance()->saveStyleFilename(m_filename.c_str()); | 277 | if (FbTk::ThemeManager::instance().load(m_filename, |
278 | Fluxbox::instance()->save_rc(); | 278 | Fluxbox::instance()->getStyleOverlayFilename())) { |
279 | FbTk::ThemeManager::instance().load(m_filename, | 279 | Fluxbox::instance()->saveStyleFilename(m_filename.c_str()); |
280 | Fluxbox::instance()->getStyleOverlayFilename()); | 280 | Fluxbox::instance()->save_rc(); |
281 | } | ||
281 | } | 282 | } |
282 | 283 | ||
283 | REGISTER_COMMAND_WITH_ARGS(keymode, FbCommands::KeyModeCmd, void); | 284 | REGISTER_COMMAND_WITH_ARGS(keymode, FbCommands::KeyModeCmd, void); |