all repos — fluxbox @ 2031f46de3475f52a54165740bf8c2b891b3bebe

custom fork of the fluxbox windowmanager

added SetStyleCmd
fluxgen fluxgen
commit

2031f46de3475f52a54165740bf8c2b891b3bebe

parent

96c49e2d0d103d9a4d6e5a12e33fc4f7ab83c24e

2 files changed, 24 insertions(+), 2 deletions(-)

jump to
M src/FbCommands.ccsrc/FbCommands.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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"

@@ -59,6 +59,20 @@ }

void ReconfigureFluxboxCmd::execute() { Fluxbox::instance()->reconfigure(); +} + +SetStyleCmd::SetStyleCmd(const std::string &filename):m_filename(filename) { + +} + +void SetStyleCmd::execute() { +#ifdef DEBUG + cerr<<__FILE__<<":Loading style: "<<m_filename<<endl; +#endif // DEBUG + Fluxbox::instance()->saveStyleFilename(m_filename.c_str()); + Fluxbox::instance()->save_rc(); + FbTk::ThemeManager::instance().load(m_filename.c_str()); + } }; // end namespace FbCommands
M src/FbCommands.hhsrc/FbCommands.hh

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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

@@ -57,6 +57,14 @@ /// reconfigures fluxbox

class ReconfigureFluxboxCmd: public FbTk::Command { public: void execute(); +}; + +class SetStyleCmd: public FbTk::Command { +public: + SetStyleCmd(const std::string &filename); + void execute(); +private: + std::string m_filename; }; }; // end namespace FbCommands