r=mkaply, a=mkaply
Get fonts working again on OS/2 Firebird
This commit is contained in:
mkaply%us.ibm.com 2003-11-19 20:38:06 +00:00
Родитель 23f475e78d
Коммит 051f34c626
2 изменённых файлов: 43 добавлений и 22 удалений

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

@ -211,6 +211,40 @@ function Startup()
// 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" ) ) {

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

@ -217,32 +217,19 @@
oncommand="changeScreenResolution()"
dpi="&resolution.dpival;">
<menupopup>
<menuitem
#ifdef XP_OS2
value="96"
label="96 &resolution.dpi;"
#else
value="72"
label="72 &resolution.dpi;"
#endif
<menuitem value=""
label="&resolution.dpival;"
id="otherResolution"/>
<menuitem
#ifdef XP_OS2
value="120"
label="120 &resolution.dpi;"
#else
value="96"
label="96 &resolution.dpi;"
#endif
<menuitem value=""
label="&resolution.dpival;"
id="defaultResolution"/>
<menuitem value="0" hidden="true"
<menuitem value="0"
label="&resolution.system.label;"
id="systemResolution"/>
#ifndef XP_OS2
<menuseparator/>
<menuitem id="userResolution"/>
id="systemResolution"
hidden="true"/>
<menuseparator id="resolutionSeparator"/>
<menuitem id="userResolution" hidden="true"/>
<menuitem id="arbitraryResolution" value="other" label="&resolution.other;"/>
#endif
</menupopup>
</menulist>
</hbox>