Closed Bug 327594 Opened 20 years ago Closed 20 years ago

need to construct native menus on window load

Categories

(Core :: Widget: Cocoa, defect)

PowerPC
macOS
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: jaas, Assigned: jaas)

Details

Attachments

(1 file)

Right now, we delay menu construction (including the creation of native menu items) until a menu is selected. This is not good because in order for keyboard commands to work, native menu items need to be created. This patch causes all menus and their submenus to get constructed when the menu bar is. It works because when the top-level menus are created, they call MenuConstruct. MenuConstruct creates submenus, and during their creation they call MenuConstruct. This goes on until all menus and their submenus have been constructed. Voila.
Attached patch fix, v1.1 — — Splinter Review
Fixes the problem and removes a lot of unnecessary help menu code. It was probably left over from classic Mac OS.
Attachment #212193 - Flags: review?(mark)
Attachment #212193 - Flags: review?(mark) → review+
Would you mind adding a comment here saying that this is only around to implement the pure virtual function that only exists to support Carbon widgets, and that it can be removed once Carbon widgets are dead for real? NS_IMETHODIMP nsMenuX::IsHelpMenu(PRBool* aIsHelpMenu) { NS_ENSURE_ARG_POINTER(aIsHelpMenu); - *aIsHelpMenu = mIsHelpMenu; + *aIsHelpMenu = PR_FALSE; return NS_OK; } You can also kill the IsHelpMenu call in nsMenuBarX.
Fixed on trunk.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: