Closed Bug 335006 Opened 18 years ago Closed 18 years ago

Thunderbird does not support application menu under Cocoa widgets

Categories

(Thunderbird :: General, defect)

PowerPC
macOS
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jaas, Assigned: jaas)

References

Details

Attachments

(1 file)

Cocoa widgets has a new way of dealing with the application menu, which Thunderbird does not have support for.

From widget/src/cocoa/nsMenuBarX.mm:

We support the following menu items here:
 
   Menu Item             DOM Node ID             Notes
   
   ==================
   = About This App = <- aboutName
   ==================
   = Preferences... = <- menu_preferences
   ==================
   = Services     > = <- menu_mac_services  <- (do not define key equivalent)
   ==================
   = Hide App       = <- menu_mac_hide_app
   = Hide Others    = <- menu_mac_hide_others
   = Show All       = <- menu_mac_show_all
   ==================
   = Quit           = <- menu_FileQuitItem
   ==================
   
If any of them are ommitted from the application's DOM, we just don't add them. We always add a "Quit" item, but if an app developer does not provide a DOM node with the right ID for the Quit item, we add it in English. App developers need only add each node with a label and a key equivalent (if they want one). Other attributes are optional. Like so:
   
   <menuitem id="menu_preferences"
          label="&preferencesCmdMac.label;"
            key="open_prefs_key"/>
   
We need to use this system for localization purposes, until we have a better way to define the Application menu to be used on Mac OS X.
Blocks: cocoa
Attached patch fix v1.0Splinter Review
This works for me in Cocoa widgets, shouldn't mess up Carbon widgets as they have compat code for Cocoa application menu support.
Attachment #219434 - Flags: review?(mscott)
Comment on attachment 219434 [details] [diff] [review]
fix v1.0

nice! Do we need to add the keys to addressbook.xul and messengercompose.xul as well Josh?
I don't think you need to add stuff to compose or address book. The menu code creates the Application menu once and shares it, so its pretty much whatever the first document that tries to add a native menu item is (iirc, hidden window is it).
I tested this patch with the address book window open and the Application menu was fine, I couldn't test with the message compose window open because compose windows won't open under Cocoa widgets :( I'll look into that soon.
Comment on attachment 219434 [details] [diff] [review]
fix v1.0

So if you start up with -addressbook, the hidden window should still get created first, so the items should still be there. Great.
Attachment #219434 - Flags: review?(mscott) → review+
landed on trunk
Status: NEW → RESOLVED
Closed: 18 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: