fx-compat: Basic viewer: Fix menus
- Add strings and items to previously empty and untitled Edit and Window menus - Add basic context menu to the browser
This commit is contained in:
parent
72ec5c64d9
commit
e747c089fc
1 changed files with 95 additions and 48 deletions
|
@ -33,7 +33,7 @@
|
|||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd"> %globalDTD;
|
||||
<!--<!ENTITY % textcontextDTD SYSTEM "chrome://global/locale/textcontext.dtd" > %textcontextDTD;-->
|
||||
<!ENTITY % editMenuOverlayDTD SYSTEM "chrome://zotero/locale/mozilla/editMenuOverlay.dtd" > %editMenuOverlayDTD;
|
||||
<!ENTITY % standaloneDTD SYSTEM "chrome://zotero/locale/standalone.dtd" > %standaloneDTD;
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" > %brandDTD;
|
||||
<!ENTITY % zoteroDTD SYSTEM "chrome://zotero/locale/zotero.dtd"> %zoteroDTD;
|
||||
|
@ -41,20 +41,25 @@
|
|||
|
||||
<window id="main-window"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
onload="window.sizeToContent()"
|
||||
windowtype="zotero:basicViewer"
|
||||
title="&brandShortName;"
|
||||
width="1000" height="700"
|
||||
persist="screenX screenY width height sizemode">
|
||||
|
||||
<html:link rel="localization" href="mozilla/menubar.ftl"/>
|
||||
<html:link rel="localization" href="mozilla/textActions.ftl"/>
|
||||
|
||||
<script>
|
||||
var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
Services.scriptloader.loadSubScript("chrome://zotero/content/platformKeys.js", this);
|
||||
Services.scriptloader.loadSubScript("chrome://zotero/content/editMenuOverlay.js", this);
|
||||
Services.scriptloader.loadSubScript("chrome://zotero/content/include.js", this);
|
||||
|
||||
// Mozilla scripts
|
||||
Services.scriptloader.loadSubScript("chrome://global/content/globalOverlay.js", this);
|
||||
Services.scriptloader.loadSubScript("chrome://global/content/editMenuOverlay.js", this);
|
||||
Services.scriptloader.loadSubScript("chrome://global/content/contentAreaUtils.js", this);
|
||||
Services.scriptloader.loadSubScript("chrome://global/content/printUtils.js", this);
|
||||
if (Zotero.isMac) {
|
||||
|
@ -65,8 +70,6 @@
|
|||
} else {
|
||||
Services.scriptloader.loadSubScript("chrome://zotero/content/standalone/basicViewer.js", this);
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<commandset id="mainCommandSet">
|
||||
|
@ -87,36 +90,37 @@
|
|||
<key id="key_print" key="&printCmd.key;" command="cmd_print" modifiers="accel"/>
|
||||
<key id="key_save" key="&saveCmd.key;" command="cmd_save" modifiers="accel"/>
|
||||
</keyset>
|
||||
<keyset id="editMenuKeys"/>
|
||||
|
||||
<!--<popup id="contentAreaContextMenu">
|
||||
<menuitem id="context-undo"
|
||||
label="&undoCmd.label;"
|
||||
accesskey="&undoCmd.accesskey;"
|
||||
command="cmd_undo"/>
|
||||
<menuseparator id="context-sep-undo"/>
|
||||
<menuitem id="context-cut"
|
||||
label="&cutCmd.label;"
|
||||
accesskey="&cutCmd.accesskey;"
|
||||
command="cmd_cut"/>
|
||||
<menuitem id="context-copy"
|
||||
label="©Cmd.label;"
|
||||
accesskey="©Cmd.accesskey;"
|
||||
command="cmd_copy"/>
|
||||
<menuitem id="context-paste"
|
||||
label="&pasteCmd.label;"
|
||||
accesskey="&pasteCmd.accesskey;"
|
||||
command="cmd_paste"/>
|
||||
<menuitem id="context-delete"
|
||||
label="&deleteCmd.label;"
|
||||
accesskey="&deleteCmd.accesskey;"
|
||||
command="cmd_delete"/>
|
||||
<menuseparator id="context-sep-paste"/>
|
||||
<menuitem id="context-selectall"
|
||||
label="&selectAllCmd.label;"
|
||||
accesskey="&selectAllCmd.accesskey;"
|
||||
command="cmd_selectAll"/>
|
||||
</popup>-->
|
||||
<keyset id="editMenuKeys">
|
||||
<key id="key_undo" data-l10n-id="text-action-undo-shortcut" modifiers="accel" command="cmd_undo"/>
|
||||
<!-- l10n and modifiers set in platformKeys.js -->
|
||||
<key id="key_redo" command="cmd_redo"/>
|
||||
<key id="key_cut" data-l10n-id="text-action-cut-shortcut" modifiers="accel" command="cmd_cut"/>
|
||||
<key id="key_copy" data-l10n-id="text-action-copy-shortcut" modifiers="accel" command="cmd_copy"/>
|
||||
<key id="key_paste" data-l10n-id="text-action-paste-shortcut" modifiers="accel" command="cmd_paste"/>
|
||||
<key id="key_delete" keycode="VK_DELETE" command="cmd_delete"/>
|
||||
<key id="key_selectAll" data-l10n-id="text-action-select-all-shortcut" modifiers="accel" command="cmd_selectAll"/>
|
||||
<key id="key_switchTextDirection" data-l10n-id="bidi-switch-direction-shortcut" command="cmd_switchTextDirection" modifiers="accel,shift" />
|
||||
<key id="key_find" key="&findCmd.key;" modifiers="accel" command="cmd_find"/>
|
||||
<key id="key_findAgain" key="&findAgainCmd.key;" modifiers="accel" command="cmd_findAgain"/>
|
||||
<key id="key_findPrevious" key="&findAgainCmd.key;" modifiers="shift,accel" command="cmd_findPrevious"/>
|
||||
<key id="key_findAgain2" keycode="&findAgainCmd.key2;" command="cmd_findAgain"/>
|
||||
<key id="key_findPrevious2" keycode="&findAgainCmd.key2;" modifiers="shift" command="cmd_findPrevious"/>
|
||||
</keyset>
|
||||
|
||||
<popupset id="contentAreaContextSet">
|
||||
<menupopup id="contentAreaContextMenu"
|
||||
onpopupshowing="goUpdateCommand('cmd_copy')">
|
||||
<menuitem id="context-copy"
|
||||
data-l10n-id="text-action-copy"
|
||||
command="cmd_copy"
|
||||
disabled="true"/>
|
||||
<menuitem id="context-selectall"
|
||||
data-l10n-id="text-action-select-all"
|
||||
command="cmd_selectAll"/>
|
||||
</menupopup>
|
||||
</popupset>
|
||||
|
||||
<toolbox id="navigator-toolbox" class="toolbox-top" mode="icons" defaultmode="icons">
|
||||
<!-- Menu -->
|
||||
<toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar" customizable="true"
|
||||
|
@ -140,30 +144,72 @@
|
|||
</menupopup>
|
||||
</menu>
|
||||
|
||||
<menu id="menu_edit">
|
||||
<menu id="edit-menu" data-l10n-id="menu-edit">
|
||||
<menupopup id="menu_EditPopup">
|
||||
<menuitem id="menu_undo"/>
|
||||
<menuitem id="menu_redo"/>
|
||||
<menuitem id="menu_undo"
|
||||
key="key_undo"
|
||||
command="cmd_undo" data-l10n-id="text-action-undo"/>
|
||||
<menuitem id="menu_redo"
|
||||
key="key_redo"
|
||||
command="cmd_redo" data-l10n-id="text-action-redo"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="menu_cut"/>
|
||||
<menuitem id="menu_copy"/>
|
||||
<menuitem id="menu_paste"/>
|
||||
<menuitem id="menu_delete"/>
|
||||
<menuitem id="menu_cut"
|
||||
key="key_cut"
|
||||
command="cmd_cut" data-l10n-id="text-action-cut"/>
|
||||
<menuitem id="menu_copy"
|
||||
key="key_copy"
|
||||
command="cmd_copy" data-l10n-id="text-action-copy"/>
|
||||
<menuitem id="menu_paste"
|
||||
key="key_paste"
|
||||
command="cmd_paste" data-l10n-id="text-action-paste"/>
|
||||
<menuitem id="menu_delete"
|
||||
key="key_delete"
|
||||
command="cmd_delete" data-l10n-id="text-action-delete"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="menu_selectAll"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="menu_find"/>
|
||||
<menuitem id="menu_selectAll"
|
||||
key="key_selectAll"
|
||||
command="cmd_selectAll" data-l10n-id="text-action-select-all"/>
|
||||
<menuseparator hidden="true" id="textfieldDirection-separator"/>
|
||||
<menuitem id="textfieldDirection-swap"
|
||||
command="cmd_switchTextDirection"
|
||||
key="key_switchTextDirection"
|
||||
label="&bidiSwitchTextDirectionItem.label;"
|
||||
accesskey="&bidiSwitchTextDirectionItem.accesskey;"
|
||||
hidden="true"/>
|
||||
hidden="true" data-l10n-id="menu-edit-bidi-switch-text-direction"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
||||
<menu id="windowMenu" />
|
||||
<keyset id="macKeyset"> <!-- was mainKeySet -->
|
||||
<key id="key_minimizeWindow"
|
||||
command="minimizeWindow"
|
||||
key="&minimizeWindow.key;"
|
||||
modifiers="accel"/>
|
||||
</keyset>
|
||||
|
||||
<menu id="windowMenu"
|
||||
label="&windowMenu.label;"
|
||||
datasources="rdf:window-mediator" ref="NC:WindowMediatorRoot"
|
||||
onpopupshowing="macWindowMenuDidShow();"
|
||||
onpopuphidden="macWindowMenuDidHide();"
|
||||
hidden="false">
|
||||
<template>
|
||||
<rule>
|
||||
<menupopup>
|
||||
<menuitem uri="rdf:*"
|
||||
label="rdf:http://home.netscape.com/NC-rdf#Name"
|
||||
type="radio"
|
||||
name="windowList"
|
||||
oncommand="ShowWindowFromResource(event.target)"/>
|
||||
</menupopup>
|
||||
</rule>
|
||||
</template>
|
||||
<menupopup id="windowPopup">
|
||||
<menuitem command="minimizeWindow" label="&minimizeWindow.label;" key="key_minimizeWindow"/>
|
||||
<menuitem command="zoomWindow" label="&zoomWindow.label;"/>
|
||||
<!-- decomment when "BringAllToFront" is implemented
|
||||
<menuseparator/>
|
||||
<menuitem label="&bringAllToFront.label;" disabled="true"/> -->
|
||||
<menuseparator id="sep-window-list"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
</menubar>
|
||||
</toolbaritem>
|
||||
</toolbar>
|
||||
|
@ -176,7 +222,8 @@
|
|||
flex="1"
|
||||
remote="false"
|
||||
disableglobalhistory="true"
|
||||
maychangeremoteness="true"/>
|
||||
maychangeremoteness="true"
|
||||
context="contentAreaContextMenu"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
</window>
|
||||
|
|
Loading…
Add table
Reference in a new issue