diff options
-rw-r--r-- | src/Screen.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index a669165..4767363 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.31 2002/02/26 22:40:31 fluxgen Exp $ | 25 | // $Id: Screen.cc,v 1.32 2002/02/27 23:47:47 fluxgen Exp $ |
26 | 26 | ||
27 | // stupid macros needed to access some functions in version 2 of the GNU C | 27 | // stupid macros needed to access some functions in version 2 of the GNU C |
28 | // library | 28 | // library |
@@ -737,9 +737,9 @@ FluxboxWindow *BScreen::getIcon(int index) { | |||
737 | int BScreen::addWorkspace(void) { | 737 | int BScreen::addWorkspace(void) { |
738 | Workspace *wkspc = new Workspace(this, workspacesList.size()); | 738 | Workspace *wkspc = new Workspace(this, workspacesList.size()); |
739 | workspacesList.push_back(wkspc); | 739 | workspacesList.push_back(wkspc); |
740 | 740 | //add workspace to workspacemenu | |
741 | workspacemenu->insert(wkspc->getName(), wkspc->getMenu(), | 741 | workspacemenu->addWorkspace(wkspc); |
742 | wkspc->getWorkspaceID() + 1); | 742 | |
743 | workspacemenu->update(); | 743 | workspacemenu->update(); |
744 | saveWorkspaces(workspacesList.size()); | 744 | saveWorkspaces(workspacesList.size()); |
745 | toolbar->reconfigure(); | 745 | toolbar->reconfigure(); |
@@ -761,10 +761,11 @@ int BScreen::removeLastWorkspace(void) { | |||
761 | 761 | ||
762 | wkspc->removeAll(); | 762 | wkspc->removeAll(); |
763 | 763 | ||
764 | workspacemenu->remove(wkspc->getWorkspaceID() + 2); | 764 | workspacemenu->removeWorkspace(wkspc->getWorkspaceID()); |
765 | workspacemenu->update(); | 765 | workspacemenu->update(); |
766 | 766 | ||
767 | workspacesList.erase(workspacesList.begin() + wkspc->getWorkspaceID()); | 767 | //remove last workspace |
768 | workspacesList.pop_back(); | ||
768 | delete wkspc; | 769 | delete wkspc; |
769 | 770 | ||
770 | toolbar->reconfigure(); | 771 | toolbar->reconfigure(); |
@@ -1835,3 +1836,4 @@ void BScreen::updateGnomeClientList() { | |||
1835 | } | 1836 | } |
1836 | 1837 | ||
1837 | #endif //!GNOME | 1838 | #endif //!GNOME |
1839 | |||