reload style command
fluxgen fluxgen
3 files changed,
18 insertions(+),
3 deletions(-)
M
src/FbCommandFactory.cc
→
src/FbCommandFactory.cc
@@ -20,7 +20,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: FbCommandFactory.cc,v 1.20 2003/11/17 00:33:16 fluxgen Exp $ +// $Id: FbCommandFactory.cc,v 1.21 2003/12/03 22:13:21 fluxgen Exp $ #include "FbCommandFactory.hh"@@ -96,6 +96,7 @@ "prevworkspace",
"quit", "raise", "reconfigure", + "reloadstyle", "resizeto", "resize", "resizehorizontal",@@ -138,6 +139,8 @@ else if (command == "reconfigure")
return new ReconfigureFluxboxCmd(); else if (command == "setstyle") return new SetStyleCmd(arguments); + else if (command == "reloadstyle") + return new ReloadStyleCmd(); else if (command == "saverc") return new SaveResources(); else if (command == "execcommand" || command == "execute" || command == "exec")
M
src/FbCommands.cc
→
src/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.17 2003/09/06 15:02:41 fluxgen Exp $ +// $Id: FbCommands.cc,v 1.18 2003/12/03 22:13:21 fluxgen Exp $ #include "FbCommands.hh" #include "fluxbox.hh"@@ -93,11 +93,18 @@ void ReconfigureFluxboxCmd::execute() {
Fluxbox::instance()->reconfigure(); } + +void ReloadStyleCmd::execute() { + SetStyleCmd cmd(Fluxbox::instance()->getStyleFilename()); + cmd.execute(); +} + SetStyleCmd::SetStyleCmd(const std::string &filename):m_filename(filename) { } void SetStyleCmd::execute() { + cerr<<"SetStyle: "<<m_filename<<endl; Fluxbox::instance()->saveStyleFilename(m_filename.c_str()); Fluxbox::instance()->save_rc(); FbTk::ThemeManager::instance().load(m_filename);
M
src/FbCommands.hh
→
src/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.12 2003/09/06 15:02:41 fluxgen Exp $ +// $Id: FbCommands.hh,v 1.13 2003/12/03 22:13:21 fluxgen Exp $ // \file contains basic commands to restart, reconfigure, execute command and exit fluxbox@@ -66,6 +66,11 @@ };
/// reconfigures fluxbox class ReconfigureFluxboxCmd: public FbTk::Command { +public: + void execute(); +}; + +class ReloadStyleCmd: public FbTk::Command { public: void execute(); };