зеркало из https://github.com/mozilla/pjs.git
Use more efficient command structure, refactor commands, broadcasters and keys, remove unused attributes, do some other optimization (72923). Landing navigator part only; this should help new window opening and some other areas. r=ben sr=hyatt
This commit is contained in:
Родитель
7560f4ac78
Коммит
d64f0ef044
|
@ -3,14 +3,14 @@
|
|||
<overlay id="platformNavigationBindings"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<keyset id="keyset">
|
||||
<keyset id="navigationKeys">
|
||||
<!-- proper arrow key navigation, 4.xP -->
|
||||
<key id="goBackKb" keycode="VK_LEFT" observes="Browser:Back" modifiers="accel"/>
|
||||
<key id="goForwardKb" keycode="VK_RIGHT" observes="Browser:Forward" modifiers="accel"/>
|
||||
<key id="goBackKbMac" key="[" observes="Browser:Back" modifiers="accel"/>
|
||||
<key id="goForwardKbMac" key="]" observes="Browser:Forward" modifiers="accel"/>
|
||||
<key id="stopMac" key="." oncommand="BrowserStop();" modifiers="accel"/>
|
||||
<key id="goHome" keycode="VK_HOME" observes="Browser:Home" modifiers="meta"/>
|
||||
<key id="goBackKb" keycode="VK_LEFT" observes="canGoBack" modifiers="accel"/>
|
||||
<key id="goForwardKb" keycode="VK_RIGHT" observes="canGoForward" modifiers="accel"/>
|
||||
<key key="[" observes="canGoBack" modifiers="accel"/>
|
||||
<key key="]" observes="canGoForward" modifiers="accel"/>
|
||||
<key key="." oncommand="BrowserStop();" modifiers="accel"/>
|
||||
<key id="goHome" keycode="VK_HOME" command="Browser:Home" modifiers="meta"/>
|
||||
</keyset>
|
||||
|
||||
</overlay>
|
||||
|
|
|
@ -290,6 +290,7 @@ nsXULBrowserWindow.prototype =
|
|||
stopButton.setAttribute("disabled", true);
|
||||
stopMenu.setAttribute("disabled", true);
|
||||
stopContext.setAttribute("disabled", true);
|
||||
alert("foo");
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1389,3 +1390,20 @@ function checkForDefaultBrowser()
|
|||
} catch(e) {
|
||||
}
|
||||
}
|
||||
|
||||
function ShowAndSelectContentsOfURLBar()
|
||||
{
|
||||
var navBar = document.getElementById("nav-bar");
|
||||
|
||||
// If it's hidden, show it.
|
||||
if (navBar.getAttribute("hidden") == "true")
|
||||
goToggleToolbar('nav-bar','cmd_viewnavbar');
|
||||
|
||||
var urlBar = document.getElementById("urlbar");
|
||||
if (urlBar.value)
|
||||
urlBar.select();
|
||||
else
|
||||
urlBar.focus();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@ Contributor(s): ______________________________________. -->
|
|||
|
||||
<?xul-overlay href="chrome://navigator/content/navigatorOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://navigator/content/navExtraOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://communicator/content/sidebar/sidebarOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://communicator/content/securityOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://communicator/content/communicatorOverlay.xul"?>
|
||||
|
@ -50,14 +49,12 @@ Contributor(s): ______________________________________. -->
|
|||
title="&mainWindow.title;"
|
||||
titlemodifier="&mainWindow.titlemodifier;"
|
||||
titlemenuseparator="&mainWindow.titlemodifiermenuseparator;"
|
||||
viewsourcetitlepreface="&viewsourcetitle.preface;"
|
||||
windowtype="navigator:browser" orient="vertical"
|
||||
width="640" height="480"
|
||||
screenX="10" screenY="10"
|
||||
persist="screenX screenY width height sizemode">
|
||||
|
||||
<script type="application/x-javascript" src="chrome://global/content/nsJSSupportsUtils.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/nsJSComponentManager.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/nsUserSettings.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/nsClipboard.js"/>
|
||||
|
@ -73,54 +70,49 @@ Contributor(s): ______________________________________. -->
|
|||
<script type="application/x-javascript" src="chrome://navigator/content/sessionHistoryUI.js"/>
|
||||
|
||||
<!-- hook for stringbundle overlays -->
|
||||
<stringbundleset id="stringbundleset">
|
||||
<stringbundleset id="navStringBundles">
|
||||
<stringbundle id="bundle_navigator" src="chrome://navigator/locale/navigator.properties"/>
|
||||
<stringbundle id="bundle_brand" src="chrome://global/locale/brand.properties"/>
|
||||
<stringbundle id="bundle_navigator_region" src="chrome://navigator-region/locale/region.properties"/>
|
||||
<stringbundle id="bundle_brand_region" src="chrome://global-region/locale/region.properties"/>
|
||||
</stringbundleset>
|
||||
|
||||
<commands id="commands">
|
||||
|
||||
<commandset id="navCommands">
|
||||
<commandset id="globalEditMenuItems"/>
|
||||
<commandset id="selectEditMenuItems"/>
|
||||
<commandset id="undoEditMenuItems"/>
|
||||
<commandset id="clipboardEditMenuItems"/>
|
||||
</commands>
|
||||
|
||||
<commandset id="clipboardEditMenuItems"/>
|
||||
<!-- <command id="cmd_pageSetup"/> -->
|
||||
<command id="toggleSidebar"/>
|
||||
</commandset>
|
||||
|
||||
<!-- broadcasters are appended from the overlay -->
|
||||
<broadcasterset id="broadcasterset">
|
||||
<broadcaster id="canPrint"/>
|
||||
<broadcaster id="args" value=""/>
|
||||
<broadcaster id="cmd_pageSetup"/>
|
||||
</broadcasterset>
|
||||
|
||||
<broadcasterset id="navBroadcasters"/>
|
||||
|
||||
<!-- keys are appended from the overlay -->
|
||||
<keyset id="keyset"/>
|
||||
|
||||
<!-- tooltips -->
|
||||
<popupset id="aTooltipSet"/>
|
||||
|
||||
<keyset id="navKeys">
|
||||
<key id="showHideSidebar"/>
|
||||
</keyset>
|
||||
|
||||
<!-- XXX-TEMP this needs to move into an XBL binding for browser!!! -->
|
||||
|
||||
<popupset id="aHTMLTooltipSet">
|
||||
<popup id="aHTMLTooltip" class="tooltip" oncreate="return FillInHTMLTooltip(document.tooltipNode);" >
|
||||
<box id="HTML_TOOLTIP_tooltipBox" orient="vertical"/>
|
||||
</popup>
|
||||
</popupset>
|
||||
|
||||
<popupset>
|
||||
<popup id="backMenu" oncreate="BrowserBackMenu(event);" oncommand="gotoHistoryIndex(event);"/>
|
||||
<popup id="forwardMenu" oncreate="BrowserForwardMenu(event);" oncommand="gotoHistoryIndex(event);"/>
|
||||
</popupset>
|
||||
|
||||
<popupset>
|
||||
<popup id="contextual" oncreate="return fillContextMenu('contextual', 'innermostBox');" >
|
||||
<menu />
|
||||
</popup>
|
||||
|
||||
<!-- context menu -->
|
||||
<popupset id="contentAreaContextSet"/>
|
||||
|
||||
<!-- tooltips -->
|
||||
<popupset id="aTooltipSet"/>
|
||||
</popupset>
|
||||
|
||||
<!-- context menu -->
|
||||
<popupset id="contentAreaContextSet"/>
|
||||
|
||||
<script type="application/x-javascript">
|
||||
var gBookmarkPopup = null;
|
||||
</script>
|
||||
|
@ -135,12 +127,12 @@ Contributor(s): ______________________________________. -->
|
|||
<hbox id="nav-bar-buttons">
|
||||
<menubutton id="back-button" label="&backButton.label;" tooltiptext="&backButton.tooltip;"
|
||||
oncommand="gotoHistoryIndex(event);" buttonaction="BrowserBack();" context="backMenu"
|
||||
class="menubutton-dual toolbar top" crop="right" tooltip="aTooltip" observes="canGoBack">
|
||||
class="menubutton-dual top" crop="right" tooltip="aTooltip" observes="canGoBack">
|
||||
<menupopup context="" oncreate="BrowserBackMenu(event);"/>
|
||||
</menubutton>
|
||||
<menubutton id="forward-button" label="&forwardButton.label;" tooltiptext="&forwardButton.tooltip;"
|
||||
oncommand="gotoHistoryIndex(event);" buttonaction="BrowserForward();" context="forwardMenu"
|
||||
class="menubutton-dual toolbar top" crop="right" tooltip="aTooltip" observes="canGoForward">
|
||||
class="menubutton-dual top" crop="right" tooltip="aTooltip" observes="canGoForward">
|
||||
<menupopup context="" oncreate="BrowserForwardMenu(event);"/>
|
||||
</menubutton>
|
||||
|
||||
|
@ -155,10 +147,10 @@ Contributor(s): ______________________________________. -->
|
|||
<hbox autostretch="never" valign="middle" flex="1" id="urlbar-container">
|
||||
<image id="page-proxy-button" ondraggesture="nsDragAndDrop.startDrag(event, proxyIconDNDObserver);"/>
|
||||
<textbox autocomplete="true" timeout="300" class="plain"
|
||||
searchSessionType="urlbar" id="urlbar" tooltip="aTooltip" tooltiptext="&locationBar.tooltip;"
|
||||
onclick="if (event.button == 0) URLBarLeftClickHandler(event);"
|
||||
onblur="URLBarBlurHandler(event);"
|
||||
onkeypress="if( event.keyCode == 13 ) { addToUrlbarHistory(); BrowserLoadURL(); }" flex="1"/>
|
||||
searchSessionType="urlbar" id="urlbar" tooltip="aTooltip" tooltiptext="&locationBar.tooltip;"
|
||||
onclick="if (event.button == 0) URLBarLeftClickHandler(event);"
|
||||
onblur="URLBarBlurHandler(event);"
|
||||
onkeypress="if( event.keyCode == 13 ) { addToUrlbarHistory(); BrowserLoadURL(); }" flex="1"/>
|
||||
</hbox>
|
||||
<menubutton class="menubutton-icon" id="ubhist">
|
||||
<menupopup id="ubhist-popup" popupalign="topright" popupanchor="bottomright"
|
||||
|
@ -177,14 +169,14 @@ Contributor(s): ______________________________________. -->
|
|||
tooltip="aTooltip" tooltiptext="&searchButton.tooltip;"/>
|
||||
</hbox>
|
||||
|
||||
<menubutton class="menubutton-dual toolbar top" id="print-button" persist="hidden" label="&printButton.label;"
|
||||
<menubutton class="menubutton-dual top" id="print-button" persist="hidden" label="&printButton.label;"
|
||||
crop="right" buttonaction="BrowserPrint()" tooltip="aTooltip" tooltiptext="&printButton.tooltip;">
|
||||
<menupopup id="printMenu" popupalign="topright" popupanchor="bottomright">
|
||||
<menuitem label="&printCmd.label;" accesskey="&printCmd.accesskey;" oncommand="BrowserPrint()" default="true"/>
|
||||
</menupopup>
|
||||
</menubutton>
|
||||
|
||||
<hbox id="throbber-box" autostretch="never">
|
||||
<hbox autostretch="never">
|
||||
<button id="navigator-throbber" oncommand="goClickThrobber('browser.throbber.url')" tooltip="aTooltip" tooltiptext="&throbber.tooltip;"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
|
@ -225,10 +217,10 @@ Contributor(s): ______________________________________. -->
|
|||
</rule>
|
||||
</template>
|
||||
<menupopup>
|
||||
<menuitem accesskey="&addCurPageCmd.accesskey;"
|
||||
key="addBookmarkKb" observes="Browser:AddBookmark"/>
|
||||
<menuitem accesskey="&manBookmarksCmd.accesskey;"
|
||||
key="manBookmarkKb" observes="Browser:ManageBookmark"/>
|
||||
<menuitem label="&addCurPageCmd.label;" accesskey="&addCurPageCmd.accesskey;"
|
||||
key="addBookmarkKb" command="Browser:AddBookmark"/>
|
||||
<menuitem label="&manBookmarksCmd.label;" accesskey="&manBookmarksCmd.accesskey;"
|
||||
key="manBookmarkKb" command="Browser:ManageBookmark"/>
|
||||
<menuseparator/>
|
||||
</menupopup>
|
||||
</menubutton>
|
||||
|
@ -248,7 +240,7 @@ Contributor(s): ______________________________________. -->
|
|||
</rule>
|
||||
|
||||
<rule parent="hbox" rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
|
||||
<toolbarseparator/>
|
||||
<toolbarseparator uri="rdf:*"/>
|
||||
</rule>
|
||||
|
||||
<rule parent="hbox">
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
// 0.8, and the API has been modified. DO NOT MODIFY THIS FILE without
|
||||
// approval from ben@netscape.com, otherwise your changes will be lost.
|
||||
|
||||
var gRDFService = nsJSComponentManager.getService("@mozilla.org/rdf/rdf-service;1",
|
||||
"nsIRDFService");
|
||||
var gRDFService = Components.classes["@mozilla.org/rdf/rdf-service;1"]
|
||||
.getService(Components.interfaces.nsIRDFService);
|
||||
|
||||
function _RDF(aType)
|
||||
{
|
||||
|
@ -303,8 +303,8 @@ var homeButtonObserver = {
|
|||
onDrop: function (aEvent, aXferData, aDragSession)
|
||||
{
|
||||
var url = retrieveURLFromData(aXferData.data, aXferData.flavour.contentType);
|
||||
var commonDialogService = nsJSComponentManager.getService("@mozilla.org/appshell/commonDialogs;1",
|
||||
"nsICommonDialogs");
|
||||
var commonDialogService = Components.classes["@mozilla.org/appshell/commonDialogs;1"]
|
||||
.getService(Components.interfaces.nsICommonDialogs);
|
||||
var pressedVal = { };
|
||||
var promptTitle = gNavigatorBundle.getString("droponhometitle");
|
||||
var promptMsg = gNavigatorBundle.getString("droponhomemsg");
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://communicator/content/viewZoomOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://global/content/charsetOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://navigator/content/platformNavigationBindings.xul"?>
|
||||
|
||||
|
@ -42,19 +43,22 @@
|
|||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<!-- stringbundles, yay! -->
|
||||
<stringbundleset id="stringbundleset"/>
|
||||
<stringbundleset id="navStringBundles">
|
||||
<stringbundle id="bundle_viewZoom"/>
|
||||
</stringbundleset>
|
||||
|
||||
<!-- Keysets -->
|
||||
<keyset id="keyset">
|
||||
<keyset id="navKeys">
|
||||
<!-- File Menu -->
|
||||
<key id="key_newNavigator"/>
|
||||
<key id="key_newBlankPage"/>
|
||||
<key id="openBrowserKb" key="&openCmd.commandkey;" observes="Browser:Open" modifiers="accel"/>
|
||||
<key id="openFileKb" key="&openFileCmd.commandkey;" observes="Browser:OpenFile" modifiers="accel"/>
|
||||
<key id="key_savePage" key="&savePageCmd.commandkey;" observes="Browser:SavePage" modifiers="accel"/>
|
||||
<key id="key_editPage" key="&editPageCmd.commandkey;" observes="Browser:EditPage" modifiers="accel"/>
|
||||
<key id="printKb" key="&printCmd.commandkey;" observes="Browser:Print" modifiers="accel"/>
|
||||
<key id="focusURLBar" key="&openCmd.commandkey;" oncommand="ShowAndSelectContentsOfURLBar();"
|
||||
modifiers="accel"/>
|
||||
<key id="openLocationKb" key="&openCmd.commandkey;" command="Browser:Open" modifiers="accel,shift"/>
|
||||
<key id="openFileKb" key="&openFileCmd.commandkey;" command="Browser:OpenFile" modifiers="accel"/>
|
||||
<key id="key_savePage" key="&savePageCmd.commandkey;" command="Browser:SavePage" modifiers="accel"/>
|
||||
<key id="key_editPage" key="&editPageCmd.commandkey;" command="Browser:EditPage" modifiers="accel"/>
|
||||
<key id="printKb" key="&printCmd.commandkey;" command="Browser:Print" modifiers="accel"/>
|
||||
<key id="key_close"/>
|
||||
<key id="key_quit"/>
|
||||
|
||||
|
@ -69,107 +73,110 @@
|
|||
|
||||
<!-- View Menu -->
|
||||
<key id="key_reload" key="&reloadCmd.commandkey;" oncommand="BrowserReload();" modifiers="accel"/>
|
||||
<key id="key_reallyReload" key="&reloadCmd.commandkey;" oncommand="BrowserReloadSkipCache();" modifiers="accel,shift"/>
|
||||
<key id="key_viewSource" key="&pageSourceCmd.commandkey;" observes="View:PageSource" modifiers="accel"/>
|
||||
<key id="key_viewInfo" key="&pageInfoCmd.commandkey;" observes="View:PageInfo" modifiers="accel"/>
|
||||
<key key="&reloadCmd.commandkey;" oncommand="BrowserReloadSkipCache();" modifiers="accel,shift"/>
|
||||
<key id="key_viewSource" key="&pageSourceCmd.commandkey;" command="View:PageSource" modifiers="accel"/>
|
||||
<key id="key_viewInfo" key="&pageInfoCmd.commandkey;" command="View:PageInfo" modifiers="accel"/>
|
||||
|
||||
<!-- Search Menu -->
|
||||
<key id="key_find" key="&findOnCmd.commandkey;" observes="Browser:Find" modifiers="accel"/>
|
||||
<key id="key_findAgain" key="&findAgainCmd.commandkey;" observes="Browser:FindAgain" modifiers="accel"/>
|
||||
<key id="key_find" key="&findOnCmd.commandkey;" command="Browser:Find" modifiers="accel"/>
|
||||
<key id="key_findAgain" key="&findAgainCmd.commandkey;" command="Browser:FindAgain" modifiers="accel"/>
|
||||
|
||||
<!-- Go Menu -->
|
||||
|
||||
<!-- Bookmarks Menu -->
|
||||
<key id="addBookmarkKb" key="&addCurPageCmd.commandkey;" observes="Browser:AddBookmark" modifiers="accel"/>
|
||||
<key id="manBookmarkKb" key="&manBookmarksCmd.commandkey;" observes="Browser:ManageBookmark" modifiers="accel"/>
|
||||
|
||||
<!-- how to handle return, enter, tab, function keys, arrow keys, others? saari working on solution -->
|
||||
<key id="addBookmarkKb" key="&addCurPageCmd.commandkey;" command="Browser:AddBookmark" modifiers="accel"/>
|
||||
<key id="manBookmarkKb" key="&manBookmarksCmd.commandkey;" command="Browser:ManageBookmark" modifiers="accel"/>
|
||||
|
||||
<!-- Misc -->
|
||||
<key id="key_stop" keycode="VK_ESCAPE" oncommand="BrowserStop();"/>
|
||||
<!-- the amazing fishcam dept. -->
|
||||
<key id="key_fishcam" key="f" modifiers="control,alt" oncommand="window._content.location.href='http://home.netscape.com/fishcam/fishcam.html'"/>
|
||||
|
||||
<key key="f" modifiers="control,alt" oncommand="window._content.location.href='http://home.netscape.com/fishcam/fishcam.html'"/>
|
||||
<keyset id="viewZoomKeys"/>
|
||||
<keyset id="navigationKeys"/>
|
||||
<keyset id="tasksKeys"/>
|
||||
</keyset>
|
||||
|
||||
<!-- Broadcasters -->
|
||||
<broadcasterset id="broadcasterset">
|
||||
<!-- File Menu -->
|
||||
<broadcaster id="cmd_newNavigator"/>
|
||||
<broadcaster id="cmd_newEditor"/>
|
||||
<broadcaster id="cmd_newEditorTemplate"/>
|
||||
<broadcaster id="cmd_newEditorDraft"/>
|
||||
<broadcaster id="Browser:Open" label="&openCmd.label;" oncommand="BrowserOpenWindow();"/>
|
||||
<broadcaster id="Browser:OpenFile" label="&openFileCmd.label;" oncommand="BrowserOpenFileWindow();"/>
|
||||
<broadcaster id="cmd_close" oncommand="BrowserClose()"/>
|
||||
<broadcaster id="Browser:SavePage" label="&savePageCmd.label;" accesskey="&savePageCmd.accesskey;" oncommand="savePage();"/>
|
||||
<broadcaster id="Browser:EditPage" label="&editPageCmd.label;" oncommand="editPage(window._content.location.href,window, false);"/>
|
||||
<broadcaster id="Browser:PrintSetup" label="&printSetupCmd.label;" disabled ="true" oncommand="BrowserReload();"/>
|
||||
<broadcaster id="Browser:PrintPreview" label="&printPreviewCmd.label;" disabled="true" oncommand="BrowserReload();"/>
|
||||
<broadcaster id="Browser:Print" label="&printCmd.label;" oncommand="BrowserPrint();"/>
|
||||
<broadcaster id="cmd_quit"/>
|
||||
|
||||
<commandset id="navCommands">
|
||||
<command id="cmd_newNavigator"/>
|
||||
<command id="cmd_newEditor"/>
|
||||
<!-- NOT IMPLEMENTED
|
||||
<command id="cmd_newEditorTemplate"/>
|
||||
<command id="cmd_newEditorDraft"/>
|
||||
<command id="Browser:PrintSetup" disabled ="true" oncommand=""/>
|
||||
<command id="Browser:PrintPreview" disabled="true" oncommand=""/> -->
|
||||
<command id="Browser:OpenFile" oncommand="BrowserOpenFileWindow();"/>
|
||||
<command id="Browser:SavePage" oncommand="savePage();"/>
|
||||
<command id="Browser:EditPage" oncommand="editPage(window._content.location.href,window, false);"/>
|
||||
<command id="Browser:Open" oncommand="BrowserOpenWindow();"/>
|
||||
<command id="Browser:Print" oncommand="BrowserPrint();"/>
|
||||
<command id="cmd_quit"/>
|
||||
<command id="cmd_close" oncommand="BrowserClose()"/>
|
||||
|
||||
<!-- Edit Menu -->
|
||||
<broadcaster id="cmd_undo"/>
|
||||
<broadcaster id="cmd_redo"/>
|
||||
<broadcaster id="cmd_cut"/>
|
||||
<broadcaster id="cmd_copy"/>
|
||||
<broadcaster id="cmd_paste"/>
|
||||
<broadcaster id="cmd_delete"/>
|
||||
<broadcaster id="cmd_selectAll"/>
|
||||
<broadcaster id="cmd_preferences"/>
|
||||
<command id="cmd_undo"/>
|
||||
<command id="cmd_redo"/>
|
||||
<command id="cmd_cut"/>
|
||||
<command id="cmd_copy"/>
|
||||
<command id="cmd_paste"/>
|
||||
<command id="cmd_delete"/>
|
||||
<command id="cmd_selectAll"/>
|
||||
|
||||
<!-- View Menu -->
|
||||
<broadcaster id="cmd_viewnavbar" label="&navbarCmd.label;" accesskey="&navbarCmd.accesskey;" class="menuitem-iconic" type="checkbox" oncommand="goToggleToolbar( 'nav-bar','cmd_viewnavbar');" checked="true"/>
|
||||
<broadcaster id="cmd_viewpersonaltoolbar" label="&personalbarCmd.label;" accesskey="&personalbarCmd.accesskey;" class="menuitem-iconic" type="checkbox" oncommand="goToggleToolbar('PersonalToolbar','cmd_viewpersonaltoolbar');" checked="true"/>
|
||||
<broadcaster id="cmd_viewtaskbar" label="&taskbarCmd.label;" accesskey="&taskbarCmd.accesskey;" class="menuitem-iconic" type="checkbox" oncommand="goToggleToolbar('taskbar','cmd_viewtaskbar');" checked="true"/>
|
||||
|
||||
<broadcaster id="View:PageSource" oncommand="BrowserViewSource();"/>
|
||||
<broadcaster id="View:PageInfo" oncommand="BrowserPageInfo();"/>
|
||||
|
||||
<!-- Search Menu -->
|
||||
<broadcaster id="Browser:Find" label="&findOnCmd.label;" oncommand="BrowserFind();" />
|
||||
<broadcaster id="Browser:FindAgain" label="&findAgainCmd.label;" oncommand="BrowserFindAgain();" />
|
||||
<command id="View:PageSource" oncommand="BrowserViewSource();"/>
|
||||
<command id="View:PageInfo" oncommand="BrowserPageInfo();"/>
|
||||
|
||||
<!-- Search Menu -->
|
||||
<command id="Browser:Find" oncommand="BrowserFind();" />
|
||||
<command id="Browser:FindAgain" oncommand="BrowserFindAgain();" />
|
||||
|
||||
<!-- Go Menu -->
|
||||
<broadcaster id="canGoBack" disabled="true"/>
|
||||
<broadcaster id="canGoForward" disabled="true"/>
|
||||
<broadcaster id="Browser:Back" oncommand="BrowserBack();" observes="canGoBack"/>
|
||||
<broadcaster id="Browser:Forward" oncommand="BrowserForward();" observes="canGoForward"/>
|
||||
<broadcaster id="Browser:Home" oncommand="BrowserHome();"/>
|
||||
|
||||
<!-- Bookmarks Menu -->
|
||||
<broadcaster id="Browser:AddBookmark" label="&addCurPageCmd.label;"
|
||||
<command id="Browser:AddBookmark"
|
||||
oncommand="BookmarksUtils.addBookmarkForBrowser(document.getElementById('content').webNavigation);"/>
|
||||
<broadcaster id="Browser:ManageBookmark" label="&manBookmarksCmd.label;" oncommand="BrowserEditBookmarks();" />
|
||||
<command id="Browser:ManageBookmark" oncommand="BrowserEditBookmarks();" />
|
||||
|
||||
<!-- Go Menu -->
|
||||
<command id="Browser:Home" oncommand="BrowserHome();"/>
|
||||
<command id="Browser:Back" oncommand="BrowserBack();"/>
|
||||
<command id="Browser:Forward" oncommand="BrowserForward();"/>
|
||||
<commandset id="viewZoomCommands"/>
|
||||
<commandset id="tasksCommands"/>
|
||||
</commandset>
|
||||
|
||||
<broadcasterset id="navBroadcasters">
|
||||
<broadcaster id="canGoBack" disabled="true" command="Browser:Back"/>
|
||||
<broadcaster id="canGoForward" disabled="true" command="Browser:Forward"/>
|
||||
<broadcaster id="Communicator:WorkMode"/>
|
||||
<broadcaster id="cmd_viewnavbar" oncommand="goToggleToolbar( 'nav-bar','cmd_viewnavbar');" checked="true"/>
|
||||
<broadcaster id="cmd_viewpersonaltoolbar" oncommand="goToggleToolbar('PersonalToolbar','cmd_viewpersonaltoolbar');" checked="true"/>
|
||||
<broadcaster id="cmd_viewtaskbar" oncommand="goToggleToolbar('taskbar','cmd_viewtaskbar');" checked="true"/>
|
||||
|
||||
</broadcasterset>
|
||||
|
||||
|
||||
<!-- Menu -->
|
||||
<menubar id="main-menubar" class="chromeclass-menubar">
|
||||
<menu id="menu_File">
|
||||
<menupopup id="menu_FilePopup">
|
||||
<menuitem label="&browserCmd.label;" accesskey="&browserCmd.accesskey;" key="key_newNavigator" observes="cmd_newNavigator"/>
|
||||
<menuitem label="&browserCmd.label;" accesskey="&browserCmd.accesskey;" key="key_newNavigator" command="cmd_newNavigator"/>
|
||||
<menu id="menu_New">
|
||||
<menupopup id="menu_NewPopup">
|
||||
<!-- From globalOverlay.xul -->
|
||||
<menuitem id="menu_newNavigator" observes="cmd_newNavigator"/>
|
||||
<menuitem id="menu_newEditor" observes="cmd_newEditor"/>
|
||||
<menuitem id="menu_newNavigator" command="cmd_newNavigator"/>
|
||||
<menuitem id="menu_newEditor" command="cmd_newEditor"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menuitem accesskey="&openCmd.accesskey;" key="openBrowserKb" observes="Browser:Open"/>
|
||||
<menuitem accesskey="&openFileCmd.accesskey;" key="openFileKb" observes="Browser:OpenFile"/>
|
||||
<menuitem label="&openCmd.label;" accesskey="&openCmd.accesskey;" key="openLocationKb" command="Browser:Open"/>
|
||||
<menuitem label="&openFileCmd.label;" accesskey="&openFileCmd.accesskey;" key="openFileKb" command="Browser:OpenFile"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="menu_close"/>
|
||||
<menuitem id="menu_savepage" key="key_savePage" observes="Browser:SavePage"/>
|
||||
<menuitem label="&savePageCmd.label;" accesskey="&savePageCmd.accesskey;" key="key_savePage" command="Browser:SavePage"/>
|
||||
<menuitem id="savepage" label="&saveFrameCmd.label;" accesskey="&saveFrameCmd.accesskey;" oncommand="savePage(gFocusedURL);" hidden="true"/>
|
||||
<menuseparator id="file_moduleSeparator"/>
|
||||
<menuitem accesskey="&editPageCmd.accesskey;" key="key_editPage" observes="Browser:EditPage" />
|
||||
<menuseparator/>
|
||||
<menuitem accesskey="&printSetupCmd.accesskey;" observes="Browser:PrintSetup"/>
|
||||
<!-- <menuitem accesskey="&printPreviewCmd.accesskey;" observes="Browser:PrintPreview"/> -->
|
||||
<menuitem id="printMenuItem" accesskey="&printCmd.accesskey;" key="printKb" observes="Browser:Print"/>
|
||||
<menuitem label="&editPageCmd.label;" accesskey="&editPageCmd.accesskey;" key="key_editPage" command="Browser:EditPage" />
|
||||
<menuseparator/>
|
||||
<!-- NOT IMPLEMENTED
|
||||
<menuitem label="&printSetupCmd.label;" accesskey="&printSetupCmd.accesskey;" command="Browser:PrintSetup"/>
|
||||
<menuitem label="&printPreviewCmd.label;" accesskey="&printPreviewCmd.accesskey;" command="Browser:PrintPreview"/> -->
|
||||
<menuitem label="&printCmd.label;" accesskey="&printCmd.accesskey;" key="printKb" command="Browser:Print"/>
|
||||
<menuseparator />
|
||||
<menuitem id="offlineGoOfflineCmd"/>
|
||||
<menuseparator />
|
||||
|
@ -196,9 +203,9 @@
|
|||
<menupopup id="menu_View_Popup">
|
||||
<menu label="&toolbarsCmd.label;" accesskey="&toolbarsCmd.accesskey;" id="view_toolbars">
|
||||
<menupopup id="view_toolbars_popup">
|
||||
<menuitem observes="cmd_viewnavbar" />
|
||||
<menuitem observes="cmd_viewpersonaltoolbar" />
|
||||
<menuitem observes="cmd_viewtaskbar" />
|
||||
<menuitem label="&navbarCmd.label;" accesskey="&navbarCmd.accesskey;" class="menuitem-iconic" type="checkbox" observes="cmd_viewnavbar" />
|
||||
<menuitem label="&personalbarCmd.label;" accesskey="&personalbarCmd.accesskey;" class="menuitem-iconic" type="checkbox" observes="cmd_viewpersonaltoolbar" />
|
||||
<menuitem label="&taskbarCmd.label;" accesskey="&taskbarCmd.accesskey;" class="menuitem-iconic" type="checkbox" observes="cmd_viewtaskbar" />
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menuseparator />
|
||||
|
@ -212,12 +219,12 @@
|
|||
</menupopup>
|
||||
</menu>
|
||||
<menuseparator />
|
||||
<menuitem id="menuitem-reload" accesskey="&reloadCmd.accesskey;" key="key_reload" label="&reloadCmd.label;" oncommand="BrowserReload();"/>
|
||||
<menuitem accesskey="&reloadCmd.accesskey;" key="key_reload" label="&reloadCmd.label;" oncommand="BrowserReload();"/>
|
||||
<menuitem label="&showImagesCmd.label;" accesskey="&showImagesCmd.accesskey;" disabled="true" oncommand="BrowserReload();"/>
|
||||
<menuitem label="&stopCmd.label;" accesskey="&stopCmd.accesskey;" id="menuitem-stop" oncommand="BrowserStop();" key="key_stop"/>
|
||||
<menuseparator />
|
||||
<menuitem accesskey="&pageSourceCmd.accesskey;" label="&pageSourceCmd.label;" key="key_viewSource" observes="View:PageSource"/>
|
||||
<menuitem accesskey="&pageInfoCmd.accesskey;" label="&pageInfoCmd.label;" key="key_viewInfo" observes="View:PageInfo"/>
|
||||
<menuitem accesskey="&pageSourceCmd.accesskey;" label="&pageSourceCmd.label;" key="key_viewSource" command="View:PageSource"/>
|
||||
<menuitem accesskey="&pageInfoCmd.accesskey;" label="&pageInfoCmd.label;" key="key_viewInfo" command="View:PageInfo"/>
|
||||
<menuseparator />
|
||||
<menuitem accesskey="&translateMenu.accesskey;" label="&translateMenu.label;" oncommand="Translate();"/>
|
||||
<menu label="&webContentMenu.label;"
|
||||
|
@ -248,26 +255,26 @@
|
|||
|
||||
<menu id = "charsetMenu" />
|
||||
<menuseparator/>
|
||||
<menu id="menu_Themes" label="&applyTheme.label;"
|
||||
<menu label="&applyTheme.label;"
|
||||
accesskey="&applyTheme.accesskey;">
|
||||
<menupopup id="applyThemePopup" datasources="rdf:chrome" ref="urn:mozilla:skin:root" oncommand="applyTheme(event.target)">
|
||||
<menuitem id="themePrefs"
|
||||
oncommand="goPreferences('pref-themes.xul','chrome://communicator/content/pref/pref-themes.xul')" label="&themePreferencesCmd.label;" accesskey="&themePreferencesCmd.accesskey;"/>
|
||||
<menuitem id="getNewThemes" oncommand="getNewThemes();" label="&getNewThemesCmd.label;" accesskey="&getNewThemesCmd.accesskey;"/>
|
||||
<menuseparator/>
|
||||
<template>
|
||||
<menuitem uri="..." label="rdf:http://www.mozilla.org/rdf/chrome#displayName" name="rdf:http://www.mozilla.org/rdf/chrome#name"/>
|
||||
</template>
|
||||
</menupopup>
|
||||
</menu>
|
||||
</menupopup>
|
||||
<menupopup datasources="rdf:chrome" ref="urn:mozilla:skin:root" oncommand="applyTheme(event.target)">
|
||||
<menuitem label="&themePreferencesCmd.label;" accesskey="&themePreferencesCmd.accesskey;"
|
||||
oncommand="goPreferences('pref-themes.xul','chrome://communicator/content/pref/pref-themes.xul')"/>
|
||||
<menuitem label="&getNewThemesCmd.label;" accesskey="&getNewThemesCmd.accesskey;" oncommand="getNewThemes();"/>
|
||||
<menuseparator/>
|
||||
<template>
|
||||
<menuitem uri="..." label="rdf:http://www.mozilla.org/rdf/chrome#displayName" name="rdf:http://www.mozilla.org/rdf/chrome#name"/>
|
||||
</template>
|
||||
</menupopup>
|
||||
</menu>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
||||
<menu accesskey="&searchMenu.accesskey;" label="&searchMenu.label;">
|
||||
<menupopup id="searchMenu">
|
||||
<menuitem accesskey="&findOnCmd.accesskey;" key="key_find" observes="Browser:Find"/>
|
||||
<menuitem accesskey="&findAgainCmd.accesskey;" key="key_findAgain" observes="Browser:FindAgain"/>
|
||||
<menuseparator />
|
||||
<menupopup>
|
||||
<menuitem label="&findOnCmd.label;" accesskey="&findOnCmd.accesskey;" key="key_find" command="Browser:Find"/>
|
||||
<menuitem label="&findAgainCmd.label;" accesskey="&findAgainCmd.accesskey;" key="key_findAgain" command="Browser:FindAgain"/>
|
||||
<menuseparator />
|
||||
<menuitem label="&searchInternetCmd.label;" accesskey="&searchInternetCmd.accesskey;" oncommand="loadXURL('urn:clienturl:srchmenu:srchinternet');"/>
|
||||
<menuitem label="&searchBookmarksHistoryCmd.label;" accesskey="&searchBookmarksHistoryCmd.accesskey;" oncommand="window.openDialog('chrome://communicator/content/bookmarks/bm-find.xul', 'FindBookmarksWindow', 'dialog=no,close,chrome,resizable', 'bookmarks');"/>
|
||||
<menuseparator />
|
||||
|
@ -280,11 +287,11 @@ oncommand="goPreferences('pref-themes.xul','chrome://communicator/content/pref/p
|
|||
</menupopup>
|
||||
</menu>
|
||||
|
||||
<menu accesskey="&goMenu.accesskey;" id="gomenu" label="&goMenu.label;" oncommand="gotoHistoryIndex(event);">
|
||||
<menu accesskey="&goMenu.accesskey;" label="&goMenu.label;" oncommand="gotoHistoryIndex(event);">
|
||||
<menupopup oncreate="updateGoMenu(event);">
|
||||
<menuitem id="menuitem-back" label="&goBackCmd.label;" accesskey="&goBackCmd.accesskey;" observes="Browser:Back" key="goBackKb"/>
|
||||
<menuitem id="menuitem-forward" label="&goForwardCmd.label;" accesskey="&goForwardCmd.accesskey;" observes="Browser:Forward" key="goForwardKb"/>
|
||||
<menuitem id="menuitem-home" label="&goHomeCmd.label;" accesskey="&goHomeCmd.accesskey;" observes="Browser:Home" key="goHome"/>
|
||||
<menuitem label="&goBackCmd.label;" accesskey="&goBackCmd.accesskey;" observes="canGoBack" key="goBackKb"/>
|
||||
<menuitem label="&goForwardCmd.label;" accesskey="&goForwardCmd.accesskey;" observes="canGoForward" key="goForwardKb"/>
|
||||
<menuitem label="&goHomeCmd.label;" accesskey="&goHomeCmd.accesskey;" command="Browser:Home" key="goHome"/>
|
||||
<menuseparator hidden="true"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
@ -311,8 +318,8 @@ oncommand="goPreferences('pref-themes.xul','chrome://communicator/content/pref/p
|
|||
</rule>
|
||||
</template>
|
||||
<menupopup>
|
||||
<menuitem accesskey="&addCurPageCmd.accesskey;" key="addBookmarkKb" observes="Browser:AddBookmark"/>
|
||||
<menuitem accesskey="&manBookmarksCmd.accesskey;" key="manBookmarkKb" observes="Browser:ManageBookmark"/>
|
||||
<menuitem label="&addCurPageCmd.label;" accesskey="&addCurPageCmd.accesskey;" key="addBookmarkKb" command="Browser:AddBookmark"/>
|
||||
<menuitem label="&manBookmarksCmd.label;" accesskey="&manBookmarksCmd.accesskey;" key="manBookmarkKb" command="Browser:ManageBookmark"/>
|
||||
<menuseparator/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
-->
|
||||
|
||||
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?>
|
||||
<?xul-overlay href="chrome://navigator/content/navigatorOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
|
||||
|
||||
<!DOCTYPE window SYSTEM "chrome://navigator/locale/pageInfo.dtd">
|
||||
|
||||
|
@ -44,17 +44,8 @@
|
|||
|
||||
<script type="application/x-javascript" src="chrome://navigator/content/pageInfo.js"/>
|
||||
|
||||
<broadcasterset id="broadcasterset"/>
|
||||
|
||||
<commands id="commands">
|
||||
<commandset id="globalEditMenuItems"/>
|
||||
<commandset id="selectEditMenuItems"/>
|
||||
<commandset id="undoEditMenuItems"/>
|
||||
<commandset id="clipboardEditMenuItems"/>
|
||||
</commands>
|
||||
|
||||
<!-- keys are appended from the overlay -->
|
||||
<keyset id="keyset"/>
|
||||
<keyset id="dialogKeys"/>
|
||||
|
||||
<box id="cont" orient="vertical" flex="1">
|
||||
<text class="header label" value="&pageInfo.description;"/>
|
||||
|
|
|
@ -5,17 +5,17 @@
|
|||
<overlay id="platformNavigationBindings"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<keyset id="keyset">
|
||||
<keyset id="navigationKeys">
|
||||
<!-- proper arrow key navigation, 4.xP -->
|
||||
<key id="goBackKb" keycode="VK_LEFT" observes="Browser:Back" modifiers="alt"/>
|
||||
<key id="goForwardKb" keycode="VK_RIGHT" observes="Browser:Forward" modifiers="alt"/>
|
||||
<key id="goBackKb" keycode="VK_LEFT" observes="canGoBack" modifiers="alt"/>
|
||||
<key id="goForwardKb" keycode="VK_RIGHT" observes="canGoForward" modifiers="alt"/>
|
||||
|
||||
<!-- Some people apparently use this combination too on Unix...
|
||||
we live and learn. -->
|
||||
<key id="goBackKbWacko" key="&goBackCmd.commandKey;" observes="Browser:Back" modifiers="accel"/>
|
||||
<key id="goForwardKbWacko" key="&goForwardCmd.commandKey;" observes="Browser:Forward" modifiers="accel"/>
|
||||
<key key="&goBackCmd.commandKey;" observes="canGoBack" modifiers="accel"/>
|
||||
<key key="&goForwardCmd.commandKey;" observes="canGoForward" modifiers="accel"/>
|
||||
|
||||
<key id="goHome" keycode="VK_HOME" observes="Browser:Home" modifiers="alt"/>
|
||||
<key id="goHome" keycode="VK_HOME" command="Browser:Home" modifiers="alt"/>
|
||||
</keyset>
|
||||
|
||||
</overlay>
|
||||
|
|
|
@ -31,19 +31,12 @@
|
|||
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaDD.js"/>
|
||||
<script type="application/x-javascript" src="chrome://navigator/content/viewsource.js"/>
|
||||
|
||||
<broadcasterset id="broadcasterset"/>
|
||||
<commandset id="navCommands"/>
|
||||
|
||||
<stringbundleset id="stringbundleset"/>
|
||||
|
||||
<commands id="commands">
|
||||
<commandset id="globalEditMenuItems"/>
|
||||
<commandset id="selectEditMenuItems"/>
|
||||
<commandset id="undoEditMenuItems"/>
|
||||
<commandset id="clipboardEditMenuItems"/>
|
||||
</commands>
|
||||
<stringbundleset id="navStringBundles"/>
|
||||
|
||||
<!-- keys are appended from the overlay -->
|
||||
<keyset id="keyset"/>
|
||||
<keyset id="navKeys"/>
|
||||
|
||||
<!-- Menu -->
|
||||
|
||||
|
|
|
@ -3,22 +3,22 @@
|
|||
<overlay id="platformNavigationBindings"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<keyset id="keyset">
|
||||
<keyset id="navigationKeys">
|
||||
<!-- back and forward accelerators on Windows, strangely enough, are
|
||||
Alt+Left arrow and Alt+Right arrow. -->
|
||||
<key id="goBackKb" keycode="VK_LEFT" observes="Browser:Back" modifiers="alt"/>
|
||||
<key id="goForwardKb" keycode="VK_RIGHT" observes="Browser:Forward" modifiers="alt"/>
|
||||
<key id="goBackKb" keycode="VK_LEFT" observes="canGoBack" modifiers="alt"/>
|
||||
<key id="goForwardKb" keycode="VK_RIGHT" observes="canGoForward" modifiers="alt"/>
|
||||
|
||||
<!-- Supporting IE forward and back accelerators out of courtesy
|
||||
to transitioning IE users -->
|
||||
<key id="goBackKbIE" keycode="VK_BACK" observes="Browser:Back"/>
|
||||
<key id="goForwardKbIE" keycode="VK_BACK" observes="Browser:Forward" modifiers="shift"/>
|
||||
<key keycode="VK_BACK" observes="canGoBack"/>
|
||||
<key keycode="VK_BACK" observes="canGoForward" modifiers="shift"/>
|
||||
|
||||
<!-- Supporting IE 'refresh' shortcut key -->
|
||||
<key id="reloadIE" keycode="VK_F5" oncommand="BrowserReload();"/>
|
||||
<key id="forceReloadIE" keycode="VK_F5" modifiers="control" oncommand="BrowserReloadSkipCache();"/>
|
||||
<key keycode="VK_F5" oncommand="BrowserReload();"/>
|
||||
<key keycode="VK_F5" modifiers="control" oncommand="BrowserReloadSkipCache();"/>
|
||||
|
||||
<key id="goHome" keycode="VK_HOME" observes="Browser:Home" modifiers="alt"/>
|
||||
<key id="goHome" keycode="VK_HOME" command="Browser:Home" modifiers="alt"/>
|
||||
|
||||
</keyset>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче