Fix yet another font issue.
git-svn-id: svn://10.0.0.236/trunk@145805 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -124,7 +124,6 @@ function SetFields( aDataObject )
|
||||
|
||||
var screenResolution = document.getElementById( "screenResolution" );
|
||||
var resolution;
|
||||
|
||||
if( "fontDPI" in aDataObject )
|
||||
{
|
||||
resolution = aDataObject.fontDPI;
|
||||
@@ -206,47 +205,12 @@ function Startup()
|
||||
}
|
||||
|
||||
// Set up the labels for the standard issue resolutions
|
||||
var resolution;
|
||||
resolution = document.getElementById( "screenResolution" );
|
||||
var resolution = document.getElementById( "screenResolution" );
|
||||
|
||||
// Set an attribute on the selected resolution item so we can fall back on
|
||||
// it if an invalid selection is made (select "Other...", hit Cancel)
|
||||
resolution.selectedItem.setAttribute("current", "true");
|
||||
|
||||
var defaultResolution;
|
||||
var otherResolution;
|
||||
|
||||
// On OS/2, 120 is the default system resolution.
|
||||
// 96 is valid, but used only for for 640x480.
|
||||
if (navigator.appVersion.indexOf("OS/2") != -1)
|
||||
{
|
||||
defaultResolution = "120";
|
||||
otherResolution = "96";
|
||||
document.getElementById( "arbitraryResolution" ).setAttribute( "hidden", "true" );
|
||||
document.getElementById( "resolutionSeparator" ).setAttribute( "hidden", "true" );
|
||||
} else {
|
||||
defaultResolution = "96";
|
||||
otherResolution = "72";
|
||||
}
|
||||
|
||||
var dpi = resolution.getAttribute( "dpi" );
|
||||
resolution = document.getElementById( "defaultResolution" );
|
||||
resolution.setAttribute( "value", defaultResolution );
|
||||
resolution.setAttribute( "label", dpi.replace(/\$val/, defaultResolution ) );
|
||||
resolution = document.getElementById( "otherResolution" );
|
||||
resolution.setAttribute( "value", otherResolution );
|
||||
resolution.setAttribute( "label", dpi.replace(/\$val/, otherResolution ) );
|
||||
|
||||
// Get the pref and set up the dialog appropriately. Startup is called
|
||||
// after SetFields so we can't rely on that call to do the business.
|
||||
var prefvalue = gPrefWindow.getPref( "int", "browser.display.screen_resolution" );
|
||||
if( prefvalue != "!/!ERROR_UNDEFINED_PREF!/!" )
|
||||
resolution = prefvalue;
|
||||
else
|
||||
resolution = 96; // If it all goes horribly wrong, fall back on 96.
|
||||
|
||||
setResolution( resolution );
|
||||
|
||||
// This prefstring is a contrived pref whose sole purpose is to lock some
|
||||
// elements in this panel. The value of the pref is not used and does not matter.
|
||||
if ( gPrefWindow.getPrefIsLocked( "browser.display.languageList" ) ) {
|
||||
@@ -569,9 +533,7 @@ function changeScreenResolution()
|
||||
if (rv.newdpi != -1)
|
||||
{
|
||||
// They have entered values, and we have a DPI value back
|
||||
var dpi = screenResolution.getAttribute( "dpi" );
|
||||
setResolution ( rv.newdpi );
|
||||
|
||||
previousSelection.removeAttribute("current");
|
||||
screenResolution.selectedItem.setAttribute("current", "true");
|
||||
}
|
||||
|
||||
@@ -215,19 +215,32 @@
|
||||
oncommand="changeScreenResolution()"
|
||||
dpi="&resolution.dpival;">
|
||||
<menupopup>
|
||||
<menuitem value=""
|
||||
label="&resolution.dpival;"
|
||||
<menuitem
|
||||
#ifdef XP_OS2
|
||||
value="96"
|
||||
label="96 &resolution.dpi;"
|
||||
#else
|
||||
value="72"
|
||||
label="72 &resolution.dpi;"
|
||||
#endif
|
||||
id="otherResolution"/>
|
||||
<menuitem value=""
|
||||
label="&resolution.dpival;"
|
||||
<menuitem
|
||||
#ifdef XP_OS2
|
||||
value="120"
|
||||
label="120 &resolution.dpi;"
|
||||
#else
|
||||
value="96"
|
||||
label="96 &resolution.dpi;"
|
||||
#endif
|
||||
id="defaultResolution"/>
|
||||
<menuitem value="0"
|
||||
<menuitem value="0" hidden="true"
|
||||
label="&resolution.system.label;"
|
||||
id="systemResolution"
|
||||
hidden="true"/>
|
||||
<menuseparator id="resolutionSeparator"/>
|
||||
<menuitem id="userResolution" hidden="true"/>
|
||||
id="systemResolution"/>
|
||||
#ifndef XP_OS2
|
||||
<menuseparator/>
|
||||
<menuitem id="userResolution"/>
|
||||
<menuitem id="arbitraryResolution" value="other" label="&resolution.other;"/>
|
||||
#endif
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
|
||||
Reference in New Issue
Block a user