From 63475f77965c0dce84a4130b90573aeb9c0a3692 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Mon, 4 Jul 2005 18:19:53 +0000 Subject: cleaning, change getCount to numberOfWorkspaces --- src/Ewmh.cc | 28 ++++++++++++++-------------- src/FbCommands.cc | 10 +++++----- src/Gnome.cc | 6 +++--- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/Ewmh.cc b/src/Ewmh.cc index 7996828..052629d 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc @@ -288,8 +288,8 @@ void Ewmh::updateClientList(BScreen &screen) { } // and count icons - BScreen::Icons::const_iterator icon_it = screen.getIconList().begin(); - BScreen::Icons::const_iterator icon_it_end = screen.getIconList().end(); + BScreen::Icons::const_iterator icon_it = screen.iconList().begin(); + BScreen::Icons::const_iterator icon_it_end = screen.iconList().end(); for (; icon_it != icon_it_end; ++icon_it) { num += (*icon_it)->numClients(); } @@ -327,7 +327,7 @@ void Ewmh::updateClientList(BScreen &screen) { } // plus iconified windows - icon_it = screen.getIconList().begin(); + icon_it = screen.iconList().begin(); for (; icon_it != icon_it_end; ++icon_it) { FluxboxWindow::ClientList::iterator client_it = (*icon_it)->clientList().begin(); FluxboxWindow::ClientList::iterator client_it_end = (*icon_it)->clientList().end(); @@ -437,7 +437,7 @@ void Ewmh::updateWorkspaceCount(BScreen &screen) { * Window Manager to indicate the number of virtual * desktops. */ - unsigned long numworkspaces = screen.getCount(); + unsigned long numworkspaces = screen.numberOfWorkspaces(); screen.rootWindow().changeProperty(m_net_number_of_desktops, XA_CARDINAL, 32, PropModeReplace, @@ -502,8 +502,8 @@ void Ewmh::updateWorkarea(BScreen &screen) { * Not sure how to handle xinerama stuff here. * So i'm just doing this on the first head. */ - unsigned long *coords = new unsigned long[4*screen.getCount()]; - for (unsigned int i=0; iscreen(); // valid workspace number? - if (static_cast(ce.data.l[0]) < screen->getCount()) + if (static_cast(ce.data.l[0]) < screen->numberOfWorkspaces()) screen->sendToWorkspace(ce.data.l[0], fbwin, false); return true; @@ -668,20 +668,20 @@ bool Ewmh::checkClientMessage(const XClientMessageEvent &ce, // no need to alter number of desktops if they are the same // or if requested number of workspace is less than zero - if (screen->getCount() == static_cast(ce.data.l[0]) || + if (screen->numberOfWorkspaces() == static_cast(ce.data.l[0]) || ce.data.l[0] < 0) return true; - if (screen->getCount() > static_cast(ce.data.l[0])) { + if (screen->numberOfWorkspaces() > static_cast(ce.data.l[0])) { // remove last workspace until we have // the same number of workspaces - while (screen->getCount() != static_cast(ce.data.l[0])) { + while (screen->numberOfWorkspaces() != static_cast(ce.data.l[0])) { screen->removeLastWorkspace(); - if (screen->getCount() == 1) // must have at least one workspace + if (screen->numberOfWorkspaces() == 1) // must have at least one workspace break; } } else { // add workspaces to screen until workspace count match the requested size - while (screen->getCount() != static_cast(ce.data.l[0])) { + while (screen->numberOfWorkspaces() != static_cast(ce.data.l[0])) { screen->addWorkspace(); } } @@ -693,7 +693,7 @@ bool Ewmh::checkClientMessage(const XClientMessageEvent &ce, // ce.data.l[0] = workspace number // prevent out of range value - if (static_cast(ce.data.l[0]) >= screen->getCount()) + if (static_cast(ce.data.l[0]) >= screen->numberOfWorkspaces()) return true; screen->changeWorkspaceID(ce.data.l[0]); return true; diff --git a/src/FbCommands.cc b/src/FbCommands.cc index fc3f321..cdecc2b 100644 --- a/src/FbCommands.cc +++ b/src/FbCommands.cc @@ -61,7 +61,7 @@ namespace { void showMenu(const BScreen &screen, FbTk::Menu &menu) { // special case for root menu - if (&menu == &screen.getRootmenu()) { + if (&menu == &screen.rootMenu()) { Fluxbox* fb = Fluxbox::instance(); if(fb->menuTimestampsChanged()) { // we dont show the menu here because fluxbox @@ -221,7 +221,7 @@ void ShowRootMenuCmd::execute() { if (screen == 0) return; - ::showMenu(*screen, screen->getRootmenu()); + ::showMenu(*screen, screen->rootMenu()); } void ShowWorkspaceMenuCmd::execute() { @@ -229,7 +229,7 @@ void ShowWorkspaceMenuCmd::execute() { if (screen == 0) return; - ::showMenu(*screen, screen->getWorkspacemenu()); + ::showMenu(*screen, screen->workspaceMenu()); } @@ -324,8 +324,8 @@ void DeiconifyCmd::execute() { if (screen == 0) return; - BScreen::Icons::reverse_iterator it= screen->getIconList().rbegin(); - BScreen::Icons::reverse_iterator itend= screen->getIconList().rend(); + BScreen::Icons::reverse_iterator it= screen->iconList().rbegin(); + BScreen::Icons::reverse_iterator itend= screen->iconList().rend(); unsigned int workspace_num= screen->currentWorkspaceID(); unsigned int old_workspace_num; diff --git a/src/Gnome.cc b/src/Gnome.cc index 1691c9e..59cbc0a 100644 --- a/src/Gnome.cc +++ b/src/Gnome.cc @@ -234,7 +234,7 @@ void Gnome::updateCurrentWorkspace(BScreen &screen) { } void Gnome::updateWorkspaceCount(BScreen &screen) { - long numworkspaces = screen.getCount(); + long numworkspaces = screen.numberOfWorkspaces(); screen.rootWindow().changeProperty(m_gnome_wm_win_workspace_count, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&numworkspaces, 1); } @@ -302,12 +302,12 @@ bool Gnome::checkClientMessage(const XClientMessageEvent &ce, BScreen * screen, #endif//!DEBUG if ( winclient !=0 && // the message sent to client window? ce.data.l[0] >= 0 && - ce.data.l[0] < (signed)winclient->screen().getCount()) { + ce.data.l[0] < (signed)winclient->screen().numberOfWorkspaces()) { winclient->screen().changeWorkspaceID(ce.data.l[0]); } else if (screen!=0 && //the message sent to root window? ce.data.l[0] >= 0 && - ce.data.l[0] < (signed)screen->getCount()) + ce.data.l[0] < (signed)screen->numberOfWorkspaces()) screen->changeWorkspaceID(ce.data.l[0]); return true; } else if (winclient == 0) -- cgit v0.11.2