46803, XP keyboard accelerators for navigation.

This commit is contained in:
ben%netscape.com 2006-09-14 05:52:05 +00:00
Родитель 0332473383
Коммит 1e07460196
8 изменённых файлов: 67 добавлений и 12 удалений

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

@ -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>

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

@ -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,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,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>

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

@ -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,4 @@
<!ENTITY goBackCmd.commandkey "[">
<!ENTITY goForwardCmd.commandkey "]">