diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-07-13 13:05:42 (GMT) |
---|---|---|
committer | Pavel Labath <pavelo@centrum.sk> | 2011-07-13 13:05:42 (GMT) |
commit | cde85e04178e481e321cd8fe4417b07ba6a2889c (patch) | |
tree | 47de4fb09d116dde2436effe971bc26161337966 /src/FbCommands.cc | |
parent | a13f6ba94c2a52966ea0a37edb5a9fa798568052 (diff) | |
download | fluxbox_pavel-cde85e04178e481e321cd8fe4417b07ba6a2889c.zip fluxbox_pavel-cde85e04178e481e321cd8fe4417b07ba6a2889c.tar.bz2 |
Attach a modifiedSig handler to the session.styleFile resource
Diffstat (limited to 'src/FbCommands.cc')
-rw-r--r-- | src/FbCommands.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/FbCommands.cc b/src/FbCommands.cc index 4db6af7..b54afd9 100644 --- a/src/FbCommands.cc +++ b/src/FbCommands.cc | |||
@@ -234,8 +234,8 @@ void ReconfigureFluxboxCmd::execute() { | |||
234 | REGISTER_COMMAND(reloadstyle, FbCommands::ReloadStyleCmd, void); | 234 | REGISTER_COMMAND(reloadstyle, FbCommands::ReloadStyleCmd, void); |
235 | 235 | ||
236 | void ReloadStyleCmd::execute() { | 236 | void ReloadStyleCmd::execute() { |
237 | SetStyleCmd cmd(Fluxbox::instance()->getStyleFilename()); | 237 | // setting the value will trigger a reload |
238 | cmd.execute(); | 238 | *Fluxbox::instance()->getStyleResource() = *Fluxbox::instance()->getStyleResource(); |
239 | } | 239 | } |
240 | 240 | ||
241 | REGISTER_COMMAND_WITH_ARGS(setstyle, FbCommands::SetStyleCmd, void); | 241 | REGISTER_COMMAND_WITH_ARGS(setstyle, FbCommands::SetStyleCmd, void); |
@@ -245,11 +245,7 @@ SetStyleCmd::SetStyleCmd(const string &filename):m_filename(filename) { | |||
245 | } | 245 | } |
246 | 246 | ||
247 | void SetStyleCmd::execute() { | 247 | void SetStyleCmd::execute() { |
248 | if (FbTk::ThemeManager::instance().load(m_filename, | 248 | *Fluxbox::instance()->getStyleResource() = m_filename; |
249 | Fluxbox::instance()->getStyleOverlayFilename())) { | ||
250 | Fluxbox::instance()->saveStyleFilename(m_filename.c_str()); | ||
251 | Fluxbox::instance()->save_rc(); | ||
252 | } | ||
253 | } | 249 | } |
254 | 250 | ||
255 | REGISTER_COMMAND_WITH_ARGS(keymode, FbCommands::KeyModeCmd, void); | 251 | REGISTER_COMMAND_WITH_ARGS(keymode, FbCommands::KeyModeCmd, void); |