support for Application menu under Cocoa widgets. Also fixes a couple other bugs - removes "Quit" from the "File" menu and fixes the wording of "Close" in the "File" menu. b=342896 r=mattwillis r=jminta

This commit is contained in:
joshmoz%gmail.com 2006-08-25 05:32:32 +00:00
Родитель c62427bd35
Коммит 20ff542db4
4 изменённых файлов: 52 добавлений и 4 удалений

Просмотреть файл

@ -353,6 +353,7 @@
<!ENTITY calendar.menu.options.modify "Edit" >
<!ENTITY calendar.menu.options.remove "Delete" >
<!ENTITY calendar.menu.options.close "Close Window" >
<!ENTITY calendar.menu.options.close.mac "Close" >
<!ENTITY calendar.menu.options.close.key "W">
<!ENTITY calendar.menu.options.close.accesskey "C" >

Просмотреть файл

@ -107,6 +107,9 @@
<!ENTITY calendar.quit.label "Quit">
<!ENTITY calendar.quit.accesskey "Q">
<!ENTITY calendar.quit.label.mac "Quit &brandShortName;">
<!ENTITY calendar.quit.key.mac "Q">
<!ENTITY calendar.quit.modifiers.mac "accel">
<!ENTITY calendar.about.label "About Calendar">
<!ENTITY calendar.about.accesskey "C">
@ -228,6 +231,9 @@
<!ENTITY optionsCmd.accesskey "O">
<!ENTITY preferencesCmd.label "Preferences">
<!ENTITY preferencesCmd.accesskey "n">
<!ENTITY preferencesCmdMac.label "Preferences…">
<!ENTITY preferencesCmdMac.commandkey ",">
<!ENTITY preferencesCmdMac.modifiers "accel">
<!ENTITY viewMenu.label "View">
<!ENTITY viewMenu.accesskey "V">
@ -243,3 +249,13 @@
<!ENTITY zoomWindow.label "Zoom">
<!ENTITY minimizeWindow.key "M">
<!ENTITY bringAllToFront.label "Bring All to Front">
<!-- Mac OS X Application menu items -->
<!ENTITY servicesMenuMac.label "Services">
<!ENTITY hideThisAppCmdMac.label "Hide &brandShortName;">
<!ENTITY hideThisAppCmdMac.commandkey "H">
<!ENTITY hideThisAppCmdMac.modifiers "accel">
<!ENTITY hideOtherAppsCmdMac.label "Hide Others">
<!ENTITY hideOtherAppsCmdMac.commandkey "H">
<!ENTITY hideOtherAppsCmdMac.modifiers "accel,alt">
<!ENTITY showAllAppsCmdMac.label "Show All">

Просмотреть файл

@ -82,8 +82,12 @@
observes="modify_command"/>
<menuitem id="calendar-close"
key="key_close"
#ifdef XP_MACOSX
label="&calendar.menu.options.close.mac;"
#else
label="&calendar.menu.options.close;"
accesskey="&calendar.menu.options.close.accesskey;"
#endif
observes="close_calendar_command"/>
<menuseparator/>
@ -130,13 +134,18 @@
label="&calendar.print.label;"
accesskey="&calendar.print.accesskey;"
observes="print_command"/>
#ifndef XP_MACOSX
#ifdef XP_MACOSX
<menuitem id="menu_FileQuitItem"
label="&calendar.quit.label.mac;"
key="key_quitCmdMac"
oncommand="goQuitApplication()"/>
#else
<menuseparator id="calendar-print-sep"/>
#endif
<menuitem id="calendar-quit-menu"
label="&calendar.quit.label;"
accesskey="&calendar.quit.accesskey;"
oncommand="goQuitApplication()"/>
#endif
</menupopup>
</menu>
@ -375,8 +384,8 @@
# -- ifdef UNIX also covers Mac OS X, so we have to explicitly enable this menuitem
<menuseparator id="menu_PrefsSeparator"/>
<menuitem id="menu_preferences"
label="&optionsCmd.label;"
accesskey="&optionsCmd.accesskey;"
label="&preferencesCmdMac.label;"
key="key_preferencesCmdMac"
oncommand="openPreferences();"/>
#endif
</menupopup>
@ -415,6 +424,24 @@
disabled="true"/>
<menuseparator id="sep-window-list"/>
</menupopup>
# We just need this node to exist in order to get Gecko to create a Services
# menu for us under Cocoa widgets. It will be automatically hidden.
<menuitem id="menu_mac_services"
label="&servicesMenuMac.label;"/>
# We just need this node to exist in order to get Gecko to create a "Hide [app]"
# menu for us under Cocoa widgets. It will be automatically hidden.
<menuitem id="menu_mac_hide_app"
label="&hideThisAppCmdMac.label;"
key="key_hideThisAppCmdMac"/>
# We just need this node to exist in order to get Gecko to create a "Hide Others"
# menu for us under Cocoa widgets. It will be automatically hidden.
<menuitem id="menu_mac_hide_others"
label="&hideOtherAppsCmdMac.label;"
key="key_hideOtherAppsCmdMac"/>
# We just need this node to exist in order to get Gecko to create a "Show All"
# menu for us under Cocoa widgets. It will be automatically hidden.
<menuitem id="menu_mac_show_all"
label="&showAllAppsCmdMac.label;"/>
</menu>
#endif

Просмотреть файл

@ -155,6 +155,10 @@
#ifdef XP_MACOSX
<key id="key_minimizeWindow" key="&minimizeWindow.key;" command="minimizeWindow" modifiers="accel"/>
<key id="key_preferencesCmdMac" key="&preferencesCmdMac.commandkey;" modifiers="&preferencesCmdMac.modifiers;"/>
<key id="key_quitCmdMac" key="&calendar.quit.key.mac;" modifiers="&calendar.quit.modifiers.mac;"/>
<key id="key_hideThisAppCmdMac" key="&hideThisAppCmdMac.commandkey;" modifiers="&hideThisAppCmdMac.modifiers;"/>
<key id="key_hideOtherAppsCmdMac" key="&hideOtherAppsCmdMac.commandkey;" modifiers="&hideOtherAppsCmdMac.modifiers;"/>
#endif
</keyset>