diff options
author | fluxgen <fluxgen> | 2003-02-15 01:58:06 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-02-15 01:58:06 (GMT) |
commit | 2031f46de3475f52a54165740bf8c2b891b3bebe (patch) | |
tree | faa66894d8944b601ca9321d35fdbad321f96f1b /src | |
parent | 96c49e2d0d103d9a4d6e5a12e33fc4f7ab83c24e (diff) | |
download | fluxbox_lack-2031f46de3475f52a54165740bf8c2b891b3bebe.zip fluxbox_lack-2031f46de3475f52a54165740bf8c2b891b3bebe.tar.bz2 |
added SetStyleCmd
Diffstat (limited to 'src')
-rw-r--r-- | src/FbCommands.cc | 16 | ||||
-rw-r--r-- | 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 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: FbCommands.cc,v 1.1 2003/01/09 17:46:10 fluxgen Exp $ | 22 | // $Id: FbCommands.cc,v 1.2 2003/02/15 01:58:06 fluxgen Exp $ |
23 | 23 | ||
24 | #include "FbCommands.hh" | 24 | #include "FbCommands.hh" |
25 | #include "fluxbox.hh" | 25 | #include "fluxbox.hh" |
@@ -61,4 +61,18 @@ void ReconfigureFluxboxCmd::execute() { | |||
61 | Fluxbox::instance()->reconfigure(); | 61 | Fluxbox::instance()->reconfigure(); |
62 | } | 62 | } |
63 | 63 | ||
64 | SetStyleCmd::SetStyleCmd(const std::string &filename):m_filename(filename) { | ||
65 | |||
66 | } | ||
67 | |||
68 | void SetStyleCmd::execute() { | ||
69 | #ifdef DEBUG | ||
70 | cerr<<__FILE__<<":Loading style: "<<m_filename<<endl; | ||
71 | #endif // DEBUG | ||
72 | Fluxbox::instance()->saveStyleFilename(m_filename.c_str()); | ||
73 | Fluxbox::instance()->save_rc(); | ||
74 | FbTk::ThemeManager::instance().load(m_filename.c_str()); | ||
75 | |||
76 | } | ||
77 | |||
64 | }; // end namespace FbCommands | 78 | }; // 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 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: FbCommands.hh,v 1.1 2003/01/09 17:46:10 fluxgen Exp $ | 22 | // $Id: FbCommands.hh,v 1.2 2003/02/15 01:56:57 fluxgen Exp $ |
23 | 23 | ||
24 | // \file contains basic commands to restart, reconfigure, execute command and exit fluxbox | 24 | // \file contains basic commands to restart, reconfigure, execute command and exit fluxbox |
25 | 25 | ||
@@ -59,6 +59,14 @@ public: | |||
59 | void execute(); | 59 | void execute(); |
60 | }; | 60 | }; |
61 | 61 | ||
62 | class SetStyleCmd: public FbTk::Command { | ||
63 | public: | ||
64 | SetStyleCmd(const std::string &filename); | ||
65 | void execute(); | ||
66 | private: | ||
67 | std::string m_filename; | ||
68 | }; | ||
69 | |||
62 | }; // end namespace FbCommands | 70 | }; // end namespace FbCommands |
63 | 71 | ||
64 | #endif // FBCOMMANDS_HH | 72 | #endif // FBCOMMANDS_HH |