icc complaint about a "possible" conflict between the

FbTk::Menu::update(Subject*) and FbTk::Menu::update(int index)

to avoid this, we rename FbTk::Menu::update(int index) 
    -> FbTk::Menu::updateMenu(int index)

this is mostly cosmetic, but if it makes the life of a compiler happy, well ..
be happy icc :)
This commit is contained in:
mathias 2004-12-13 14:03:17 +00:00
parent 7c7dfbfbdd
commit eb42a7806d
19 changed files with 45 additions and 41 deletions

View file

@ -69,7 +69,7 @@ public:
inline Alignment alignment() const { return m_align; }
inline int size() const { return m_item_list.size(); }
inline bool empty() const { return m_item_list.empty(); }
inline const Item selected() const { return m_selected; }
inline const Item& selected() const { return m_selected; }
inline Item selected() { return m_selected; }
unsigned int maxWidthPerClient() const;
inline unsigned int maxHeightPerClient() const { return (empty() ? height() : height()/size()); }

View file

@ -39,8 +39,8 @@ FbMenu::~FbMenu() {
}
void FbMenu::update(int index) {
FbTk::Menu::update(index);
void FbMenu::updateMenu(int index) {
FbTk::Menu::updateMenu(index);
m_shape->update();
}

View file

@ -36,7 +36,7 @@ public:
FbMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl,
FbTk::XLayer &layer);
virtual ~FbMenu();
void update(int index = -1);
void updateMenu(int index = -1);
void clearWindow();
void raise() { m_layeritem.raise(); }
void lower() { m_layeritem.lower(); }

View file

@ -398,7 +398,7 @@ void Menu::enableTitle() {
setTitleVisibility(true);
}
void Menu::update(int active_index) {
void Menu::updateMenu(int active_index) {
if (title_vis) {
menu.item_w = theme().titleFont().textWidth(menu.label.c_str(),
menu.label.size());
@ -626,7 +626,7 @@ void Menu::update(int active_index) {
void Menu::show() {
if (m_need_update)
update();
updateMenu();
menu.window.showSubwindows();
menu.window.show();
@ -677,7 +677,7 @@ void Menu::clearWindow() {
if (alpha() < 255) {
renderTransp(0, 0,
menu.frame.width(), menu.frame.height());
update();
updateMenu();
}
menu.title.clear();
@ -1368,7 +1368,7 @@ void Menu::keyPressEvent(XKeyEvent &event) {
menuitems[which_press]->click(1, event.time);
itemSelected(1, which_press);
m_need_update = true;
update();
updateMenu();
}
break;
default:
@ -1413,7 +1413,7 @@ void Menu::reconfigure() {
menu.title.setBorderWidth(theme().borderWidth());
update();
updateMenu();
}

View file

@ -117,7 +117,7 @@ public:
void setLabel(const char *labelstr);
/// move menu to x,y
void move(int x, int y);
virtual void update(int active_index = -1);
virtual void updateMenu(int active_index = -1);
void setItemSelected(unsigned int index, bool val);
void setItemEnabled(unsigned int index, bool val);
inline void setMinimumSublevels(int m) { menu.minsub = m; }

View file

@ -135,6 +135,9 @@ public:
bool verbose() const { return m_verbose; }
void setVerbose(bool value) { m_verbose = value; }
// dump theme out to filename, stdout if no filename is given
void dump(Theme& theme, const char* filename = 0) const;
// void listItems();
private:
ThemeManager();

View file

@ -86,6 +86,7 @@ public:
break;
case IconbarTool::CURRENT:
m_win.screen().sendToWorkspace(m_win.screen().currentWorkspaceID(), &m_win);
m_win.raiseAndFocus();
break;
case IconbarTool::FOLLOW:
default:

View file

@ -40,7 +40,7 @@ static void updateItems(FbTk::Menu &menu, BScreen &screen) {
for (; client_it != client_it_end; ++client_it)
menu.insert(new IconMenuItem(**client_it));
}
menu.update();
menu.updateMenu();
}
IconMenu::IconMenu(BScreen &screen):

View file

@ -277,7 +277,7 @@ void setupModeMenu(FbTk::Menu &menu, IconbarTool &handler) {
menu.insert(new FbTk::MenuSeparator());
menu.update();
menu.updateMenu();
}
inline bool checkAddWindow(IconbarTool::Mode mode, const FluxboxWindow &win) {
@ -367,7 +367,7 @@ IconbarTool::IconbarTool(const FbTk::FbWindow &parent, IconbarTheme &theme, BScr
RefCount<Command> s_and_reconfig(save_and_reconfig);
m_menu.insert(new BoolMenuItem(_FBTEXT(Toolbar, ShowIcons, "Show Pictures", "chooses if little icons are shown next to title in the iconbar") ,
*m_rc_use_pixmap, s_and_reconfig));
m_menu.update();
m_menu.updateMenu();
// must be internal menu, otherwise toolbar main menu tries to delete it.
m_menu.setInternalMenu();

View file

@ -109,7 +109,7 @@ LayerMenu<ItemType>::LayerMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl,
m_object, layer_menuitems[i].layernum));
}
}
update();
updateMenu();
}
#endif // LAYERMENU_HH

View file

@ -89,7 +89,7 @@ static void createStyleMenu(FbTk::Menu &parent, const std::string &label,
parent.insert(new StyleMenuItem(filelist[file_index], style));
}
// update menu graphics
parent.update();
parent.updateMenu();
Fluxbox::instance()->saveMenuFilename(stylesdir.c_str());
}
@ -124,7 +124,7 @@ static void createRootCmdMenu(FbTk::Menu &parent, const string &label,
parent.insert(new RootCmdMenuItem(filelist[file_index], rootcmd, cmd));
}
// update menu graphics
parent.update();
parent.updateMenu();
Fluxbox::instance()->saveMenuFilename(rootcmddir.c_str());
}
@ -270,7 +270,7 @@ static void translateMenuItem(Parser &parse, ParseItem &pitem) {
submenu->setLabel(str_label.c_str());
parseMenu(parse, *submenu);
submenu->update();
submenu->updateMenu();
menu.insert(str_label.c_str(), submenu);
// save to screen list so we can delete it later
BScreen *screen = Fluxbox::instance()->findScreen(screen_number);
@ -339,7 +339,7 @@ static void parseWindowMenu(Parser &parse, FbTk::Menu &menu, FluxboxWindow &win)
} else if (pitem.key() == "submenu") {
FbTk::Menu *submenu = MenuCreator::createMenu(pitem.label(), menu.screenNumber());
parseWindowMenu(parse, *submenu, win);
submenu->update();
submenu->updateMenu();
menu.insert(pitem.label().c_str(), submenu);
} else { // try non window menu specific stuff

View file

@ -123,7 +123,7 @@ FbTk::Menu *createRememberMenu(Remember &remember, FluxboxWindow &win, bool enab
FbTk::MenuItem *item = new FbTk::MenuItem("unavailable");
item->setEnabled(false);
menu->insert(item);
menu->update();
menu->updateMenu();
return menu;
}
@ -147,7 +147,7 @@ FbTk::Menu *createRememberMenu(Remember &remember, FluxboxWindow &win, bool enab
menu->insert(new RememberMenuItem(_FBTEXT(Remember, SaveOnClose, "Save on close", "Save remembered attributes on close"),
remember, win, Remember::REM_SAVEONCLOSE));
menu->update();
menu->updateMenu();
return menu;
};

View file

@ -1704,7 +1704,7 @@ void BScreen::initMenu() {
exit_fb);
}
m_rootmenu->update();
m_rootmenu->updateMenu();
}
@ -1765,7 +1765,7 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
*resource.auto_raise,
save_and_reconfigure));
focus_menu->update();
focus_menu->updateMenu();
menu.insert(focusmenu_label, focus_menu);
#ifdef SLIT
@ -1845,14 +1845,14 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
menu_alpha_item->setCommand(saverc_cmd);
alpha_menu->insert(menu_alpha_item);
alpha_menu->update();
alpha_menu->updateMenu();
menu.insert(alphamenu_label, alpha_menu);
}
#endif // HAVE_XRENDER
#undef _BOOLITEM
// finaly update menu
menu.update();
menu.updateMenu();
}

View file

@ -61,7 +61,7 @@ SendToMenu::SendToMenu(FluxboxWindow &win):
disableTitle();
// build menu
update(0);
updateMenu(0);
}
void SendToMenu::update(FbTk::Subject *subj) {
@ -75,7 +75,7 @@ void SendToMenu::update(FbTk::Subject *subj) {
setItemEnabled(i, true);
// disable send to on the workspace which the window exist
setItemEnabled(m_win.workspaceNumber(), false);
FbMenu::update();
updateMenu();
// we're done
return;
} else if (subj == &(theme().reconfigSig())) {
@ -98,5 +98,5 @@ void SendToMenu::update(FbTk::Subject *subj) {
setItemEnabled(m_win.workspaceNumber(), false);
FbMenu::update();
updateMenu();
}

View file

@ -1174,7 +1174,7 @@ void Slit::updateClientmenu() {
"Save SlitList", "Saves the current order in the slit"),
savecmd);
m_clientlist_menu.update();
m_clientlist_menu.updateMenu();
}
void Slit::saveClientList() {
@ -1271,7 +1271,7 @@ void Slit::setupMenu() {
*this,
save_and_reconfigure));
m_slitmenu.insert(_FBTEXT(Slit, ClientsMenu, "Clients", "Slit client menu"), &m_clientlist_menu);
m_slitmenu.update();
m_slitmenu.updateMenu();
// setup sub menu
m_placement_menu.setLabel(_FBTEXT(Slit, Placement, "Slit Placement", "Slit Placement"));
@ -1313,7 +1313,7 @@ void Slit::setupMenu() {
}
// finaly update sub menu
m_placement_menu.update();
m_placement_menu.updateMenu();
}
void Slit::moveToLayer(int layernum) {

View file

@ -882,7 +882,7 @@ void Toolbar::setupMenus() {
place_menu.pop_front();
}
menu().insert(_FBTEXT(Menu, Placement, "Placement", "Title of Placement menu"), &placementMenu());
placementMenu().update();
placementMenu().updateMenu();
// this saves resources and clears the slit window to update alpha value
@ -899,7 +899,7 @@ void Toolbar::setupMenus() {
alpha_menuitem->setCommand(set_alpha_cmd);
menu().insert(alpha_menuitem);
menu().update();
menu().updateMenu();
}
void Toolbar::saveOnHead(int head) {

View file

@ -353,7 +353,7 @@ bool Workspace::loadGroups(const std::string &filename) {
}
void Workspace::update(FbTk::Subject *subj) {
menu().update();
menu().updateMenu();
}
@ -373,7 +373,7 @@ void Workspace::setName(const std::string &name) {
screen().updateWorkspaceNamesAtom();
menu().setLabel(m_name.c_str());
menu().update();
menu().updateMenu();
}
/**
@ -407,7 +407,7 @@ void Workspace::updateClientmenu() {
menu().insert(new ClientMenuItem(*(*client_it)));
}
menu().update();
menu().updateMenu();
}
void Workspace::placeWindow(FluxboxWindow &win) {

View file

@ -61,12 +61,12 @@ void WorkspaceMenu::update(FbTk::Subject *subj) {
item = find(i);
if (item && item->isSelected()) {
setItemSelected(i, false);
FbTk::Menu::update(i);
updateMenu(i);
break;
}
}
setItemSelected(screen.currentWorkspace()->workspaceID() + 2, true);
FbTk::Menu::update(screen.currentWorkspace()->workspaceID() + 2);
updateMenu(screen.currentWorkspace()->workspaceID() + 2);
} else if (subj == &screen.workspaceCountSig() ||
subj == &screen.workspaceNamesSig()) {
while (numberOfItems() > 2) {
@ -88,7 +88,7 @@ void WorkspaceMenu::update(FbTk::Subject *subj) {
insert(_FBTEXT(Menu, Icons, "Icons", "Iconic windows menu title"),
MenuCreator::createMenuType("iconmenu", screen.screenNumber()));
FbTk::Menu::update(-1);
updateMenu(-1);
}
} else {
FbTk::Menu::update(subj);
@ -126,5 +126,5 @@ void WorkspaceMenu::init(BScreen &screen) {
insert(_FBTEXT(Menu, Icons, "Icons", "Iconic windows menu title"),
MenuCreator::createMenuType("iconmenu", screen.screenNumber()));
FbMenu::update();
updateMenu();
}

View file

@ -99,7 +99,7 @@ XineramaHeadMenu<ItemType>::XineramaHeadMenu(MenuTheme &tm, BScreen &screen, FbT
// TODO: nls
insert(new XineramaHeadMenuItem<ItemType>(
"All Heads", m_object, 0, saverc_cmd));
update();
updateMenu();
}
#endif // XINERAMA_HH