[haiku-commits] r37314 - in haiku/trunk: headers/os/interface src/kits/interface

  • From: stefano.ceccherini@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 30 Jun 2010 16:49:42 +0200 (CEST)

Author: jackburton
Date: 2010-06-30 16:49:42 +0200 (Wed, 30 Jun 2010)
New Revision: 37314
Changeset: http://dev.haiku-os.org/changeset/37314/haiku

Modified:
   haiku/trunk/headers/os/interface/Menu.h
   haiku/trunk/src/kits/interface/Menu.cpp
Log:
_AddDynamicItems didn't pass the keyDown parameter to _OkToProceed (noticed
by Ziusudra).
Also removed leftover fDynamicItemsAdded.


Modified: haiku/trunk/headers/os/interface/Menu.h
===================================================================
--- haiku/trunk/headers/os/interface/Menu.h     2010-06-30 13:49:27 UTC (rev 
37313)
+++ haiku/trunk/headers/os/interface/Menu.h     2010-06-30 14:49:42 UTC (rev 
37314)
@@ -249,7 +249,7 @@
                                                                        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 @@
 
                        LayoutData*                     fLayoutData;
 
-                       bool                            fDynamicItemsAdded;
-                       bool                            _reserved1;
-                       bool                            _reserved2;
-                       bool                            _reserved3;
+                       int32                           _reserved;
 
                        char                            fTrigger;
                        bool                            fResizeToFit;

Modified: haiku/trunk/src/kits/interface/Menu.cpp
===================================================================
--- haiku/trunk/src/kits/interface/Menu.cpp     2010-06-30 13:49:27 UTC (rev 
37313)
+++ haiku/trunk/src/kits/interface/Menu.cpp     2010-06-30 14:49:42 UTC (rev 
37314)
@@ -210,7 +210,6 @@
        fMaxContentWidth(0.0f),
        fInitMatrixSize(NULL),
        fExtraMenuData(NULL),
-       fDynamicItemsAdded(false),
        fTrigger(0),
        fResizeToFit(true),
        fUseCachedMenuLayout(false),
@@ -245,7 +244,6 @@
        fMaxContentWidth(0.0f),
        fInitMatrixSize(NULL),
        fExtraMenuData(NULL),
-       fDynamicItemsAdded(false),
        fTrigger(0),
        fResizeToFit(true),
        fUseCachedMenuLayout(false),
@@ -281,7 +279,6 @@
        fMaxContentWidth(0.0f),
        fInitMatrixSize(NULL),
        fExtraMenuData(NULL),
-       fDynamicItemsAdded(false),
        fTrigger(0),
        fResizeToFit(true),
        fUseCachedMenuLayout(false),
@@ -1244,7 +1241,6 @@
        fMaxContentWidth(0.0f),
        fInitMatrixSize(NULL),
        fExtraMenuData(NULL),
-       fDynamicItemsAdded(false),
        fTrigger(0),
        fResizeToFit(resizeToFit),
        fUseCachedMenuLayout(false),
@@ -1472,7 +1468,7 @@
        if (window->Lock()) {
                bool attachAborted = false;
                if (keyDown)
-                       attachAborted = _AddDynamicItems();     
+                       attachAborted = _AddDynamicItems(keyDown);      
                
                if (attachAborted) {
                        if (ourWindow)
@@ -2749,7 +2745,7 @@
 
 
 bool
-BMenu::_AddDynamicItems()
+BMenu::_AddDynamicItems(bool keyDown)
 {
        bool attachAborted = false;
        BMenuItem* superItem = Superitem();
@@ -2757,7 +2753,7 @@
        if (AddDynamicItem(B_INITIAL_ADD)) {
                do {
                        if (superMenu != NULL
-                               && !superMenu->_OkToProceed(superItem)) {
+                               && !superMenu->_OkToProceed(superItem, 
keyDown)) {
                                AddDynamicItem(B_ABORT);
                                attachAborted = true;
                                break;


Other related posts:

  • » [haiku-commits] r37314 - in haiku/trunk: headers/os/interface src/kits/interface - stefano . ceccherini