aboutsummaryrefslogtreecommitdiff
path: root/src/FbCommands.cc
diff options
context:
space:
mode:
authorMatteo Galiazzo <matteo@maltesenarrazioni.it>2008-05-14 08:40:53 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-05-14 08:40:53 (GMT)
commitaf0f2419541aa7edccce74267c839b830f14d381 (patch)
tree1a4a97c6badf7fd4b783f6ccf1e0228169803a68 /src/FbCommands.cc
parent7f45bae4629f345906e96c1fcb3a3d1e49c36382 (diff)
downloadfluxbox_pavel-af0f2419541aa7edccce74267c839b830f14d381.zip
fluxbox_pavel-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.cc9
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
276void SetStyleCmd::execute() { 276void 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
283REGISTER_COMMAND_WITH_ARGS(keymode, FbCommands::KeyModeCmd, void); 284REGISTER_COMMAND_WITH_ARGS(keymode, FbCommands::KeyModeCmd, void);