_AddDynamicItems didn't pass the keyDown parameter to _OkToProceed (noticed

by Ziusudra).
Also removed leftover fDynamicItemsAdded.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37314 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2010-06-30 14:49:42 +00:00
parent 79c273aee8
commit 8460e00cc0
2 changed files with 5 additions and 12 deletions

View File

@ -249,7 +249,7 @@ private:
uint32& trigger,
BPrivate::TriggerList& triggers);
void _UpdateWindowViewSize(const bool &updatePosition);
bool _AddDynamicItems();
bool _AddDynamicItems(bool keyDown = false);
bool _OkToProceed(BMenuItem* item,
bool keyDown = false);
@ -282,10 +282,7 @@ private:
LayoutData* fLayoutData;
bool fDynamicItemsAdded;
bool _reserved1;
bool _reserved2;
bool _reserved3;
int32 _reserved;
char fTrigger;
bool fResizeToFit;

View File

@ -210,7 +210,6 @@ BMenu::BMenu(const char* name, menu_layout layout)
fMaxContentWidth(0.0f),
fInitMatrixSize(NULL),
fExtraMenuData(NULL),
fDynamicItemsAdded(false),
fTrigger(0),
fResizeToFit(true),
fUseCachedMenuLayout(false),
@ -245,7 +244,6 @@ BMenu::BMenu(const char* name, float width, float height)
fMaxContentWidth(0.0f),
fInitMatrixSize(NULL),
fExtraMenuData(NULL),
fDynamicItemsAdded(false),
fTrigger(0),
fResizeToFit(true),
fUseCachedMenuLayout(false),
@ -281,7 +279,6 @@ BMenu::BMenu(BMessage* archive)
fMaxContentWidth(0.0f),
fInitMatrixSize(NULL),
fExtraMenuData(NULL),
fDynamicItemsAdded(false),
fTrigger(0),
fResizeToFit(true),
fUseCachedMenuLayout(false),
@ -1244,7 +1241,6 @@ BMenu::BMenu(BRect frame, const char* name, uint32 resizingMode, uint32 flags,
fMaxContentWidth(0.0f),
fInitMatrixSize(NULL),
fExtraMenuData(NULL),
fDynamicItemsAdded(false),
fTrigger(0),
fResizeToFit(resizeToFit),
fUseCachedMenuLayout(false),
@ -1472,7 +1468,7 @@ BMenu::_Show(bool selectFirstItem, bool keyDown)
if (window->Lock()) {
bool attachAborted = false;
if (keyDown)
attachAborted = _AddDynamicItems();
attachAborted = _AddDynamicItems(keyDown);
if (attachAborted) {
if (ourWindow)
@ -2749,7 +2745,7 @@ BMenu::_UpdateWindowViewSize(const bool &move)
bool
BMenu::_AddDynamicItems()
BMenu::_AddDynamicItems(bool keyDown)
{
bool attachAborted = false;
BMenuItem* superItem = Superitem();
@ -2757,7 +2753,7 @@ BMenu::_AddDynamicItems()
if (AddDynamicItem(B_INITIAL_ADD)) {
do {
if (superMenu != NULL
&& !superMenu->_OkToProceed(superItem)) {
&& !superMenu->_OkToProceed(superItem, keyDown)) {
AddDynamicItem(B_ABORT);
attachAborted = true;
break;