зеркало из https://github.com/mozilla/gecko-dev.git
Make Firefox Application menu work with Cocoa widgets. b=324180 r=mento sr=mconnor
This commit is contained in:
Родитель
f209ff3536
Коммит
67b2ba2d6c
|
@ -22,6 +22,7 @@
|
|||
#
|
||||
# Contributor(s):
|
||||
# Asaf Romano <mozilla.mano@sent.com>
|
||||
# Josh Aas <josh@mozilla.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
|
@ -51,9 +52,13 @@
|
|||
<script type="application/x-javascript" src="chrome://help/content/contextHelp.js"/>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<!-- nsMenuBarX moves menu_preferences to the Application Menu -->
|
||||
<!-- nsMenuBarX hides these and uses them to build the Application menu -->
|
||||
<menupopup id="menu_ToolsPopup">
|
||||
<menuitem id="menu_preferences" oncommand="openPreferences();"/>
|
||||
<menuitem id="menu_preferences" label="&preferencesCmdMac.label;" key="key_preferencesCmdMac" oncommand="openPreferences();"/>
|
||||
<menuitem id="menu_mac_services" label="&servicesMenuMac.label;"/>
|
||||
<menuitem id="menu_mac_hide_app" label="&hideThisAppCmdMac.label;" key="key_hideThisAppCmdMac"/>
|
||||
<menuitem id="menu_mac_hide_others" label="&hideOtherAppsCmdMac.label;" key="key_hideOtherAppsCmdMac"/>
|
||||
<menuitem id="menu_mac_show_all" label="&showAllAppsCmdMac.label;"/>
|
||||
</menupopup>
|
||||
<!-- Mac window menu -->
|
||||
#include ../../../toolkit/content/macWindowMenu.inc
|
||||
|
@ -113,9 +118,9 @@
|
|||
# VK_HELP doesn't work on other platforms yet
|
||||
#ifdef XP_MACOSX
|
||||
keycode="&openHelpMac.commandkey;"/>
|
||||
# On mac, we support both the help key and Cmd+?
|
||||
# ...Map Cmd+Shift+/, show Cmd+?
|
||||
# (that's for en-US, it might be different for other keyboard layouts)
|
||||
<!-- On mac, we support both the help key and Cmd+?
|
||||
...Map Cmd+Shift+/, show Cmd+
|
||||
(that's for en-US, it might be different for other keyboard layouts) -->
|
||||
<key id="key_openHelpMac"
|
||||
oncommand="openHelp('firefox-help', 'chrome://browser/locale/help/help.rdf');"
|
||||
key="&openHelpMac2.commandkey;"
|
||||
|
@ -123,6 +128,16 @@
|
|||
<key id="key_openHelpMacFrontend"
|
||||
key="&openHelpMac2.frontendCommandkey;"
|
||||
modifiers="&openHelpMac2.frontendModifiers;"/>
|
||||
<!-- These are used to build the Application menu under Cocoa widgets -->
|
||||
<key id="key_preferencesCmdMac"
|
||||
key="&preferencesCmdMac.commandkey;"
|
||||
modifiers="&preferencesCmdMac.modifiers;"/>
|
||||
<key id="key_hideThisAppCmdMac"
|
||||
key="&hideThisAppCmdMac.commandkey;"
|
||||
modifiers="&hideThisAppCmdMac.modifiers;"/>
|
||||
<key id="key_hideOtherAppsCmdMac"
|
||||
key="&hideOtherAppsCmdMac.commandkey;"
|
||||
modifiers="&hideOtherAppsCmdMac.modifiers;"/>
|
||||
#else
|
||||
keycode="&openHelp.commandkey;"/>
|
||||
#endif
|
||||
|
|
|
@ -70,13 +70,16 @@
|
|||
type="checkbox" oncommand="BrowserOffline.toggleOfflineStatus();"/>
|
||||
<menuitem id="menu_FileQuitItem"
|
||||
#ifdef XP_WIN
|
||||
label="&quitApplicationCmdWin.label;"
|
||||
accesskey="&quitApplicationCmdWin.accesskey;"
|
||||
label="&quitApplicationCmdWin.label;"
|
||||
accesskey="&quitApplicationCmdWin.accesskey;"
|
||||
#elif XP_MACOSX
|
||||
label="&quitApplicationCmdMac.label;"
|
||||
key="key_quitApplicationCmdMac"
|
||||
#else
|
||||
label="&quitApplicationCmd.label;"
|
||||
accesskey="&quitApplicationCmd.accesskey;"
|
||||
label="&quitApplicationCmd.label;"
|
||||
accesskey="&quitApplicationCmd.accesskey;"
|
||||
#endif
|
||||
oncommand="goQuitApplication();"/>
|
||||
oncommand="goQuitApplication();"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
||||
|
|
|
@ -324,6 +324,9 @@
|
|||
<key id="key_switchTextDirection" key="&bidiSwitchTextDirectionItem.commandkey;" command="cmd_switchTextDirection" modifiers="accel,shift" />
|
||||
|
||||
<key id="key_sanitize" command="Tools:Sanitize" keycode="VK_DELETE" modifiers="accel,shift"/>
|
||||
#ifdef XP_MACOSX
|
||||
<key id="key_quitApplicationCmdMac" key="&quitApplicationCmdMac.key;" modifiers="accel"/>
|
||||
#endif
|
||||
</keyset>
|
||||
|
||||
# Used by baseMenuOverlay
|
||||
|
|
|
@ -31,3 +31,19 @@
|
|||
<!ENTITY helpReleaseNotes.accesskey "N">
|
||||
<!ENTITY updateCmd.label "Check for Updates...">
|
||||
<!ENTITY updateCmd.accesskey "o">
|
||||
|
||||
<!ENTITY preferencesCmdMac.label "Preferences...">
|
||||
<!ENTITY preferencesCmdMac.commandkey ",">
|
||||
<!ENTITY preferencesCmdMac.modifiers "accel">
|
||||
|
||||
<!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,shift">
|
||||
|
||||
<!ENTITY showAllAppsCmdMac.label "Show All">
|
||||
|
|
|
@ -309,6 +309,8 @@
|
|||
<!ENTITY goForwardCmd.commandKey "]">
|
||||
<!ENTITY quitApplicationCmd.label "Quit">
|
||||
<!ENTITY quitApplicationCmd.accesskey "Q">
|
||||
<!ENTITY quitApplicationCmdMac.label "Quit">
|
||||
<!ENTITY quitApplicationCmdMac.key "Q">
|
||||
|
||||
<!ENTITY closeCmd.label "Close">
|
||||
<!ENTITY closeCmd.key "W">
|
||||
|
|
Загрузка…
Ссылка в новой задаче