fixed bug in ::removeNetizen and changed name from InitMenu to initMenu

This commit is contained in:
fluxgen 2002-03-08 12:18:22 +00:00
parent 6d282002e5
commit 4fc50aed36

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE. // DEALINGS IN THE SOFTWARE.
// $Id: Screen.cc,v 1.33 2002/02/28 15:46:01 fluxgen Exp $ // $Id: Screen.cc,v 1.34 2002/03/08 12:18:22 fluxgen Exp $
// stupid macros needed to access some functions in version 2 of the GNU C // stupid macros needed to access some functions in version 2 of the GNU C
// library // library
@ -409,7 +409,7 @@ resource(rm, screenname, altscreenname)
slit = new Slit(this); slit = new Slit(this);
#endif // SLIT #endif // SLIT
InitMenu(); initMenu();
raiseWindows(0, 0); raiseWindows(0, 0);
rootmenu->update(); rootmenu->update();
@ -615,7 +615,7 @@ void BScreen::reconfigure(void) {
{ {
int remember_sub = rootmenu->getCurrentSubmenu(); int remember_sub = rootmenu->getCurrentSubmenu();
InitMenu(); initMenu();
raiseWindows(0, 0); raiseWindows(0, 0);
rootmenu->reconfigure(); rootmenu->reconfigure();
rootmenu->drawSubmenu(remember_sub); rootmenu->drawSubmenu(remember_sub);
@ -647,7 +647,7 @@ void BScreen::reconfigure(void) {
void BScreen::rereadMenu(void) { void BScreen::rereadMenu(void) {
InitMenu(); initMenu();
raiseWindows(0, 0); raiseWindows(0, 0);
rootmenu->reconfigure(); rootmenu->reconfigure();
@ -877,8 +877,9 @@ void BScreen::removeNetizen(Window w) {
Netizens::iterator it_end = netizenList.end(); Netizens::iterator it_end = netizenList.end();
for (; it != it_end; ++it) { for (; it != it_end; ++it) {
if ((*it)->getWindowID() == w) { if ((*it)->getWindowID() == w) {
Netizen *n = *netizenList.erase(it); Netizen *n = *it;
delete n; delete n;
netizenList.erase(it);
break; break;
} }
} }
@ -1192,7 +1193,7 @@ void BScreen::raiseFocus(void) {
raiseWindow(fluxbox->getFocusedWindow()); raiseWindow(fluxbox->getFocusedWindow());
} }
void BScreen::InitMenu(void) { void BScreen::initMenu(void) {
I18n *i18n = I18n::instance(); I18n *i18n = I18n::instance();
if (rootmenu) { if (rootmenu) {
@ -1294,7 +1295,7 @@ Bool BScreen::parseMenuFile(ifstream &file, Rootmenu *menu, int &row) {
if (getline(file, line)) { if (getline(file, line)) {
row++; row++;
if (line[0] != '#') { if (line[0] != '#') { //the line is commented
int parse_pos = 0, err = 0; int parse_pos = 0, err = 0;