some more work on menus... fixed bug #953 and some more stuff

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19827 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2007-01-16 14:43:01 +00:00
parent 0013964388
commit ebd1a3a130
3 changed files with 32 additions and 17 deletions
+12 -4
View File
@@ -1321,9 +1321,11 @@ BMenu::_track(int *action, bigtime_t trackTime, long start)
}
if (fSuper != NULL) {
// Give supermenu the chance to continue tracking
*action = fState;
if (locked)
UnlockLooper();
UnlockLooper();
return NULL;
}
}
@@ -1349,7 +1351,7 @@ BMenu::_track(int *action, bigtime_t trackTime, long start)
if (IsStickyMode())
SetStickyMode(false);
// delete the menu window recycled for all the child menus
DeleteMenuWindow();
@@ -1770,7 +1772,13 @@ BMenu::DrawItems(BRect updateRect)
int
BMenu::State(BMenuItem **item) const
{
return 0;
if (fState == MENU_STATE_TRACKING || fState == MENU_STATE_CLOSED)
return fState;
if (fSelected != NULL && fSelected->Submenu() != NULL)
return fSelected->Submenu()->State(item);
return fState;
}
@@ -1933,7 +1941,7 @@ BMenu::_SelectItem(BMenuItem* menuItem, bool showSubmenu, bool selectFirstItem)
fSelected->Select(false);
BMenu *subMenu = fSelected->Submenu();
if (subMenu != NULL && subMenu->Window() != NULL)
subMenu->_hide();
subMenu->_hide();
}
fSelected = menuItem;