46803, XP keyboard accelerators for navigation.

This commit is contained in:
ben%netscape.com 2000-07-29 06:48:57 +00:00
Родитель c3d80b4970
Коммит ef8635cad4
17 изменённых файлов: 183 добавлений и 12 удалений

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

@ -812,6 +812,7 @@ sub MakeResourceAliases()
_MakeAlias(":mozilla:intl:uconv:src:charsetTitles.properties","$globalLocale");
_InstallResources(":mozilla:xpfe:browser:resources:content:MANIFEST", "$navigatorContent");
_InstallResources(":mozilla:xpfe:browser:resources:content:mac:MANIFEST", "$navigatorContent");
_InstallResources(":mozilla:xpfe:browser:resources:locale:en-US:MANIFEST", "$navigatorLocale", 0);
# find

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

@ -26,6 +26,8 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = unix
CHROME_DIR=packages/core
CHROME_CONTENT_DIR=navigator/content

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

@ -0,0 +1 @@
platformNavigationBindings.xul

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

@ -0,0 +1,13 @@
<?xml version="1.0"?>
<overlay id="platformNavigationBindings"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<keyset id="keyset">
<!-- proper arrow key navigation, 4.xP -->
<key id="goBackKb" xulkey="true" keycode="VK_LEFT" observes="Browser:Back"/>
<key id="goForwardKb" xulkey="true" keycode="VK_RIGHT" observes="Browser:Forward"/>
</keyset>
</overlay>

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

@ -21,6 +21,8 @@
DEPTH=..\..\..\..
DIRS= win
CHROME_DIR=packages\core
CHROME_CONTENT_DIR=navigator\content
@ -42,6 +44,8 @@ CHROME_CONTENT = \
.\NetSupportConfirmCheckYN.xul \
.\tooltip.js \
.\nsContextMenu.js \
.\personalToolbar.js \
.\personalToolbarOverlay.xul \
$(NULL)
include <$(DEPTH)\config\rules.mak>

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

@ -96,7 +96,6 @@ function savePage( url )
**/
function getContentAreaFrameCount()
{
dump("*** check number of frames in content area \n");
var saveFrameItem = document.getElementById("savepage");
if (!window._content.frames.length ||
!isDocumentFrame(document.commandDispatcher.focusedWindow))
@ -924,7 +923,7 @@ function RevealSearchPanel()
fp.appendFilters(nsIFilePicker.filterHTML | nsIFilePicker.filterText |
nsIFilePicker.filterAll | nsIFilePicker.filterImages | nsIFilePicker.filterXML);
if (fp.show() == nsIFilePicker.returnOK) {
openNewWindowWith(fp.fileURL.spec);
openTopWin(fp.fileURL.spec);
}
} catch (ex) { }
}
@ -1153,10 +1152,10 @@ function BrowserEditBookmarks()
try {
appCore.loadUrl(gURLBar.value);
window._content.focus();
}
catch(e) {
}
window._content.focus();
}
function readFromClipboard()

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

@ -42,8 +42,6 @@ var RDFUtils = {
getTarget: function(aDS, aSourceID, aPropertyID)
{
dump("*** aSourceID = " + aSourceID + "\n");
dump("*** aPropertyID = " + aPropertyID + "\n");
var source = this.getResource(aSourceID);
var property = this.getResource(aPropertyID);
return aDS.GetTarget(source, property, true);
@ -249,6 +247,7 @@ var contentAreaDNDObserver = {
getSupportedFlavours: function ()
{
dump("*** get supported flavours\n");
var flavourList = { };
//flavourList["moz/toolbaritem"] = { width: 2 };
flavourList["text/unicode"] = { width: 2, iid: "nsISupportsWString" };

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

@ -22,6 +22,7 @@ Contributor(s): ______________________________________. -->
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
<?xul-overlay href="chrome://global/content/charsetOverlay.xul"?>
<?xul-overlay href="chrome://navigator/content/platformNavigationBindings.xul"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
@ -71,10 +72,13 @@ Contributor(s): ______________________________________. -->
<key id="key_savePage" xulkey="true" key="&savePageCmd.commandkey;" observes="Browser:SavePage"/>
<key id="goForwardKb" xulkey="true" key="&goForwardCmd.commandkey;" observes="Browser:Forward" />
<key id="goBackKb" xulkey="true" key="&goBackCmd.commandkey;" observes="Browser:Back" />
<key id="goHomeKb" xulkey="true" key="&goHomeCmd.commandkey;" observes="Browser:Home" />
<key id="goHomeKb" alt="true" keycode="VK_HOME" observes="Browser:Home" />
<key id="key_gotoHistory" xulkey="true" shift="false" key="&history.commandKey;" onkeypress="toHistory();"/>
<key id="stop" keycode="VK_ESCAPE" onkeypress="BrowserStop();"/>
<key id="addBookmarkKb" xulkey="true" key="&addCurPageCmd.commandkey;" observes="Browser:AddBookmark" />
<key id="manBookmarkKb" xulkey="true" key="&manBookmarksCmd.commandkey;" observes="Browser:ManageBookmark" />

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

@ -0,0 +1,37 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
CHROME_DIR=packages/core
CHROME_CONTENT_DIR=navigator/content
CHROME_CONTENT = \
platformNavigationBindings.xul \
$(NULL)
include $(topsrcdir)/config/rules.mk

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

@ -0,0 +1,19 @@
<?xml version="1.0"?>
<!DOCTYPE window SYSTEM "chrome://navigator/locale/platformNavigationBindings.dtd">
<overlay id="platformNavigationBindings"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<keyset id="keyset">
<!-- proper arrow key navigation, 4.xP -->
<key id="goBackKb" xulkey="true" keycode="VK_LEFT" observes="Browser:Back"/>
<key id="goForwardKb" xulkey="true" keycode="VK_RIGHT" observes="Browser:Forward"/>
<!-- Some people apparently use this combination too on Unix...
we live and learn. -->
<key id="goBackKbWacko" xulkey="true" key="&goForwardCmd.commandKey;" observes="Browser:Back"/>
<key id="goForwardKbWacko" xulkey="true" key="&goBackCmd.commandKey;" observes="Browser:Forward"/>
</keyset>
</overlay>

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

@ -0,0 +1,32 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH=..\..\..\..\..
CHROME_DIR=packages\core
CHROME_CONTENT_DIR=navigator\content
CHROME_CONTENT = \
.\platformNavigationBindings.xul \
$(NULL)
include <$(DEPTH)\config\rules.mak>

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

@ -0,0 +1,19 @@
<?xml version="1.0"?>
<overlay id="platformNavigationBindings"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<keyset id="keyset">
<!-- back and forward accelerators on Windows, strangely enough, are
Alt+Left arrow and Alt+Right arrow. -->
<key id="goBackKb" alt="true" keycode="VK_LEFT" observes="Browser:Back"/>
<key id="goForwardKb" alt="true" keycode="VK_RIGHT" observes="Browser:Forward"/>
<!-- Supporting IE forward and back accelerators out of courtesy
to transitioning IE users -->
<key id="goBackKbIE" shift="false" keycode="VK_BACK" observes="Browser:Back"/>
<key id="goForwardKbIE" shift="true" keycode="VK_BACK" observes="Browser:Forward"/>
</keyset>
</overlay>

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

@ -26,6 +26,8 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = unix
CHROME_DIR=locales/en-US
CHROME_L10N_DIR=navigator/locale

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

@ -31,6 +31,7 @@ CHROME_L10N = \
.\navigator.dtd \
.\NetSupportConfirmCheckYN.dtd \
.\navigator.properties \
.\personalToolbarOverlay.dtd \
$(NULL)

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

@ -157,13 +157,11 @@
<!ENTITY goMenu.accesskey "g">
<!ENTITY goBackCmd.label "Back">
<!ENTITY goBackCmd.accesskey "b">
<!ENTITY goBackCmd.commandkey "[">
<!ENTITY goForwardCmd.label "Forward">
<!ENTITY goForwardCmd.accesskey "f">
<!ENTITY goForwardCmd.commandkey "]">
<!ENTITY goHomeCmd.label "Home">
<!ENTITY goHomeCmd.accesskey "h">
<!ENTITY goHomeCmd.commandkey "h">
<!ENTITY history.commandKey "h">
<!ENTITY bookmarksMenu.label "Bookmarks">

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

@ -0,0 +1,36 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
CHROME_DIR=locales/en-US
CHROME_L10N_DIR=navigator/locale
CHROME_L10N = \
platformNavigationBindings.dtd \
include $(topsrcdir)/config/rules.mk

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

@ -0,0 +1,4 @@
<!ENTITY goBackCmd.commandkey "[">
<!ENTITY goForwardCmd.commandkey "]">