diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Workspacemenu.cc | 15 | ||||
-rw-r--r-- | src/Workspacemenu.hh | 14 |
2 files changed, 6 insertions, 23 deletions
diff --git a/src/Workspacemenu.cc b/src/Workspacemenu.cc index dace287..05f5072 100644 --- a/src/Workspacemenu.cc +++ b/src/Workspacemenu.cc | |||
@@ -86,18 +86,3 @@ void Workspacemenu::itemSelected(int button, int index) { | |||
86 | } | 86 | } |
87 | } | 87 | } |
88 | 88 | ||
89 | void Workspacemenu::removeWorkspace(unsigned int id) { | ||
90 | if (id<getCount()) { | ||
91 | remove(id+2); // + 2 is where workspaces starts | ||
92 | #ifdef DEBUG | ||
93 | using namespace std; | ||
94 | cerr<<__FILE__<<"("<<__LINE__<<"): Removing "<<id<<endl; | ||
95 | #endif | ||
96 | } | ||
97 | } | ||
98 | |||
99 | void Workspacemenu::addWorkspace(Workspace *wkspc) { | ||
100 | assert(wkspc); | ||
101 | insert(wkspc->getName(), wkspc->getMenu(), | ||
102 | wkspc->getWorkspaceID() + 2); | ||
103 | } | ||
diff --git a/src/Workspacemenu.hh b/src/Workspacemenu.hh index 80732b2..26060c5 100644 --- a/src/Workspacemenu.hh +++ b/src/Workspacemenu.hh | |||
@@ -15,29 +15,27 @@ | |||
15 | // | 15 | // |
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
19 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | 19 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
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 | #ifndef WORKSPACEMENU_HH | 24 | #ifndef WORKSPACEMENU_HH |
25 | #define WORKSPACEMENU_HH | 25 | #define WORKSPACEMENU_HH |
26 | 26 | ||
27 | #include "Basemenu.hh" | 27 | #include "Basemenu.hh" |
28 | class Workspace; | 28 | class Workspace; |
29 | 29 | ||
30 | class Workspacemenu : public Basemenu { | 30 | class Workspacemenu : public Basemenu { |
31 | private: | 31 | private: |
32 | BScreen *screen; | 32 | BScreen *screen; |
33 | 33 | ||
34 | protected: | 34 | protected: |
35 | virtual void itemSelected(int, int); | 35 | virtual void itemSelected(int, int); |
36 | 36 | ||
37 | public: | 37 | public: |
38 | Workspacemenu(BScreen *); | 38 | Workspacemenu(BScreen *); |
39 | void removeWorkspace(unsigned int id); | ||
40 | void addWorkspace(Workspace *wkspc); | ||
41 | }; | 39 | }; |
42 | 40 | ||
43 | 41 | ||