From f7fc364a4cd6ca6ac89902880151045e55241502 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Wed, 3 Dec 2003 23:08:48 +0000 Subject: minor cleaning --- src/Screen.cc | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/src/Screen.cc b/src/Screen.cc index 5194434..36cc4f2 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.241 2003/11/16 22:33:55 rathnor Exp $ +// $Id: Screen.cc,v 1.242 2003/12/03 23:08:48 fluxgen Exp $ #include "Screen.hh" @@ -189,40 +189,12 @@ private: const std::string m_filename; }; -class AddWorkspaceCmd:public FbTk::Command { -public: - explicit AddWorkspaceCmd(BScreen &scrn):m_screen(scrn) { } - void execute() { - m_screen.addWorkspace(); - } -private: - BScreen &m_screen; -}; - -class RemoveLastWorkspaceCmd:public FbTk::Command { -public: - explicit RemoveLastWorkspaceCmd(BScreen &scrn):m_screen(scrn) { } - void execute() { - m_screen.removeLastWorkspace(); - } -private: - BScreen &m_screen; -}; - -class ReloadStyleCmd: public FbTk::Command { -public: - void execute() { - FbCommands::SetStyleCmd cmd(Fluxbox::instance()->getStyleFilename()); - cmd.execute(); - } -}; - void setupWorkspacemenu(BScreen &scr, FbTk::Menu &menu) { menu.removeAll(); // clear all items using namespace FbTk; menu.setLabel("Workspace"); - RefCount new_workspace(new AddWorkspaceCmd(scr)); - RefCount remove_last(new RemoveLastWorkspaceCmd(scr)); + RefCount new_workspace(new FbTk::SimpleCommand(scr, &BScreen::addWorkspace)); + RefCount remove_last(new FbTk::SimpleCommand(scr, &BScreen::removeLastWorkspace)); //!! TODO: NLS menu.insert("New Workspace", new_workspace); menu.insert("Remove Last", remove_last); -- cgit v0.11.2