aboutsummaryrefslogtreecommitdiff
path: root/src/Workspacemenu.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-05-07 14:09:32 (GMT)
committerfluxgen <fluxgen>2002-05-07 14:09:32 (GMT)
commite027cad57de13c089b03df53ecfb2b31edb5d437 (patch)
treead51deecfdcdda0287e5af0eaf08bb39fe3494f2 /src/Workspacemenu.cc
parent0ec9f1a21dba10a3f7dab273a0ba485d5cb9cb41 (diff)
downloadfluxbox-e027cad57de13c089b03df53ecfb2b31edb5d437.zip
fluxbox-e027cad57de13c089b03df53ecfb2b31edb5d437.tar.bz2
minor cleaning
Diffstat (limited to 'src/Workspacemenu.cc')
-rw-r--r--src/Workspacemenu.cc37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/Workspacemenu.cc b/src/Workspacemenu.cc
index a9b0b52..d13621b 100644
--- a/src/Workspacemenu.cc
+++ b/src/Workspacemenu.cc
@@ -21,28 +21,26 @@
21// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22// DEALINGS IN THE SOFTWARE. 22// DEALINGS IN THE SOFTWARE.
23 23
24// $Id: Workspacemenu.cc,v 1.6 2002/04/09 23:19:17 fluxgen Exp $ 24// $Id: Workspacemenu.cc,v 1.7 2002/05/07 14:05:00 fluxgen Exp $
25 25
26//use GNU extension 26//use GNU extension
27#ifndef _GNU_SOURCE 27#ifndef _GNU_SOURCE
28#define _GNU_SOURCE 28#define _GNU_SOURCE
29#endif // _GNU_SOURCE 29#endif // _GNU_SOURCE
30 30
31#ifdef HAVE_CONFIG_H 31#ifdef HAVE_CONFIG_H
32# include "../config.h" 32#include "../config.h"
33#endif // HAVE_CONFIG_H 33#endif // HAVE_CONFIG_H
34 34
35#include "Workspacemenu.hh"
36
35#include "i18n.hh" 37#include "i18n.hh"
36#include "fluxbox.hh"
37#include "Screen.hh" 38#include "Screen.hh"
38#include "Toolbar.hh"
39#include "Workspacemenu.hh"
40#include "Workspace.hh" 39#include "Workspace.hh"
41#include <iostream> 40#include <iostream>
42#include <cassert> 41#include <cassert>
43 42
44Workspacemenu::Workspacemenu(BScreen *scrn) : Basemenu(scrn) { 43Workspacemenu::Workspacemenu(BScreen *scrn) : Basemenu(scrn) {
45 screen = scrn;
46 44
47 setInternalMenu(); 45 setInternalMenu();
48 I18n *i18n = I18n::instance(); 46 I18n *i18n = I18n::instance();
@@ -60,17 +58,18 @@ Workspacemenu::Workspacemenu(BScreen *scrn) : Basemenu(scrn) {
60 58
61 59
62void Workspacemenu::itemSelected(int button, unsigned int index) { 60void Workspacemenu::itemSelected(int button, unsigned int index) {
63 if (button == 1) { 61 if (button == 1) {
64 if (index == 0) 62 if (index == 0)
65 screen->addWorkspace(); 63 screen()->addWorkspace();
66 else if (index == 1) 64 else if (index == 1)
67 screen->removeLastWorkspace(); 65 screen()->removeLastWorkspace();
68 else if ((screen->getCurrentWorkspace()->workspaceID() != 66 else if ((screen()->getCurrentWorkspace()->workspaceID() !=
69 (index - 2)) && ((index - 2) < screen->getCount())) 67 (index - 2)) && ((index - 2) < screen()->getCount())) {
70 screen->changeWorkspaceID(index - 2); 68 screen()->changeWorkspaceID(index - 2);
71 69 }
72 if (! (screen->getWorkspacemenu()->isTorn() || isTorn())) 70
73 hide(); 71 if (! (screen()->getWorkspacemenu()->isTorn() || isTorn()))
74 } 72 hide();
73 }
75} 74}
76 75