Better version of View -> Text Size submenu. bug=37940, r=mj@digicool.com, a=brendan

This commit is contained in:
disttsc%bart.nl 2000-09-15 06:59:30 +00:00
parent 13315c2869
commit fe966835a2
13 changed files with 600 additions and 102 deletions

View File

@ -49,6 +49,8 @@ CHROME_CONTENT = \
NetSupportConfirmCheckYN.xul \
pageInfo.xul \
pageInfo.js \
askViewZoom.xul \
askViewZoom.js \
viewSource.xul \
$(NULL)

View File

@ -17,3 +17,5 @@ nsContextMenu.js
navigatorDD.js
sessionHistoryUI.js
keywords.js
askViewZoom.xul
askViewZoom.js

View File

@ -0,0 +1,89 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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 this file as it was released upon
* September 7, 2000.
*
* The Initial Developer of the Original Code is Peter Annema.
* Portions created by Peter Annema are Copyright (C) 2000
* Peter Annema. All Rights Reserved.
*
* Contributor(s):
* Peter Annema <disttsc@bart.nl> (Original Author)
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License Version 2 or later (the
* "GPL"), in which case the provisions of the GPL are applicable
* instead of those above. If you wish to allow use of your
* version of this file only under the terms of the GPL and not to
* allow others to use your version of this file under the MPL,
* indicate your decision by deleting the provisions above and
* replace them with the notice and other provisions required by
* the GPL. If you do not delete the provisions above, a recipient
* may use your version of this file under either the MPL or the
* GPL.
*/
var dialog;
var retvals;
var zoomMin;
var zoomMax;
function onLoad() {
retvals = window.arguments[0].retvals;
zoomMin = window.arguments[0].zoomMin;
zoomMax = window.arguments[0].zoomMax;
dialog = new Object();
dialog.OKButton = document.getElementById("ok");
dialog.OKButton.setAttribute("disabled","true");
dialog.input = document.getElementById("zoomValue");
dialog.input.value = retvals.zoom;
dialog.input.select();
doEnabling();
retvals.zoomOK = false;
doSetOKCancel(onOK, onCancel);
}
function onOK() {
var zoom = parseInt(dialog.input.value);
if (!isNaN(zoom) && zoom >= zoomMin && zoom <= zoomMax) {
retvals.zoom = zoom;
retvals.zoomOK = true;
}
return retvals.zoomOK;
}
function onCancel() {
return true;
}
function doEnabling() {
var enable = false;
if (dialog.input.value!="") {
var zoom = parseInt(dialog.input.value);
if (!isNaN(zoom) && zoom >= zoomMin && zoom <= zoomMax)
enable = true;
}
if (enable) {
// enable OK
if (dialog.OKButton.getAttribute("disabled"))
dialog.OKButton.removeAttribute("disabled");
} else {
// disable OK
if (!dialog.OKButton.getAttribute("disabled"))
dialog.OKButton.setAttribute("disabled","true");
}
}

View File

@ -0,0 +1,67 @@
<?xml version="1.0"?> <!-- -*- Mode: HTML -*- -->
<!--
- The contents of this file are subject to the Mozilla 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/MPL/
-
- 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 this file as it was released on
- September 7, 2000.
-
- The Initial Developer of the Original Code is Peter Annema.
- Portions created by Peter Annema are Copyright (C) 2000
- Peter Annema. All Rights Reserved.
-
- Contributor(s):
- Peter Annema <disttsc@bart.nl> (Original Author)
-
- Alternatively, the contents of this file may be used under the
- terms of the GNU General Public License Version 2 or later (the
- "GPL"), in which case the provisions of the GPL are applicable
- instead of those above. If you wish to allow use of your
- version of this file only under the terms of the GPL and not to
- allow others to use your version of this file under the MPL,
- indicate your decision by deleting the provisions above and
- replace them with the notice and other provisions required by
- the GPL. If you do not delete the provisions above, a recipient
- may use your version of this file under either the MPL or the
- GPL.
-->
<?xml-stylesheet href="chrome://navigator/skin/navigator.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://navigator/locale/askViewZoom.dtd">
<window xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="askViewZoom"
onload="onLoad();"
title="&askViewZoom.title;"
debug="false"
class="dialog"
align="vertical"
persist="screenX screenY"
screenX="24" screenY="24">
<script type="text/javascript" src="chrome://navigator/content/askViewZoom.js"/>
<box orient="horizontal">
<text class="label" value="&selectZoom.label;"/>
</box>
<box orient="horizontal">
<textfield id="zoomValue" oninput="doEnabling();"/>
</box>
<box id="okCancelButtons"/>
<keyset id="keyset"/>
</window>

View File

@ -45,6 +45,8 @@ CHROME_CONTENT = \
.\NetSupportConfirmCheckYN.xul \
.\tooltip.js \
.\nsContextMenu.js \
.\askViewZoom.xul \
.\askViewZoom.js \
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@ -47,7 +47,6 @@ catch (ex)
var appCore = null;
var explicitURL = false;
var textZoom = 1.0;
// Stored Status, Link and Loading values
var defaultStatus = bundle.GetStringFromName( "defaultStatus" );
@ -1030,27 +1029,331 @@ function BrowserEditBookmarks()
}
}
function BrowserChangeTextZoom(aChange)
function initViewMenu()
{
if (appCore != null) {
textZoom += (aChange * 0.1);
if (textZoom < 0.1) {
textZoom = 0.1;
updateTextSizeMenuLabel();
}
{
var zoomFactors; // array with factors
var zoomAccessKeys; // array with access keys
var zoomFactor = 100; // start value
var zoomLevel;
var zoomStep;
var zoomOther;
var zoomAnchor;
var zoomSteps = 0;
var zoomMenuLabel;
var zoomLabel;
var zoomLabelOther;
var zoomLabelOriginal;
try {
zoomMenuLabel = bundle.GetStringFromName("textZoomMenuLabel");
} catch (exception) {
zoomMenuLabel = "Text Size (%zoom% %)"; // better suggestion?
}
try {
zoomLabel = bundle.GetStringFromName("textZoomLabel");
} catch (exception) {
zoomLabel = "%zoom% %"; // better suggestion?
}
try {
zoomLabelOther = bundle.GetStringFromName("textZoomLabelOther");
} catch (exception) {
zoomLabelOther = "%zoom% % ..."; // better suggestion?
}
try {
var zoomFactorsString = bundle.GetStringFromName("textZoomValues");
var zoomAccessKeysString = bundle.GetStringFromName("textZoomAccessKeys");
var zoomStepString = bundle.GetStringFromName("textZoomStepFactor");
zoomLabelOriginal = bundle.GetStringFromName("textZoomLabelOriginal");
zoomOther = bundle.GetStringFromName("textZoomValueOther");
zoomOther = parseInt(zoomOther);
zoomStep = parseFloat(zoomStepString);
zoomFactors = zoomFactorsString.split(",");
for (var i=0; i<zoomFactors.length; i++) {
zoomFactors[i] = parseInt(zoomFactors[i]);
if (zoomFactors[i] == 100) zoomLevel = i;
}
zoomAccessKeys = zoomAccessKeysString.split(",");
if (zoomAccessKeys.length != zoomFactors.length)
throw "Different amount of text zoom access keys and text zoom values";
} catch (e) {
zoomLabelOriginal = " (Original size)";
zoomFactors = [ 50, 75, 90, 100, 120, 150, 200 ];
zoomAccessKeys = [ "5", "7", "9", "z", "1", "0", "2" ];
zoomOther = 300;
zoomStep = 1.5;
zoomLevel = 3;
}
zoomAnchor = zoomOther;
}
function GetBrowserDocShell() {
var docShell = null;
var browserElement = document.getElementById("content");
if (browserElement) {
docShell = browserElement.boxObject.QueryInterface(Components.interfaces.nsIBrowserBoxObject).docShell;
} else {
dump("no browserElement found\n");
}
return docShell;
}
function setTextZoom() {
// dump("Level: "+zoomLevel+" Factor: "+zoomFactor+" Anchor: "+zoomAnchor+" Steps: "+zoomSteps+"\n");
if (appCore) {
appCore.setTextZoom(zoomFactor / 100.0);
}
/*
// bah, docShell.zoom doesn't work
var docShell = GetBrowserDocShell();
if (docShell) {
docShell.zoom = zoomFactor / 100.0;
}
*/
}
function initTextZoomMenu() {
var popup = document.getElementById("textZoomPopup");
var insertBefore = document.getElementById("textZoomInsertBefore");
if (!insertBefore || insertBefore.previousSibling.tagName != "menuseparator")
return; // nothing to be done
for (var i=0; i < zoomFactors.length; i++) {
var menuItem = document.createElement("menuitem");
menuItem.setAttribute("type", "radio");
menuItem.setAttribute("name", "textZoom");
var value;
if (zoomFactors[i] == 100) {
value = zoomLabelOriginal.replace(/%zoom%/, zoomFactors[i]);
} else {
value = zoomLabel.replace(/%zoom%/, zoomFactors[i]);
}
menuItem.setAttribute("value", value);
menuItem.setAttribute("accesskey", zoomAccessKeys[i]);
menuItem.setAttribute("oncommand","browserSetTextZoom(this.data);");
menuItem.setAttribute("data", zoomFactors[i].toString());
popup.insertBefore(menuItem, insertBefore);
}
updateTextZoomMenu();
updateTextZoomOtherMenu();
}
function isZoomLevelInRange(aZoomLevel) {
return aZoomLevel>=0 && aZoomLevel<=zoomFactors.length-1;
}
function isZoomFactorInRange(aZoomFactor) {
return aZoomFactor>=zoomFactors[0] && aZoomFactor<=zoomFactors[zoomFactors.length-1];
}
function findZoomLevel(aZoomFactor) {
var aZoomLevel = -1;
for (var i=0; i<zoomFactors.length && zoomFactors[i]<=aZoomFactor; i++) {
if (zoomFactors[i]==aZoomFactor) {
aZoomLevel = i;
}
}
return aZoomLevel;
}
function updateTextZoomMenu() {
var textZoomPopup = document.getElementById("textZoomPopup");
if (textZoomPopup) {
var item = textZoomPopup.firstChild;
var count = 0;
while (item) {
if (item.getAttribute("name")=="textZoom") {
if (count < zoomFactors.length) {
if (item.getAttribute("data") == zoomFactor) {
item.setAttribute("checked","true");
} else {
item.removeAttribute("checked");
}
} else {
if (!isZoomLevelInRange(zoomLevel)) {
item.setAttribute("checked","true");
} else {
item.removeAttribute("checked");
}
}
count++;
}
item = item.nextSibling;
}
appCore.setTextZoom(textZoom);
}
}
function BrowserChangeTextSize(newSize)
{
var oldSize = document.getElementById("menu_TextSize_Popup").getAttribute("oldsize");
var diff = (newSize - oldSize);
if (diff != 0) BrowserChangeTextZoom(diff);
document.getElementById("menu_TextSize_Popup").setAttribute("oldsize", newSize);
function updateTextZoomOtherMenu() {
var textZoomOther = document.getElementById("textZoomOther");
if (textZoomOther) {
textZoomOther.setAttribute("value", zoomLabelOther.replace(/%zoom%/, zoomOther));
}
}
function updateTextSizeMenuLabel() {
var textSizeMenu = document.getElementById("menu_TextZoom");
if (textSizeMenu) {
textSizeMenu.setAttribute("value", zoomMenuLabel.replace(/%zoom%/, zoomFactor));
}
}
function setTextZoomOther() {
// open dialog and ask for new value
var o = { retvals: {zoom: zoomOther}, zoomMin: 1, zoomMax: 5000 };
window.openDialog( "chrome://navigator/content/askViewZoom.xul", "", "chrome,modal,titlebar", o);
if (o.retvals.zoomOK) {
zoomOther = o.retvals.zoom;
zoomAnchor = zoomOther;
zoomSteps = 0;
browserSetTextZoom(zoomOther);
updateTextZoomMenu();
updateTextZoomOtherMenu();
}
}
function browserSetTextZoom(aZoomFactor) {
if (aZoomFactor < 1 || aZoomFactor > 5000)
return;
if (aZoomFactor == zoomFactor)
return;
zoomFactor = aZoomFactor;
if (isZoomFactorInRange(zoomFactor)) {
zoomLevel = findZoomLevel(zoomFactor);
} else {
zoomLevel = -1;
}
setTextZoom();
updateTextZoomMenu();
}
function textZoomSnap() {
zoomLevel = 0;
while (zoomFactors[zoomLevel]<zoomFactor) {
zoomLevel++;
}
if (zoomFactors[zoomLevel]!=zoomFactor) {
if ((zoomFactor-zoomFactors[zoomLevel])>(zoomFactors[zoomLevel+1]-zoomFactor)) {
zoomLevel++;
}
zoomFactor = zoomFactors[zoomLevel];
}
}
function enlargeTextZoom() {
if (isZoomLevelInRange(zoomLevel) || isZoomFactorInRange(zoomOther)) {
var insertLevel = -1;
if (isZoomFactorInRange(zoomOther)) { // add current zoom factor as step
insertLevel = 0;
while (zoomFactors[insertLevel]<zoomOther) {
insertLevel++;
}
if (zoomFactors[insertLevel] != zoomOther) {
zoomFactors.splice(insertLevel, 0, zoomOther);
if (!isZoomLevelInRange(zoomLevel)) {
zoomLevel = insertLevel;
} else if (zoomLevel >= insertLevel) {
zoomLevel++;
}
}
}
zoomLevel++;
if (zoomLevel==zoomFactors.length) {
zoomAnchor = zoomFactors[zoomFactors.length - 1];
zoomSteps = 1;
zoomFactor = Math.round(zoomAnchor * zoomStep);
zoomOther = zoomFactor;
} else {
zoomFactor = zoomFactors[zoomLevel];
}
if (insertLevel != -1) {
if (zoomLevel > insertLevel) {
zoomLevel--;
} else if (zoomLevel == insertLevel) {
zoomLevel = -1;
}
zoomFactors.splice(insertLevel, 1);
}
} else {
zoomSteps++;
zoomFactor = zoomAnchor * Math.pow(zoomStep,zoomSteps);
if (zoomFactor>5000) { // 5,000% zoom, get real
zoomSteps--;
zoomFactor = zoomAnchor * Math.pow(zoomStep,zoomSteps);
}
zoomFactor = Math.round(zoomFactor);
if (isZoomFactorInRange(zoomFactor)) {
textZoomSnap();
} else {
zoomOther = zoomFactor;
}
}
setTextZoom();
updateTextZoomMenu();
updateTextZoomOtherMenu();
}
function reduceTextZoom() {
if (isZoomLevelInRange(zoomLevel) || isZoomFactorInRange(zoomOther)) {
var insertLevel = -1;
if (isZoomFactorInRange(zoomOther)) { // add current zoom factor as step
insertLevel = 0;
while (zoomFactors[insertLevel]<zoomOther) {
insertLevel++;
}
if (zoomFactors[insertLevel] != zoomOther) {
zoomFactors.splice(insertLevel, 0, zoomOther);
if (!isZoomLevelInRange(zoomLevel)) {
zoomLevel = insertLevel;
} else if (zoomLevel >= insertLevel) {
zoomLevel++;
}
}
}
zoomLevel--;
if (zoomLevel==-1) {
zoomAnchor = zoomFactors[0];
zoomSteps = -1;
zoomFactor = Math.round(zoomAnchor / zoomStep);
zoomOther = zoomFactor;
} else {
zoomFactor = zoomFactors[zoomLevel];
}
if (insertLevel != -1) { // remove current zoom factor as step
if (zoomLevel > insertLevel) {
zoomLevel--;
} else if (zoomLevel == insertLevel) {
zoomLevel = -1;
}
zoomFactors.splice(insertLevel, 1);
}
} else {
zoomSteps--;
zoomFactor = zoomAnchor * Math.pow(zoomStep,zoomSteps);
if (zoomFactor<1) {
zoomSteps++;
zoomFactor = zoomAnchor * Math.pow(zoomStep,zoomSteps);
}
zoomFactor = Math.round(zoomFactor);
if (isZoomFactorInRange(zoomFactor)) {
textZoomSnap();
} else {
zoomOther = zoomFactor;
}
}
setTextZoom();
updateTextZoomMenu();
updateTextZoomOtherMenu();
}
function BrowserSetDefaultCharacterSet(aCharset)
{
if (appCore != null) {

View File

@ -1,23 +1,26 @@
<?xml version="1.0"?>
<!-- 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 Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s): Blake Ross <BlakeR1234@aol.com>. -->
- 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 Communicator client code, released
- March 31, 1998.
-
- The Initial Developer of the Original Code is Netscape
- Communications Corporation. Portions created by Netscape are
- Copyright (C) 1998-1999 Netscape Communications Corporation. All
- Rights Reserved.
-
- Contributor(s):
- Blake Ross <BlakeR1234@aol.com>
- Peter Annema <disttsc@bart.nl>
-->
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
@ -63,16 +66,10 @@ Contributor(s): Blake Ross <BlakeR1234@aol.com>. -->
<!-- View Menu -->
<key id="key_reload" xulkey="true" key="&reloadCmd.commandkey;" observes="canReload"/>
<!--
<key id="key_enlargeTextSize" xulkey="true"
key="&enlargeTextSizeCmd.commandkey;"
observes="Browser:EnlargeTextSize"/>
<key id="key_reduceTextSize" xulkey="true"
key="&reduceTextSizeCmd.commandkey;"
observes="Browser:ReduceTextSize"/>
-->
<key id="key_viewsource" xulkey="true" key="&pageSourceCmd.commandkey;" observes="View:PageSource"/>
<key id="key_textZoomReduce" xulkey="true" key="&textZoomReduceCmd.commandkey;" observes="cmd_viewTextZoomReduce" />
<key id="key_textZoomEnlarge" xulkey="true" key="&textZoomEnlargeCmd.commandkey;" observes="cmd_viewTextZoomEnlarge"/>
<!-- Search Menu -->
<key id="key_find" xulkey="true" key="&findOnCmd.commandkey;" observes="Browser:Find"/>
@ -83,7 +80,7 @@ Contributor(s): Blake Ross <BlakeR1234@aol.com>. -->
<!-- Tools Menu -->
<key id="key_gotoHistory" xulkey="true" shift="false" key="&history.commandKey;" onkeypress="toHistory();"/>
<!-- Bookmarks Menu -->
<key id="addBookmarkKb" xulkey="true" key="&addCurPageCmd.commandkey;" observes="Browser:AddBookmark" />
<key id="manBookmarkKb" xulkey="true" key="&manBookmarksCmd.commandkey;" observes="Browser:ManageBookmark" />
@ -102,6 +99,14 @@ Contributor(s): Blake Ross <BlakeR1234@aol.com>. -->
<broadcaster id="cmd_newEditor"/>
<broadcaster id="cmd_newEditorTemplate"/>
<broadcaster id="cmd_newEditorDraft"/>
<broadcaster id="Browser:Open" value="&openCmd.label;" oncommand="BrowserOpenWindow();"/>
<broadcaster id="Browser:OpenFile" value="&openFileCmd.label;" oncommand="BrowserOpenFileWindow();"/>
<broadcaster id="cmd_close" oncommand="BrowserClose()"/>
<broadcaster id="Browser:SavePage" value="&savePageCmd.label;" accesskey="&savePageCmd.accesskey;" oncommand="savePage();"/>
<broadcaster id="Browser:EditPage" value="&editPageCmd.label;" oncommand="BrowserEditPage(window._content.location.href);"/>
<broadcaster id="Browser:PrintSetup" value="&printSetupCmd.label;" disabled ="true" oncommand="BrowserReload();"/>
<broadcaster id="Browser:PrintPreview" value="&printPreviewCmd.label;" disabled="true" oncommand="BrowserReload();"/>
<broadcaster id="Browser:Print" value="&printCmd.label;" oncommand="BrowserPrint();"/>
<broadcaster id="cmd_quit"/>
<!-- Edit Menu -->
@ -117,19 +122,8 @@ Contributor(s): Blake Ross <BlakeR1234@aol.com>. -->
<broadcaster id="cmd_preferences"/>
<!-- View Menu -->
<broadcaster id="Browser:EnlargeTextSize"
oncommand="BrowserChangeTextZoom(1);"/>
<broadcaster id="Browser:ReduceTextSize"
oncommand="BrowserChangeTextZoom(-1);"/>
<broadcaster id="largestTextSizeCmd" value="&largestTextSizeCmd.label;"
accesskey="&largestTextSizeCmd.accesskey;" oncommand="BrowserChangeTextSize(5);"/>
<broadcaster id="largerTextSizeCmd" value="&largerTextSizeCmd.label;"
accesskey="&largerTextSizeCmd.accesskey;" oncommand="BrowserChangeTextSize(4);"/>
<broadcaster id="mediumTextSizeCmd" value="&mediumTextSizeCmd.label;"
accesskey="&mediumTextSizeCmd.accesskey;" oncommand="BrowserChangeTextSize(3);"/>
<broadcaster id="smallerTextSizeCmd" value="&smallerTextSizeCmd.label;"
accesskey="&smallerTextSizeCmd.accesskey;" oncommand="BrowserChangeTextSize(2);"/>
<broadcaster id="smallestTextSizeCmd" value="&smallestTextSizeCmd.label;" accesskey="&smallestTextSizeCmd.accesskey;" oncommand="BrowserChangeTextSize(1);"/>
<broadcaster id="cmd_viewTextZoomReduce" value="&textZoomReduceCmd.label;" oncommand="reduceTextZoom();"/>
<broadcaster id="cmd_viewTextZoomEnlarge" value="&textZoomEnlargeCmd.label;" oncommand="enlargeTextZoom();"/>
<broadcaster id="cmd_viewnavbar" type="checkbox" oncommand="goToggleToolbar( 'nav-bar','cmd_viewnavbar');" checked="true"/>
<broadcaster id="cmd_viewpersonaltoolbar" type="checkbox" oncommand="goToggleToolbar('PersonalToolbar','cmd_viewpersonaltoolbar');" checked="true"/>
<broadcaster id="cmd_viewtaskbar" type="checkbox" oncommand="goToggleToolbar('taskbar','cmd_viewtaskbar');" checked="true"/>
@ -139,32 +133,21 @@ Contributor(s): Blake Ross <BlakeR1234@aol.com>. -->
<broadcaster id="cmd_viewtaskbar" class="menuitem-iconic" type="checkbox" oncommand="goToggleToolbar('taskbar','cmd_viewtaskbar');" checked="true"/>
<broadcaster id="View:PageSource" value="&pageSourceCmd.label;" oncommand="BrowserViewSource();"/>
<broadcaster id="Browser:Open" value="&openCmd.label;" oncommand="BrowserOpenWindow();"/>
<broadcaster id="Browser:OpenFile" value="&openFileCmd.label;" oncommand="BrowserOpenFileWindow();"/>
<broadcaster id="cmd_close" oncommand="BrowserClose()"/>
<broadcaster id="Browser:EditPage" value="&editPageCmd.label;" oncommand="BrowserEditPage(window._content.location.href);"/>
<broadcaster id="Browser:PrintSetup" value="&printSetupCmd.label;" disabled ="true" oncommand="BrowserReload();"/>
<broadcaster id="Browser:PrintPreview" value="&printPreviewCmd.label;" disabled="true" oncommand="BrowserReload();"/>
<broadcaster id="Browser:Print" value="&printCmd.label;" oncommand="BrowserPrint();"/>
<!-- Search Menu -->
<broadcaster id="Browser:Find" value="&findOnCmd.label;" oncommand="BrowserFind();" />
<broadcaster id="Browser:FindAgain" value="&findAgainCmd.label;" oncommand="BrowserFindAgain();" />
<!-- Go Menu -->
<broadcaster id="canGoBack" disabled="true" buttonaction="BrowserBack();"/>
<broadcaster id="canGoForward" disabled="true" buttonaction="BrowserForward();"/>
<broadcaster id="Browser:Back" value="&goBackCmd.label;" oncommand="BrowserBack();" />
<broadcaster id="Browser:Forward" value="&goForwardCmd.label;" oncommand="BrowserForward();" />
<broadcaster id="Browser:Home" value="&goHomeCmd.label;" oncommand="BrowserHome();" />
<broadcaster id="Browser:Find" value="&findOnCmd.label;" oncommand="BrowserFind();" />
<broadcaster id="Browser:FindAgain" value="&findAgainCmd.label;" oncommand="BrowserFindAgain();" />
<!-- Bookmarks Menu -->
<broadcaster id="Browser:AddBookmark" value="&addCurPageCmd.label;" oncommand="BrowserAddBookmark(window._content.location.href,window._content.document.title);"/>
<broadcaster id="Browser:ManageBookmark" value="&manBookmarksCmd.label;" oncommand="BrowserEditBookmarks();" />
<broadcaster id="Browser:SavePage" value="&savePageCmd.label;" accesskey="&savePageCmd.accesskey;" oncommand="savePage();"/>
</broadcasterset>
@ -218,7 +201,7 @@ Contributor(s): Blake Ross <BlakeR1234@aol.com>. -->
</menu>
<menu id="menu_View" accesskey="&viewMenu.accesskey;" value="&viewMenu.label;">
<menupopup id="menu_View_Popup">
<menupopup id="menu_View_Popup" oncreate="initViewMenu()">
<menu value="&toolbarsCmd.label;" id="view_toolbars">
<menupopup id="view_toolbars_popup">
<menuitem value="&navbarCmd.label;" observes="cmd_viewnavbar" />
@ -227,16 +210,16 @@ Contributor(s): Blake Ross <BlakeR1234@aol.com>. -->
</menupopup>
</menu>
<menuseparator />
<menu id="menu_TextSize_Popup" value="&textSizeMenu.label;" accesskey="&textSizeMenu.accesskey;" oldsize="3">
<menupopup>
<menuitem type="radio" observes="largestTextSizeCmd"/>
<menuitem type="radio" observes="largerTextSizeCmd"/>
<menuitem type="radio" observes="mediumTextSizeCmd" checked="true"/>
<menuitem type="radio" observes="smallerTextSizeCmd"/>
<menuitem type="radio" observes="smallestTextSizeCmd"/>
</menupopup>
</menu>
<!-- key="key_reduceTextSize" -->
<menu id="menu_TextZoom" accesskey="&textZoomMenu.accesskey;">
<menupopup id="textZoomPopup" oncreate="initTextZoomMenu()">
<menuitem key="key_textZoomReduce" accesskey="&textZoomReduceCmd.accesskey;" observes="cmd_viewTextZoomReduce"/>
<menuitem key="key_textZoomEnlarge" accesskey="&textZoomEnlargeCmd.accesskey;" observes="cmd_viewTextZoomEnlarge"/>
<menuseparator/>
<!-- inserted from navigator.js -->
<menuseparator id="textZoomInsertBefore"/>
<menuitem id="textZoomOther" type="radio" name="textZoom" accesskey="&textZoomOtherCmd.accesskey;" oncommand="setTextZoomOther()"/>
</menupopup>
</menu>
<menu value="&useStyleSheetMenu.label;" disabled="false">
<menupopup oncreate="stylesheetFillPopup(window._content.document, this, document.getElementById('authssnoopt'))">
<menuitem value="&useStyleSheetNone.label;" id="authssnoopt" type="radio" name="authorstyle" oncommand="stylesheetSwitch(window._content.document, '')"/>

View File

@ -38,6 +38,7 @@ CHROME_L10N = \
pageInfo.dtd \
NetSupportConfirmCheckYN.dtd \
navigator.properties \
askViewZoom.dtd \
$(NULL)
# navigator.dtd \

View File

@ -5,3 +5,4 @@ viewSource.dtd
pageInfo.dtd
NetSupportConfirmCheckYN.dtd
navigator.properties
askViewZoom.dtd

View File

@ -0,0 +1,37 @@
<!--
- The contents of this file are subject to the Mozilla 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/MPL/
-
- 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 this file as it was released on
- September 7, 2000.
-
- The Initial Developer of the Original Code is Peter Annema.
- Portions created by Peter Annema are Copyright (C) 2000
- Peter Annema. All Rights Reserved.
-
- Contributor(s):
- Peter Annema <disttsc@bart.nl> (Original Author)
-
- Alternatively, the contents of this file may be used under the
- terms of the GNU General Public License Version 2 or later (the
- "GPL"), in which case the provisions of the GPL are applicable
- instead of those above. If you wish to allow use of your
- version of this file only under the terms of the GPL and not to
- allow others to use your version of this file under the MPL,
- indicate your decision by deleting the provisions above and
- replace them with the notice and other provisions required by
- the GPL. If you do not delete the provisions above, a recipient
- may use your version of this file under either the MPL or the
- GPL.
-->
<!-- hopefully this will become view zoom, not just text zoom -->
<!ENTITY askViewZoom.title "Text Zoom">
<!ENTITY selectZoom.label "Select text zoom (&#37;):">

View File

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

View File

@ -53,22 +53,18 @@
<!ENTITY navbarCmd.label "Navigation Toolbar">
<!ENTITY personalbarCmd.label "Personal Toolbar">
<!ENTITY taskbarCmd.label "Taskbar">
<!ENTITY enlargeTextSizeCmd.label "Enlarge Text Size">
<!ENTITY enlargeTextSizeCmd.commandkey "+">
<!ENTITY reduceTextSizeCmd.label "Reduce Text Size">
<!ENTITY reduceTextSizeCmd.commandkey "-">
<!ENTITY textSizeMenu.label "Text Size">
<!ENTITY textSizeMenu.accesskey "x">
<!ENTITY largestTextSizeCmd.label "Largest">
<!ENTITY largestTextSizeCmd.accesskey "g">
<!ENTITY largerTextSizeCmd.label "Larger">
<!ENTITY largerTextSizeCmd.accesskey "l">
<!ENTITY mediumTextSizeCmd.label "Medium">
<!ENTITY mediumTextSizeCmd.accesskey "m">
<!ENTITY smallerTextSizeCmd.label "Smaller">
<!ENTITY smallerTextSizeCmd.accesskey "s">
<!ENTITY smallestTextSizeCmd.label "Smallest">
<!ENTITY smallestTextSizeCmd.accesskey "a">
<!-- the command keys for Larger and Smaller were intended to be + and -, but see bug 52756 -->
<!ENTITY textZoomEnlargeCmd.label "Larger">
<!ENTITY textZoomEnlargeCmd.accesskey "l">
<!ENTITY textZoomEnlargeCmd.commandkey "k">
<!ENTITY textZoomReduceCmd.label "Smaller">
<!ENTITY textZoomReduceCmd.accesskey "m">
<!ENTITY textZoomReduceCmd.commandkey "j">
<!-- textZoomsee otherLabel in navigator.properties -->
<!ENTITY textZoomMenu.accesskey "z">
<!ENTITY textZoomOtherCmd.accesskey "o">
<!ENTITY useStyleSheetMenu.label "Use Stylesheet">
<!ENTITY useStyleSheetNone.label "None">
<!ENTITY reloadCmd.label "Reload">
@ -353,7 +349,7 @@
<!-- Statusbar -->
<!ENTITY statusText.label "Document: Done">
<!ENTITY buildId.label "Build ID: 2000082508">
<!ENTITY buildId.label "Build ID: 2000091312">
<!-- Context Menu -->
<!ENTITY blockImageCmd.label "Block Image from Loading">

View File

@ -19,6 +19,20 @@ droponhomemsg2=to be your new home page?
dontremindme=Always check when I drag an address to the Home button (This can also be set in the 'Navigator' category of Preferences)
droponhomeokbutton=Set Home Page
# navigator.js, font size submenu
#
# don't translate %zoom%
# textZoomValues must be in greater than 0, include 100 and be in natural order
# textZoomOtherValue must be greater than the largest in textZoomValues
textZoomMenuLabel=Text Size (%zoom% %)
textZoomValues=50,75,90,100,120,150,200
textZoomAccessKeys=5,7,9,z,1,0,2
textZoomStepFactor=1.5
textZoomLabel=%zoom% %
textZoomLabelOriginal=%zoom% % (Original size)
textZoomLabelOther=Other (%zoom% %) ...
textZoomValueOther=300
jserror=An error has occurred on this page. Double click here for details.
#