diff -urN ooo_SRC680_m177_src.orig/vcl/aqua/inc/salmenu.h ooo_SRC680_m177_src/vcl/aqua/inc/salmenu.h --- ooo_SRC680_m177_src.orig/vcl/aqua/inc/salmenu.h 2006-07-22 00:35:43.000000000 +0200 +++ ooo_SRC680_m177_src/vcl/aqua/inc/salmenu.h 2006-07-22 10:18:55.000000000 +0200 @@ -88,9 +88,12 @@ Menu *myMenu; // Menu into which this MenuItem is inserted CFStringRef sMenuText; // Title of this menu item - unsigned nPos; // nPos of this menu item MenuRef parentMenuRef; // The menu in which this menu item is inserted + MenuItemIndex myMenuItemIndex; // The menu index of this menu item in the myMenu menu + // It is 1 based, so the first + // menu item's MenuItemIndex in the menu has value 1 + MenuItemAttributes menuAttributes; // menu attributes of this menu item }; diff -urN ooo_SRC680_m177_src.orig/vcl/aqua/source/window/salmenu.cxx ooo_SRC680_m177_src/vcl/aqua/source/window/salmenu.cxx --- ooo_SRC680_m177_src.orig/vcl/aqua/source/window/salmenu.cxx 2006-07-22 00:35:44.000000000 +0200 +++ ooo_SRC680_m177_src/vcl/aqua/source/window/salmenu.cxx 2006-07-22 10:52:46.000000000 +0200 @@ -140,7 +140,6 @@ // save MenuRef of the menu for future reference pAquaSalMenuItem->parentMenuRef = myMenuRef; - pAquaSalMenuItem->nPos = nPos; fprintf(stderr, "PJ: bMenuBar = %d\n", bMenuBar); @@ -174,19 +173,13 @@ void AquaSalMenu::CheckItem( unsigned nPos, BOOL bCheck ) { - fprintf(stderr, "PJ: ############### CheckItem (%d, %d) #########\n", nPos, bCheck); - - // FIXME: nPos+1 is not correct, we should find out the MenuItem - // with nPos and get its MenuItemIndex instead! + // nPos is 0 based, MenuItemIndex is 1 based CheckMenuItem(this->myMenuRef, nPos+1, bCheck); } void AquaSalMenu::EnableItem( unsigned nPos, BOOL bEnable ) { - fprintf(stderr, "PJ: ############### EnableItem (%d, %d) #########\n", nPos, bEnable); - - // FIXME: nPos+1 is not correct, we should find out the MenuItem - // with nPos and get its MenuItemIndex instead! + // nPos is 0 based, MenuItemIndex is 1 based if (bEnable) EnableMenuItem(this->myMenuRef, nPos+1); else