From eb42a7806d0af854cc4bdfa8f194a0bb67446153 Mon Sep 17 00:00:00 2001 From: mathias Date: Mon, 13 Dec 2004 14:03:17 +0000 Subject: 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 :) --- src/Container.hh | 2 +- src/FbMenu.cc | 4 ++-- src/FbMenu.hh | 2 +- src/FbTk/Menu.cc | 12 ++++++------ src/FbTk/Menu.hh | 2 +- src/FbTk/Theme.hh | 3 +++ src/IconButton.cc | 1 + src/IconMenu.cc | 2 +- src/IconbarTool.cc | 4 ++-- src/LayerMenu.hh | 2 +- src/MenuCreator.cc | 8 ++++---- src/Remember.cc | 4 ++-- src/Screen.cc | 8 ++++---- src/SendToMenu.cc | 6 +++--- src/Slit.cc | 6 +++--- src/Toolbar.cc | 4 ++-- src/Workspace.cc | 6 +++--- src/WorkspaceMenu.cc | 8 ++++---- src/Xinerama.hh | 2 +- 19 files changed, 45 insertions(+), 41 deletions(-) diff --git a/src/Container.hh b/src/Container.hh index 3b05385..d6c34ed 100644 --- a/src/Container.hh +++ b/src/Container.hh @@ -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()); } diff --git a/src/FbMenu.cc b/src/FbMenu.cc index e1e3c7b..5105bc9 100644 --- a/src/FbMenu.cc +++ b/src/FbMenu.cc @@ -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(); } diff --git a/src/FbMenu.hh b/src/FbMenu.hh index ec1b401..66cb462 100644 --- a/src/FbMenu.hh +++ b/src/FbMenu.hh @@ -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(); } diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 2460951..7cf076b 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc @@ -398,13 +398,13 @@ 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()); menu.item_w += (theme().bevelWidth() * 2); - } else + } else menu.item_w = 1; unsigned int ii = 0; @@ -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(); } diff --git a/src/FbTk/Menu.hh b/src/FbTk/Menu.hh index 04b440c..423b80a 100644 --- a/src/FbTk/Menu.hh +++ b/src/FbTk/Menu.hh @@ -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; } diff --git a/src/FbTk/Theme.hh b/src/FbTk/Theme.hh index 7b83122..338c24b 100644 --- a/src/FbTk/Theme.hh +++ b/src/FbTk/Theme.hh @@ -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(); diff --git a/src/IconButton.cc b/src/IconButton.cc index 459b4be..24bdddf 100644 --- a/src/IconButton.cc +++ b/src/IconButton.cc @@ -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: diff --git a/src/IconMenu.cc b/src/IconMenu.cc index bc88114..8816e67 100644 --- a/src/IconMenu.cc +++ b/src/IconMenu.cc @@ -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): diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc index 31f1b34..4ea3d1b 100644 --- a/src/IconbarTool.cc +++ b/src/IconbarTool.cc @@ -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 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(); diff --git a/src/LayerMenu.hh b/src/LayerMenu.hh index bfb60e6..af7f8f7 100644 --- a/src/LayerMenu.hh +++ b/src/LayerMenu.hh @@ -109,7 +109,7 @@ LayerMenu::LayerMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl, m_object, layer_menuitems[i].layernum)); } } - update(); + updateMenu(); } #endif // LAYERMENU_HH diff --git a/src/MenuCreator.cc b/src/MenuCreator.cc index 829a8a4..ca36eef 100644 --- a/src/MenuCreator.cc +++ b/src/MenuCreator.cc @@ -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 diff --git a/src/Remember.cc b/src/Remember.cc index 9a23082..e74ace2 100644 --- a/src/Remember.cc +++ b/src/Remember.cc @@ -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; }; diff --git a/src/Screen.cc b/src/Screen.cc index f125f7f..9c0493b 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -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(); } diff --git a/src/SendToMenu.cc b/src/SendToMenu.cc index c071495..2bdf7e3 100644 --- a/src/SendToMenu.cc +++ b/src/SendToMenu.cc @@ -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(); } diff --git a/src/Slit.cc b/src/Slit.cc index b89e428..566b76d 100644 --- a/src/Slit.cc +++ b/src/Slit.cc @@ -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) { diff --git a/src/Toolbar.cc b/src/Toolbar.cc index a5ddd12..b2566b3 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc @@ -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) { diff --git a/src/Workspace.cc b/src/Workspace.cc index 4de6a37..e0bf51d 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc @@ -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) { diff --git a/src/WorkspaceMenu.cc b/src/WorkspaceMenu.cc index 6403319..31b80a3 100644 --- a/src/WorkspaceMenu.cc +++ b/src/WorkspaceMenu.cc @@ -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(); } diff --git a/src/Xinerama.hh b/src/Xinerama.hh index 545555d..6c2b521 100644 --- a/src/Xinerama.hh +++ b/src/Xinerama.hh @@ -99,7 +99,7 @@ XineramaHeadMenu::XineramaHeadMenu(MenuTheme &tm, BScreen &screen, FbT // TODO: nls insert(new XineramaHeadMenuItem( "All Heads", m_object, 0, saverc_cmd)); - update(); + updateMenu(); } #endif // XINERAMA_HH -- cgit v0.11.2