aboutsummaryrefslogtreecommitdiff
path: root/src/FbCommands.cc
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-07-13 13:05:42 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-07-13 13:05:42 (GMT)
commitcde85e04178e481e321cd8fe4417b07ba6a2889c (patch)
tree47de4fb09d116dde2436effe971bc26161337966 /src/FbCommands.cc
parenta13f6ba94c2a52966ea0a37edb5a9fa798568052 (diff)
downloadfluxbox_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.cc10
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() {
234REGISTER_COMMAND(reloadstyle, FbCommands::ReloadStyleCmd, void); 234REGISTER_COMMAND(reloadstyle, FbCommands::ReloadStyleCmd, void);
235 235
236void ReloadStyleCmd::execute() { 236void 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
241REGISTER_COMMAND_WITH_ARGS(setstyle, FbCommands::SetStyleCmd, void); 241REGISTER_COMMAND_WITH_ARGS(setstyle, FbCommands::SetStyleCmd, void);
@@ -245,11 +245,7 @@ SetStyleCmd::SetStyleCmd(const string &filename):m_filename(filename) {
245} 245}
246 246
247void SetStyleCmd::execute() { 247void 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
255REGISTER_COMMAND_WITH_ARGS(keymode, FbCommands::KeyModeCmd, void); 251REGISTER_COMMAND_WITH_ARGS(keymode, FbCommands::KeyModeCmd, void);