From ea3935322b792f5cd08a63feec9ad12bf166d99c Mon Sep 17 00:00:00 2001 From: "blakeross%telocity.com" Date: Sat, 9 Aug 2003 08:43:17 +0000 Subject: [PATCH] Fix yet another font issue. git-svn-id: svn://10.0.0.236/trunk@145805 18797224-902f-48f8-a5cc-f745e15eee43 --- .../prefwindow/content/pref-fonts.js | 40 +------------------ .../prefwindow/content/pref-fonts.xul | 31 +++++++++----- 2 files changed, 23 insertions(+), 48 deletions(-) diff --git a/mozilla/browser/components/prefwindow/content/pref-fonts.js b/mozilla/browser/components/prefwindow/content/pref-fonts.js index 46105bbbf3a..f55eced852b 100644 --- a/mozilla/browser/components/prefwindow/content/pref-fonts.js +++ b/mozilla/browser/components/prefwindow/content/pref-fonts.js @@ -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"); } diff --git a/mozilla/browser/components/prefwindow/content/pref-fonts.xul b/mozilla/browser/components/prefwindow/content/pref-fonts.xul index 93b9096610e..642f160a048 100644 --- a/mozilla/browser/components/prefwindow/content/pref-fonts.xul +++ b/mozilla/browser/components/prefwindow/content/pref-fonts.xul @@ -215,19 +215,32 @@ oncommand="changeScreenResolution()" dpi="&resolution.dpival;"> - - -