diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/FbCommands.cc | 11 | ||||
-rw-r--r-- | src/FbCommands.hh | 6 | ||||
-rw-r--r-- | src/Screen.cc | 6 |
4 files changed, 19 insertions, 6 deletions
@@ -1,6 +1,8 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 0.9.3: | 2 | Changes for 0.9.3: |
3 | *03/06/08: | 3 | *03/06/08: |
4 | * Fix restart command to accept and use an argument again (Simon) | ||
5 | Screen.cc FbCommands.hh/cc | ||
4 | * Fix bug that sometimes left window frames after window closed (Simon) | 6 | * Fix bug that sometimes left window frames after window closed (Simon) |
5 | fluxbox.cc | 7 | fluxbox.cc |
6 | *03/06/06: | 8 | *03/06/06: |
diff --git a/src/FbCommands.cc b/src/FbCommands.cc index 5ce933a..a118fb3 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.5 2003/04/28 01:17:39 fluxgen Exp $ | 22 | // $Id: FbCommands.cc,v 1.6 2003/06/08 13:47:30 rathnor Exp $ |
23 | 23 | ||
24 | #include "FbCommands.hh" | 24 | #include "FbCommands.hh" |
25 | #include "fluxbox.hh" | 25 | #include "fluxbox.hh" |
@@ -62,8 +62,15 @@ void ExitFluxboxCmd::execute() { | |||
62 | Fluxbox::instance()->shutdown(); | 62 | Fluxbox::instance()->shutdown(); |
63 | } | 63 | } |
64 | 64 | ||
65 | RestartFluxboxCmd::RestartFluxboxCmd(const std::string &cmd):m_cmd(cmd){ | ||
66 | } | ||
67 | |||
65 | void RestartFluxboxCmd::execute() { | 68 | void RestartFluxboxCmd::execute() { |
66 | Fluxbox::instance()->restart(); | 69 | if (m_cmd.size() == 0) { |
70 | Fluxbox::instance()->restart(); | ||
71 | } else { | ||
72 | Fluxbox::instance()->restart(m_cmd.c_str()); | ||
73 | } | ||
67 | } | 74 | } |
68 | 75 | ||
69 | void ReconfigureFluxboxCmd::execute() { | 76 | void ReconfigureFluxboxCmd::execute() { |
diff --git a/src/FbCommands.hh b/src/FbCommands.hh index 1056b6f..4f87bf1 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.4 2003/04/28 00:34:06 fluxgen Exp $ | 22 | // $Id: FbCommands.hh,v 1.5 2003/06/08 13:47:30 rathnor 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 | ||
@@ -51,7 +51,11 @@ public: | |||
51 | /// restarts fluxbox | 51 | /// restarts fluxbox |
52 | class RestartFluxboxCmd: public FbTk::Command { | 52 | class RestartFluxboxCmd: public FbTk::Command { |
53 | public: | 53 | public: |
54 | RestartFluxboxCmd(const std::string &cmd); | ||
54 | void execute(); | 55 | void execute(); |
56 | private: | ||
57 | std::string m_cmd; | ||
58 | const int m_screen_num; | ||
55 | }; | 59 | }; |
56 | 60 | ||
57 | /// reconfigures fluxbox | 61 | /// reconfigures fluxbox |
diff --git a/src/Screen.cc b/src/Screen.cc index 1182dba..3ecb077 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Screen.cc,v 1.178 2003/05/24 13:13:22 rathnor Exp $ | 25 | // $Id: Screen.cc,v 1.179 2003/06/08 13:47:30 rathnor Exp $ |
26 | 26 | ||
27 | 27 | ||
28 | #include "Screen.hh" | 28 | #include "Screen.hh" |
@@ -1891,7 +1891,7 @@ void BScreen::initMenu() { | |||
1891 | } | 1891 | } |
1892 | 1892 | ||
1893 | if (defaultMenu) { | 1893 | if (defaultMenu) { |
1894 | FbTk::RefCount<FbTk::Command> restart_fb(new FbCommands::RestartFluxboxCmd()); | 1894 | FbTk::RefCount<FbTk::Command> restart_fb(new FbCommands::RestartFluxboxCmd("")); |
1895 | FbTk::RefCount<FbTk::Command> exit_fb(new FbCommands::ExitFluxboxCmd()); | 1895 | FbTk::RefCount<FbTk::Command> exit_fb(new FbCommands::ExitFluxboxCmd()); |
1896 | FbTk::RefCount<FbTk::Command> execute_xterm(new FbCommands::ExecuteCmd("xterm", screenNumber())); | 1896 | FbTk::RefCount<FbTk::Command> execute_xterm(new FbCommands::ExecuteCmd("xterm", screenNumber())); |
1897 | m_rootmenu->setInternalMenu(); | 1897 | m_rootmenu->setInternalMenu(); |
@@ -2098,7 +2098,7 @@ bool BScreen::parseMenuFile(ifstream &file, FbTk::Menu &menu, int &row) { | |||
2098 | "no menu label defined\n")); | 2098 | "no menu label defined\n")); |
2099 | cerr<<"Row: "<<row<<endl; | 2099 | cerr<<"Row: "<<row<<endl; |
2100 | } else { | 2100 | } else { |
2101 | FbTk::RefCount<FbTk::Command> restart_fb(new FbCommands::RestartFluxboxCmd()); | 2101 | FbTk::RefCount<FbTk::Command> restart_fb(new FbCommands::RestartFluxboxCmd(str_cmd)); |
2102 | menu.insert(str_label.c_str(), restart_fb); | 2102 | menu.insert(str_label.c_str(), restart_fb); |
2103 | } | 2103 | } |
2104 | } // end of restart | 2104 | } // end of restart |