view -> text zoom -> other is geeky. remove it.
git-svn-id: svn://10.0.0.236/trunk@118520 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
76a777063b
commit
571a17b9b6
@ -128,9 +128,6 @@ function removePrefListener(observer)
|
||||
}
|
||||
|
||||
function ZoomManager() {
|
||||
// factorAnchor starts on factorOther
|
||||
this.factorOther = parseInt(gNavigatorBundle.getString("valueOther"));
|
||||
this.factorAnchor = this.factorOther;
|
||||
}
|
||||
|
||||
ZoomManager.prototype = {
|
||||
@ -149,7 +146,6 @@ ZoomManager.prototype = {
|
||||
zoomFactorsString : "", // cache
|
||||
zoomFactors : null,
|
||||
|
||||
factorOther : 300,
|
||||
factorAnchor : 300,
|
||||
steps : 0,
|
||||
|
||||
@ -157,12 +153,6 @@ ZoomManager.prototype = {
|
||||
var currentZoom;
|
||||
try {
|
||||
currentZoom = Math.round(getMarkupDocumentViewer().textZoom * 100);
|
||||
if (this.indexOf(currentZoom) == -1) {
|
||||
if (currentZoom != this.factorOther) {
|
||||
this.factorOther = currentZoom;
|
||||
this.factorAnchor = this.factorOther;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
currentZoom = 100;
|
||||
}
|
||||
@ -237,16 +227,6 @@ ZoomManager.prototype = {
|
||||
var insertIndex = -1;
|
||||
var stepFactor = parseFloat(gNavigatorBundle.getString("stepFactor"));
|
||||
|
||||
// temporarily add factorOther to list
|
||||
if (this.isZoomInRange(this.factorOther)) {
|
||||
insertIndex = 0;
|
||||
while (this.zoomFactors[insertIndex] < this.factorOther)
|
||||
++insertIndex;
|
||||
|
||||
if (this.zoomFactors[insertIndex] != this.factorOther)
|
||||
this.zoomFactors.splice(insertIndex, 0, this.factorOther);
|
||||
}
|
||||
|
||||
var factor;
|
||||
var done = false;
|
||||
|
||||
@ -272,8 +252,6 @@ ZoomManager.prototype = {
|
||||
factor = Math.round(factor);
|
||||
if (this.isZoomInRange(factor))
|
||||
factor = this.snap(factor);
|
||||
else
|
||||
this.factorOther = factor;
|
||||
}
|
||||
|
||||
if (insertIndex != -1)
|
||||
@ -1596,8 +1574,7 @@ function registerZoomManager()
|
||||
var parentMenu = textZoomMenu.parentNode;
|
||||
parentMenu.addEventListener("popupshowing", updateViewMenu, false);
|
||||
|
||||
var insertBefore = document.getElementById("menu_textZoomInsertBefore");
|
||||
var popup = insertBefore.parentNode;
|
||||
var popup = document.getElementById("menu_textZoomPopup");
|
||||
var accessKeys = gNavigatorBundle.getString("accessKeys").split(",");
|
||||
var zoomFactors = zoom.getZoomFactors();
|
||||
for (var i = 0; i < zoomFactors.length; ++i) {
|
||||
@ -1615,7 +1592,7 @@ function registerZoomManager()
|
||||
menuItem.setAttribute("accesskey", accessKeys[i]);
|
||||
menuItem.setAttribute("oncommand", "ZoomManager.prototype.getInstance().textZoom = this.value;");
|
||||
menuItem.setAttribute("value", zoomFactors[i]);
|
||||
popup.insertBefore(menuItem, insertBefore);
|
||||
popup.appendChild(menuItem);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1634,11 +1611,6 @@ function updateTextZoomMenu()
|
||||
|
||||
var currentZoom = zoom.textZoom;
|
||||
|
||||
var textZoomOther = document.getElementById("menu_textZoomOther");
|
||||
var label = gNavigatorBundle.getString("labelOther");
|
||||
textZoomOther.setAttribute("label", label.replace(/%zoom%/, zoom.factorOther));
|
||||
textZoomOther.setAttribute("value", zoom.factorOther);
|
||||
|
||||
var popup = document.getElementById("menu_textZoomPopup");
|
||||
var item = popup.firstChild;
|
||||
while (item) {
|
||||
@ -1652,17 +1624,6 @@ function updateTextZoomMenu()
|
||||
}
|
||||
}
|
||||
|
||||
function setTextZoomOther()
|
||||
{
|
||||
var zoom = ZoomManager.prototype.getInstance();
|
||||
|
||||
// open dialog and ask for new value
|
||||
var o = {value: zoom.factorOther, zoomMin: zoom.MIN, zoomMax: zoom.MAX};
|
||||
window.openDialog("chrome://communicator/content/askViewZoom.xul", "AskViewZoom", "chrome,modal,titlebar", o);
|
||||
if (o.zoomOK)
|
||||
zoom.textZoom = o.value;
|
||||
}
|
||||
|
||||
function toHistory()
|
||||
{
|
||||
openDialog("chrome://communicator/content/history/history.xul", "History",
|
||||
|
||||
@ -477,8 +477,6 @@ Contributor(s): ______________________________________. -->
|
||||
<menuitem key="key_textZoomReduce" label="&textZoomReduceCmd.label;" accesskey="&textZoomReduceCmd.accesskey;" command="cmd_textZoomReduce"/>
|
||||
<menuitem key="key_textZoomEnlarge" label="&textZoomEnlargeCmd.label;" accesskey="&textZoomEnlargeCmd.accesskey;" command="cmd_textZoomEnlarge"/>
|
||||
<menuseparator/>
|
||||
<menuseparator id="menu_textZoomInsertBefore"/>
|
||||
<menuitem id="menu_textZoomOther" type="radio" name="textZoom" accesskey="&textZoomOtherCmd.accesskey;" oncommand="setTextZoomOther();"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menu label="&charsetMenu.label;" accesskey="&charsetMenu.accesskey;" datasources="rdf:charset-menu" ref="NC:BrowserCharsetMenuRoot" oncommand="MultiplexHandler(event)"
|
||||
|
||||
@ -52,7 +52,6 @@ searchFor=Search %S for "%S"
|
||||
menuLabel=Text Zoom (%zoom% %)
|
||||
label=%zoom% %
|
||||
labelOriginal=%zoom% % (Original Size)
|
||||
labelOther=Other (%zoom% %) ...
|
||||
|
||||
# {values} must be greater than 0, include 100 and be in natural order
|
||||
# {accessKeys} correspond to {values}, where "z" matches the z in
|
||||
@ -61,10 +60,6 @@ labelOther=Other (%zoom% %) ...
|
||||
values=50,75,90,100,120,150,200
|
||||
accessKeys=5,7,9,z,1,0,2
|
||||
|
||||
# {valueOther} must be greater than the largest in values
|
||||
|
||||
valueOther=300
|
||||
|
||||
# {stepFactor} is the factor with which the zoom changes when you're
|
||||
# below the lowest or above the highest value in {values}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user