diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-07-13 13:05:42 (GMT) |
---|---|---|
committer | Pavel Labath <pavelo@centrum.sk> | 2011-11-01 09:57:22 (GMT) |
commit | 01c3f38d77d08e784ebc07bdec9a3f0dfd345692 (patch) | |
tree | d0698fe6181b07a6972f4f2efd64c1c4ac1d4d4d /src/FbCommands.cc | |
parent | 5b85f21a7ff560eafb1553b4529d2240000aa8b4 (diff) | |
download | fluxbox_pavel-01c3f38d77d08e784ebc07bdec9a3f0dfd345692.zip fluxbox_pavel-01c3f38d77d08e784ebc07bdec9a3f0dfd345692.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 b7bd309..7d6b994 100644 --- a/src/FbCommands.cc +++ b/src/FbCommands.cc | |||
@@ -246,8 +246,8 @@ void ReconfigureFluxboxCmd::execute() { | |||
246 | REGISTER_COMMAND(reloadstyle, FbCommands::ReloadStyleCmd, void); | 246 | REGISTER_COMMAND(reloadstyle, FbCommands::ReloadStyleCmd, void); |
247 | 247 | ||
248 | void ReloadStyleCmd::execute() { | 248 | void ReloadStyleCmd::execute() { |
249 | SetStyleCmd cmd(Fluxbox::instance()->getStyleFilename()); | 249 | // setting the value will trigger a reload |
250 | cmd.execute(); | 250 | *Fluxbox::instance()->getStyleResource() = *Fluxbox::instance()->getStyleResource(); |
251 | } | 251 | } |
252 | 252 | ||
253 | REGISTER_COMMAND_WITH_ARGS(setstyle, FbCommands::SetStyleCmd, void); | 253 | REGISTER_COMMAND_WITH_ARGS(setstyle, FbCommands::SetStyleCmd, void); |
@@ -257,11 +257,7 @@ SetStyleCmd::SetStyleCmd(const string &filename):m_filename(filename) { | |||
257 | } | 257 | } |
258 | 258 | ||
259 | void SetStyleCmd::execute() { | 259 | void SetStyleCmd::execute() { |
260 | if (FbTk::ThemeManager::instance().load(m_filename, | 260 | *Fluxbox::instance()->getStyleResource() = m_filename; |
261 | Fluxbox::instance()->getStyleOverlayFilename())) { | ||
262 | Fluxbox::instance()->saveStyleFilename(m_filename.c_str()); | ||
263 | Fluxbox::instance()->save_rc(); | ||
264 | } | ||
265 | } | 261 | } |
266 | 262 | ||
267 | REGISTER_COMMAND_WITH_ARGS(keymode, FbCommands::KeyModeCmd, void); | 263 | REGISTER_COMMAND_WITH_ARGS(keymode, FbCommands::KeyModeCmd, void); |