_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:
@@ -249,7 +249,7 @@ private:
|
|||||||
uint32& trigger,
|
uint32& trigger,
|
||||||
BPrivate::TriggerList& triggers);
|
BPrivate::TriggerList& triggers);
|
||||||
void _UpdateWindowViewSize(const bool &updatePosition);
|
void _UpdateWindowViewSize(const bool &updatePosition);
|
||||||
bool _AddDynamicItems();
|
bool _AddDynamicItems(bool keyDown = false);
|
||||||
bool _OkToProceed(BMenuItem* item,
|
bool _OkToProceed(BMenuItem* item,
|
||||||
bool keyDown = false);
|
bool keyDown = false);
|
||||||
|
|
||||||
@@ -282,10 +282,7 @@ private:
|
|||||||
|
|
||||||
LayoutData* fLayoutData;
|
LayoutData* fLayoutData;
|
||||||
|
|
||||||
bool fDynamicItemsAdded;
|
int32 _reserved;
|
||||||
bool _reserved1;
|
|
||||||
bool _reserved2;
|
|
||||||
bool _reserved3;
|
|
||||||
|
|
||||||
char fTrigger;
|
char fTrigger;
|
||||||
bool fResizeToFit;
|
bool fResizeToFit;
|
||||||
|
|||||||
@@ -210,7 +210,6 @@ BMenu::BMenu(const char* name, menu_layout layout)
|
|||||||
fMaxContentWidth(0.0f),
|
fMaxContentWidth(0.0f),
|
||||||
fInitMatrixSize(NULL),
|
fInitMatrixSize(NULL),
|
||||||
fExtraMenuData(NULL),
|
fExtraMenuData(NULL),
|
||||||
fDynamicItemsAdded(false),
|
|
||||||
fTrigger(0),
|
fTrigger(0),
|
||||||
fResizeToFit(true),
|
fResizeToFit(true),
|
||||||
fUseCachedMenuLayout(false),
|
fUseCachedMenuLayout(false),
|
||||||
@@ -245,7 +244,6 @@ BMenu::BMenu(const char* name, float width, float height)
|
|||||||
fMaxContentWidth(0.0f),
|
fMaxContentWidth(0.0f),
|
||||||
fInitMatrixSize(NULL),
|
fInitMatrixSize(NULL),
|
||||||
fExtraMenuData(NULL),
|
fExtraMenuData(NULL),
|
||||||
fDynamicItemsAdded(false),
|
|
||||||
fTrigger(0),
|
fTrigger(0),
|
||||||
fResizeToFit(true),
|
fResizeToFit(true),
|
||||||
fUseCachedMenuLayout(false),
|
fUseCachedMenuLayout(false),
|
||||||
@@ -281,7 +279,6 @@ BMenu::BMenu(BMessage* archive)
|
|||||||
fMaxContentWidth(0.0f),
|
fMaxContentWidth(0.0f),
|
||||||
fInitMatrixSize(NULL),
|
fInitMatrixSize(NULL),
|
||||||
fExtraMenuData(NULL),
|
fExtraMenuData(NULL),
|
||||||
fDynamicItemsAdded(false),
|
|
||||||
fTrigger(0),
|
fTrigger(0),
|
||||||
fResizeToFit(true),
|
fResizeToFit(true),
|
||||||
fUseCachedMenuLayout(false),
|
fUseCachedMenuLayout(false),
|
||||||
@@ -1244,7 +1241,6 @@ BMenu::BMenu(BRect frame, const char* name, uint32 resizingMode, uint32 flags,
|
|||||||
fMaxContentWidth(0.0f),
|
fMaxContentWidth(0.0f),
|
||||||
fInitMatrixSize(NULL),
|
fInitMatrixSize(NULL),
|
||||||
fExtraMenuData(NULL),
|
fExtraMenuData(NULL),
|
||||||
fDynamicItemsAdded(false),
|
|
||||||
fTrigger(0),
|
fTrigger(0),
|
||||||
fResizeToFit(resizeToFit),
|
fResizeToFit(resizeToFit),
|
||||||
fUseCachedMenuLayout(false),
|
fUseCachedMenuLayout(false),
|
||||||
@@ -1472,7 +1468,7 @@ BMenu::_Show(bool selectFirstItem, bool keyDown)
|
|||||||
if (window->Lock()) {
|
if (window->Lock()) {
|
||||||
bool attachAborted = false;
|
bool attachAborted = false;
|
||||||
if (keyDown)
|
if (keyDown)
|
||||||
attachAborted = _AddDynamicItems();
|
attachAborted = _AddDynamicItems(keyDown);
|
||||||
|
|
||||||
if (attachAborted) {
|
if (attachAborted) {
|
||||||
if (ourWindow)
|
if (ourWindow)
|
||||||
@@ -2749,7 +2745,7 @@ BMenu::_UpdateWindowViewSize(const bool &move)
|
|||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
BMenu::_AddDynamicItems()
|
BMenu::_AddDynamicItems(bool keyDown)
|
||||||
{
|
{
|
||||||
bool attachAborted = false;
|
bool attachAborted = false;
|
||||||
BMenuItem* superItem = Superitem();
|
BMenuItem* superItem = Superitem();
|
||||||
@@ -2757,7 +2753,7 @@ BMenu::_AddDynamicItems()
|
|||||||
if (AddDynamicItem(B_INITIAL_ADD)) {
|
if (AddDynamicItem(B_INITIAL_ADD)) {
|
||||||
do {
|
do {
|
||||||
if (superMenu != NULL
|
if (superMenu != NULL
|
||||||
&& !superMenu->_OkToProceed(superItem)) {
|
&& !superMenu->_OkToProceed(superItem, keyDown)) {
|
||||||
AddDynamicItem(B_ABORT);
|
AddDynamicItem(B_ABORT);
|
||||||
attachAborted = true;
|
attachAborted = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user