diff options
author | fluxgen <fluxgen> | 2003-12-03 22:13:21 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-12-03 22:13:21 (GMT) |
commit | 7238e21fc58e8e8ec27b42a0907f98144ba4413e (patch) | |
tree | 85118f7bea9eedf5ed0cad77154f951604100677 /src | |
parent | 8553753773f846a82b9374540af3e8d4be6c4673 (diff) | |
download | fluxbox-7238e21fc58e8e8ec27b42a0907f98144ba4413e.zip fluxbox-7238e21fc58e8e8ec27b42a0907f98144ba4413e.tar.bz2 |
reload style command
Diffstat (limited to 'src')
-rw-r--r-- | src/FbCommandFactory.cc | 5 | ||||
-rw-r--r-- | src/FbCommands.cc | 9 | ||||
-rw-r--r-- | src/FbCommands.hh | 7 |
3 files changed, 18 insertions, 3 deletions
diff --git a/src/FbCommandFactory.cc b/src/FbCommandFactory.cc index b62a9ce..50dda7e 100644 --- a/src/FbCommandFactory.cc +++ b/src/FbCommandFactory.cc | |||
@@ -20,7 +20,7 @@ | |||
20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
21 | // DEALINGS IN THE SOFTWARE. | 21 | // DEALINGS IN THE SOFTWARE. |
22 | 22 | ||
23 | // $Id: FbCommandFactory.cc,v 1.20 2003/11/17 00:33:16 fluxgen Exp $ | 23 | // $Id: FbCommandFactory.cc,v 1.21 2003/12/03 22:13:21 fluxgen Exp $ |
24 | 24 | ||
25 | #include "FbCommandFactory.hh" | 25 | #include "FbCommandFactory.hh" |
26 | 26 | ||
@@ -96,6 +96,7 @@ FbCommandFactory::FbCommandFactory() { | |||
96 | "quit", | 96 | "quit", |
97 | "raise", | 97 | "raise", |
98 | "reconfigure", | 98 | "reconfigure", |
99 | "reloadstyle", | ||
99 | "resizeto", | 100 | "resizeto", |
100 | "resize", | 101 | "resize", |
101 | "resizehorizontal", | 102 | "resizehorizontal", |
@@ -138,6 +139,8 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command, | |||
138 | return new ReconfigureFluxboxCmd(); | 139 | return new ReconfigureFluxboxCmd(); |
139 | else if (command == "setstyle") | 140 | else if (command == "setstyle") |
140 | return new SetStyleCmd(arguments); | 141 | return new SetStyleCmd(arguments); |
142 | else if (command == "reloadstyle") | ||
143 | return new ReloadStyleCmd(); | ||
141 | else if (command == "saverc") | 144 | else if (command == "saverc") |
142 | return new SaveResources(); | 145 | return new SaveResources(); |
143 | else if (command == "execcommand" || command == "execute" || command == "exec") | 146 | else if (command == "execcommand" || command == "execute" || command == "exec") |
diff --git a/src/FbCommands.cc b/src/FbCommands.cc index 11d4f78..7372b6a 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.17 2003/09/06 15:02:41 fluxgen Exp $ | 22 | // $Id: FbCommands.cc,v 1.18 2003/12/03 22:13:21 fluxgen Exp $ |
23 | 23 | ||
24 | #include "FbCommands.hh" | 24 | #include "FbCommands.hh" |
25 | #include "fluxbox.hh" | 25 | #include "fluxbox.hh" |
@@ -93,11 +93,18 @@ void ReconfigureFluxboxCmd::execute() { | |||
93 | Fluxbox::instance()->reconfigure(); | 93 | Fluxbox::instance()->reconfigure(); |
94 | } | 94 | } |
95 | 95 | ||
96 | |||
97 | void ReloadStyleCmd::execute() { | ||
98 | SetStyleCmd cmd(Fluxbox::instance()->getStyleFilename()); | ||
99 | cmd.execute(); | ||
100 | } | ||
101 | |||
96 | SetStyleCmd::SetStyleCmd(const std::string &filename):m_filename(filename) { | 102 | SetStyleCmd::SetStyleCmd(const std::string &filename):m_filename(filename) { |
97 | 103 | ||
98 | } | 104 | } |
99 | 105 | ||
100 | void SetStyleCmd::execute() { | 106 | void SetStyleCmd::execute() { |
107 | cerr<<"SetStyle: "<<m_filename<<endl; | ||
101 | Fluxbox::instance()->saveStyleFilename(m_filename.c_str()); | 108 | Fluxbox::instance()->saveStyleFilename(m_filename.c_str()); |
102 | Fluxbox::instance()->save_rc(); | 109 | Fluxbox::instance()->save_rc(); |
103 | FbTk::ThemeManager::instance().load(m_filename); | 110 | FbTk::ThemeManager::instance().load(m_filename); |
diff --git a/src/FbCommands.hh b/src/FbCommands.hh index 749d689..d77bbf7 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.12 2003/09/06 15:02:41 fluxgen Exp $ | 22 | // $Id: FbCommands.hh,v 1.13 2003/12/03 22:13:21 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 | ||
@@ -70,6 +70,11 @@ public: | |||
70 | void execute(); | 70 | void execute(); |
71 | }; | 71 | }; |
72 | 72 | ||
73 | class ReloadStyleCmd: public FbTk::Command { | ||
74 | public: | ||
75 | void execute(); | ||
76 | }; | ||
77 | |||
73 | class SetStyleCmd: public FbTk::Command { | 78 | class SetStyleCmd: public FbTk::Command { |
74 | public: | 79 | public: |
75 | explicit SetStyleCmd(const std::string &filename); | 80 | explicit SetStyleCmd(const std::string &filename); |