update from Workspace changes
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.44 2002/04/08 22:26:25 fluxgen Exp $ +// $Id: Screen.cc,v 1.45 2002/04/09 23:15:21 fluxgen Exp $ //use GNU extensions #ifndef _GNU_SOURCE@@ -371,12 +371,12 @@ if (*resource.workspaces != 0) {
for (int i = 0; i < *resource.workspaces; ++i) { wkspc = new Workspace(this, workspacesList.size()); workspacesList.push_back(wkspc); - workspacemenu->insert(wkspc->getName(), wkspc->getMenu()); + workspacemenu->insert(wkspc->name().c_str(), wkspc->menu()); } } else { wkspc = new Workspace(this, workspacesList.size()); workspacesList.push_back(wkspc); - workspacemenu->insert(wkspc->getName(), wkspc->getMenu()); + workspacemenu->insert(wkspc->name().c_str(), wkspc->menu()); } workspacemenu->insert(i18n->@@ -720,8 +720,8 @@ int BScreen::addWorkspace(void) {
Workspace *wkspc = new Workspace(this, workspacesList.size()); workspacesList.push_back(wkspc); //add workspace to workspacemenu - workspacemenu->insert(wkspc->getName(), wkspc->getMenu(), - wkspc->getWorkspaceID() + 2); //+2 so we add it after "remove last" + workspacemenu->insert(wkspc->name().c_str(), wkspc->menu(), + wkspc->workspaceID() + 2); //+2 so we add it after "remove last" workspacemenu->update(); saveWorkspaces(workspacesList.size());@@ -739,12 +739,12 @@ int BScreen::removeLastWorkspace(void) {
if (workspacesList.size() > 1) { Workspace *wkspc = workspacesList.back(); - if (current_workspace->getWorkspaceID() == wkspc->getWorkspaceID()) - changeWorkspaceID(current_workspace->getWorkspaceID() - 1); + if (current_workspace->workspaceID() == wkspc->workspaceID()) + changeWorkspaceID(current_workspace->workspaceID() - 1); wkspc->removeAll(); - workspacemenu->remove(wkspc->getWorkspaceID()+2); // + 2 is where workspaces starts + workspacemenu->remove(wkspc->workspaceID()+2); // + 2 is where workspaces starts workspacemenu->update(); //remove last workspace@@ -766,12 +766,12 @@ void BScreen::changeWorkspaceID(unsigned int id) {
if (! current_workspace || id >= workspacesList.size()) return; - if (id != current_workspace->getWorkspaceID()) { + if (id != current_workspace->workspaceID()) { XSync(fluxbox->getXDisplay(), true); current_workspace->hideAll(); - workspacemenu->setItemSelected(current_workspace->getWorkspaceID() + 2, false); + workspacemenu->setItemSelected(current_workspace->workspaceID() + 2, false); if (fluxbox->getFocusedWindow() && fluxbox->getFocusedWindow()->getScreen() == this &&@@ -784,7 +784,7 @@ }
current_workspace = getWorkspace(id); - workspacemenu->setItemSelected(current_workspace->getWorkspaceID() + 2, true); + workspacemenu->setItemSelected(current_workspace->workspaceID() + 2, true); toolbar->redrawWorkspaceLabel(true); current_workspace->showAll();@@ -803,7 +803,7 @@ FluxboxWindow *win;
if (! current_workspace || id >= workspacesList.size()) return; - if (id != current_workspace->getWorkspaceID()) { + if (id != current_workspace->workspaceID()) { XSync(fluxbox->getXDisplay(), True); win = fluxbox->getFocusedWindow();@@ -840,12 +840,12 @@ Workspaces::iterator it_end = workspacesList.end();
for (; it != it_end; ++it) { for (int i = 0; i < (*it)->getCount(); ++i) { n->sendWindowAdd((*it)->getWindow(i)->getClientWindow(), - (*it)->getWorkspaceID()); + (*it)->workspaceID()); } } Window f = ((fluxbox->getFocusedWindow()) ? - fluxbox->getFocusedWindow()->getClientWindow() : None); + fluxbox->getFocusedWindow()->getClientWindow() : None); n->sendWindowFocus(f); }@@ -990,7 +990,7 @@
Workspaces::iterator wit = workspacesList.begin(); Workspaces::iterator wit_end = workspacesList.end(); for (; wit != wit_end; ++wit) { - session_stack[i++] = (*wit)->getMenu()->windowID(); + session_stack[i++] = (*wit)->menu()->windowID(); } session_stack[i++] = workspacemenu->windowID();@@ -1074,7 +1074,7 @@ void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id, bool ignore_sticky) {
if (! w) return; if (wkspc_id >= workspaceNames.size()) - wkspc_id = current_workspace->getWorkspaceID(); + wkspc_id = current_workspace->workspaceID(); if (w->getWorkspaceNumber() == wkspc_id) return;
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.hh,v 1.28 2002/04/09 12:13:44 fluxgen Exp $ +// $Id: Screen.hh,v 1.29 2002/04/09 23:20:40 fluxgen Exp $ #ifndef SCREEN_HH #define SCREEN_HH@@ -121,7 +121,7 @@ inline const unsigned int getBevelWidth(void) const { return theme->getBevelWidth(); }
inline const unsigned int getFrameWidth(void) const { return theme->getFrameWidth(); } inline const unsigned int getBorderWidth(void) const { return theme->getBorderWidth(); } inline const unsigned int getBorderWidth2x(void) const { return theme->getBorderWidth()*2; } - inline const unsigned int getCurrentWorkspaceID() const { return current_workspace->getWorkspaceID(); } + inline const unsigned int getCurrentWorkspaceID() const { return current_workspace->workspaceID(); } typedef std::vector<FluxboxWindow *> Icons; inline const unsigned int getCount(void) const { return workspacesList.size(); }
@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Tab.cc,v 1.22 2002/04/03 23:01:04 fluxgen Exp $ +// $Id: Tab.cc,v 1.23 2002/04/09 23:15:36 fluxgen Exp $ #include "Tab.hh"@@ -286,7 +286,7 @@ win->blackbox_attrib.attrib ^= BaseDisplay::ATTRIB_OMNIPRESENT;
win->stuck = false; if (!win->isIconic()) { BScreen *screen = win->getScreen(); - screen->reassociateWindow(win, screen->getCurrentWorkspace()->getWorkspaceID(), true); + screen->reassociateWindow(win, screen->getCurrentWorkspace()->workspaceID(), true); } } else {
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.cc,v 1.41 2002/04/08 22:32:07 fluxgen Exp $ +// $Id: Window.cc,v 1.42 2002/04/09 23:17:11 fluxgen Exp $ #include "Window.hh"@@ -1952,8 +1952,8 @@
void FluxboxWindow::deiconify(bool reassoc, bool raise) { if (iconic || reassoc) { - screen->reassociateWindow(this, screen->getCurrentWorkspace()->getWorkspaceID(), false); - } else if (workspace_number != screen->getCurrentWorkspace()->getWorkspaceID()) + screen->reassociateWindow(this, screen->getCurrentWorkspace()->workspaceID(), false); + } else if (workspace_number != screen->getCurrentWorkspace()->workspaceID()) return; setState(NormalState);@@ -2376,7 +2376,7 @@
stuck = false; if (! iconic) - screen->reassociateWindow(this, screen->getCurrentWorkspace()->getWorkspaceID(), true); + screen->reassociateWindow(this, screen->getCurrentWorkspace()->workspaceID(), true); } else {
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.48 2002/04/09 12:09:03 cout Exp $ +// $Id: fluxbox.cc,v 1.49 2002/04/09 23:14:25 fluxgen Exp $ //Use some GNU extensions #ifndef _GNU_SOURCE@@ -610,9 +610,8 @@ }
if (iskdedockapp) { XSelectInput(getXDisplay(), e->xmaprequest.window, StructureNotifyMask); - std::list<BScreen *>::iterator it = screenList.begin(); - std::list<BScreen *>::iterator it_end = screenList.end(); - for (; (*it) == screenList->last(); ++it) { + std::list<BScreen *>::iterator it = screenList.begin(); + for (; (*it) == screenList.back(); ++it) { (*it)->getSlit()->addClient(e->xmaprequest.window); } return;@@ -1850,8 +1849,8 @@ sprintf(rc_string, "session.screen%d.workspaceNames: ", screen_number);
string workspaces_string(rc_string); for (unsigned int workspace=0; workspace < screen->getCount(); workspace++) { - if (screen->getWorkspace(workspace)->getName()!=0) - workspaces_string.append(screen->getWorkspace(workspace)->getName()); + if (screen->getWorkspace(workspace)->name().size()!=0) + workspaces_string.append(screen->getWorkspace(workspace)->name()); else workspaces_string.append("Null"); workspaces_string.append(",");@@ -2402,7 +2401,7 @@ old_tbar = old_screen->getToolbar();
old_wkspc = old_screen->getWorkspace(old_win->getWorkspaceNumber()); old_win->setFocusFlag(False); - old_wkspc->getMenu()->setItemSelected(old_win->getWindowNumber(), False); + old_wkspc->menu()->setItemSelected(old_win->getWindowNumber(), false); }@@ -2413,7 +2412,7 @@ tbar = screen->getToolbar();
wkspc = screen->getWorkspace(win->getWorkspaceNumber()); focused_window = win; win->setFocusFlag(True); - wkspc->getMenu()->setItemSelected(win->getWindowNumber(), True); + wkspc->menu()->setItemSelected(win->getWindowNumber(), true); } else focused_window = (FluxboxWindow *) 0;