BePDF needed this one to be added as well.

This commit is contained in:
Rene Gollent
2011-12-18 15:54:01 -05:00
parent 466f2b8f99
commit c8df0c9b27
+22 -9
View File
@@ -523,9 +523,9 @@ BMenu::KeyDown(const char* bytes, int32 numBytes)
else { else {
if (fSelected && fSelected->Submenu()) { if (fSelected && fSelected->Submenu()) {
fSelected->Submenu()->_SetStickyMode(true); fSelected->Submenu()->_SetStickyMode(true);
// fix me: this shouldn't be needed but dynamic menus // fix me: this shouldn't be needed but dynamic menus
// aren't getting it set correctly when keyboard // aren't getting it set correctly when keyboard
// navigating, which aborts the attach // navigating, which aborts the attach
fState = MENU_STATE_KEY_TO_SUBMENU; fState = MENU_STATE_KEY_TO_SUBMENU;
_SelectItem(fSelected, true, true, true); _SelectItem(fSelected, true, true, true);
} else if (dynamic_cast<BMenuBar*>(Supermenu())) { } else if (dynamic_cast<BMenuBar*>(Supermenu())) {
@@ -1508,8 +1508,8 @@ BMenu::_Show(bool selectFirstItem, bool keyDown)
if (window->Lock()) { if (window->Lock()) {
bool addAborted = false; bool addAborted = false;
if (keyDown) if (keyDown)
addAborted = _AddDynamicItems(keyDown); addAborted = _AddDynamicItems(keyDown);
if (addAborted) { if (addAborted) {
if (ourWindow) if (ourWindow)
window->Quit(); window->Quit();
@@ -1518,7 +1518,7 @@ BMenu::_Show(bool selectFirstItem, bool keyDown)
return false; return false;
} }
fAttachAborted = false; fAttachAborted = false;
window->AttachMenu(this); window->AttachMenu(this);
if (ItemAt(0) != NULL) { if (ItemAt(0) != NULL) {
@@ -1739,7 +1739,7 @@ BMenu::_Track(int* action, long start)
if (action != NULL) if (action != NULL)
*action = fState; *action = fState;
// keyboard Enter will set this // keyboard Enter will set this
if (fChosenItem != NULL) if (fChosenItem != NULL)
item = fChosenItem; item = fChosenItem;
@@ -1751,7 +1751,7 @@ BMenu::_Track(int* action, long start)
_SelectItem(NULL); _SelectItem(NULL);
UnlockLooper(); UnlockLooper();
} }
// delete the menu window recycled for all the child menus // delete the menu window recycled for all the child menus
_DeleteMenuWindow(); _DeleteMenuWindow();
@@ -2882,7 +2882,7 @@ BMenu::_AddDynamicItems(bool keyDown)
} }
} while (AddDynamicItem(B_PROCESSING)); } while (AddDynamicItem(B_PROCESSING));
} }
return addAborted; return addAborted;
} }
@@ -2981,3 +2981,16 @@ get_menu_info(menu_info* info)
return status; return status;
} }
#if __GNUC__ == 2
extern "C" void
InvalidateLayout__5BMenub(BMenu* menu)
{
menu->InvalidateLayout();
}
#endif