summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-12-03 23:08:48 (GMT)
committerfluxgen <fluxgen>2003-12-03 23:08:48 (GMT)
commitf7fc364a4cd6ca6ac89902880151045e55241502 (patch)
tree300028781ed221cfb36acf022356329da416a227 /src
parent9f4c78224f19935f6b021d2150ae1a4d7cff58f4 (diff)
downloadfluxbox_lack-f7fc364a4cd6ca6ac89902880151045e55241502.zip
fluxbox_lack-f7fc364a4cd6ca6ac89902880151045e55241502.tar.bz2
minor cleaning
Diffstat (limited to 'src')
-rw-r--r--src/Screen.cc34
1 files 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 @@
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.241 2003/11/16 22:33:55 rathnor Exp $ 25// $Id: Screen.cc,v 1.242 2003/12/03 23:08:48 fluxgen Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -189,40 +189,12 @@ private:
189 const std::string m_filename; 189 const std::string m_filename;
190}; 190};
191 191
192class AddWorkspaceCmd:public FbTk::Command {
193public:
194 explicit AddWorkspaceCmd(BScreen &scrn):m_screen(scrn) { }
195 void execute() {
196 m_screen.addWorkspace();
197 }
198private:
199 BScreen &m_screen;
200};
201
202class RemoveLastWorkspaceCmd:public FbTk::Command {
203public:
204 explicit RemoveLastWorkspaceCmd(BScreen &scrn):m_screen(scrn) { }
205 void execute() {
206 m_screen.removeLastWorkspace();
207 }
208private:
209 BScreen &m_screen;
210};
211
212class ReloadStyleCmd: public FbTk::Command {
213public:
214 void execute() {
215 FbCommands::SetStyleCmd cmd(Fluxbox::instance()->getStyleFilename());
216 cmd.execute();
217 }
218};
219
220void setupWorkspacemenu(BScreen &scr, FbTk::Menu &menu) { 192void setupWorkspacemenu(BScreen &scr, FbTk::Menu &menu) {
221 menu.removeAll(); // clear all items 193 menu.removeAll(); // clear all items
222 using namespace FbTk; 194 using namespace FbTk;
223 menu.setLabel("Workspace"); 195 menu.setLabel("Workspace");
224 RefCount<Command> new_workspace(new AddWorkspaceCmd(scr)); 196 RefCount<Command> new_workspace(new FbTk::SimpleCommand<BScreen, int>(scr, &BScreen::addWorkspace));
225 RefCount<Command> remove_last(new RemoveLastWorkspaceCmd(scr)); 197 RefCount<Command> remove_last(new FbTk::SimpleCommand<BScreen, int>(scr, &BScreen::removeLastWorkspace));
226 //!! TODO: NLS 198 //!! TODO: NLS
227 menu.insert("New Workspace", new_workspace); 199 menu.insert("New Workspace", new_workspace);
228 menu.insert("Remove Last", remove_last); 200 menu.insert("Remove Last", remove_last);