From 2031f46de3475f52a54165740bf8c2b891b3bebe Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sat, 15 Feb 2003 01:58:06 +0000 Subject: added SetStyleCmd --- src/FbCommands.cc | 16 +++++++++++++++- src/FbCommands.hh | 10 +++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/FbCommands.cc b/src/FbCommands.cc index 11ae979..2dcec4e 100644 --- a/src/FbCommands.cc +++ b/src/FbCommands.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbCommands.cc,v 1.1 2003/01/09 17:46:10 fluxgen Exp $ +// $Id: FbCommands.cc,v 1.2 2003/02/15 01:58:06 fluxgen Exp $ #include "FbCommands.hh" #include "fluxbox.hh" @@ -61,4 +61,18 @@ void ReconfigureFluxboxCmd::execute() { Fluxbox::instance()->reconfigure(); } +SetStyleCmd::SetStyleCmd(const std::string &filename):m_filename(filename) { + +} + +void SetStyleCmd::execute() { +#ifdef DEBUG + cerr<<__FILE__<<":Loading style: "<saveStyleFilename(m_filename.c_str()); + Fluxbox::instance()->save_rc(); + FbTk::ThemeManager::instance().load(m_filename.c_str()); + +} + }; // end namespace FbCommands diff --git a/src/FbCommands.hh b/src/FbCommands.hh index f96066f..2674668 100644 --- a/src/FbCommands.hh +++ b/src/FbCommands.hh @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbCommands.hh,v 1.1 2003/01/09 17:46:10 fluxgen Exp $ +// $Id: FbCommands.hh,v 1.2 2003/02/15 01:56:57 fluxgen Exp $ // \file contains basic commands to restart, reconfigure, execute command and exit fluxbox @@ -59,6 +59,14 @@ public: void execute(); }; +class SetStyleCmd: public FbTk::Command { +public: + SetStyleCmd(const std::string &filename); + void execute(); +private: + std::string m_filename; +}; + }; // end namespace FbCommands #endif // FBCOMMANDS_HH -- cgit v0.11.2