Remove DPI preference UI from Thunderbird. b=326329 r=mscott

This commit is contained in:
dbaron%dbaron.org 2006-02-09 19:09:23 +00:00
Родитель 52822535eb
Коммит 59e02f2910
3 изменённых файлов: 0 добавлений и 112 удалений

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

@ -140,83 +140,5 @@ var gFontsDialog = {
{
var useDocumentFonts = document.getElementById("useDocumentFonts");
return useDocumentFonts.checked ? 1 : 0;
},
readScreenResolution: function ()
{
// Initialize the display names of the default values the first time
// the preference is read. We can NOT do this in the init function since
// that is called after preference loading.
var defaultResolution = document.getElementById("defaultResolution");
if (defaultResolution.label == "") {
var bundlePreferences = document.getElementById("bundlePreferences");
var otherResolution = document.getElementById("otherResolution");
otherResolution.label = bundlePreferences.getFormattedString("fontScalingResolutionFormat",
[otherResolution.getAttribute("value")]);
defaultResolution.label = bundlePreferences.getFormattedString("fontScalingResolutionFormat",
[defaultResolution.getAttribute("value")]);
}
return undefined;
},
changeScreenResolution: function (aMenulist)
{
var userResolution = document.getElementById("userResolution");
var screenResolution = document.getElementById("screenResolution");
var lastSelected = screenResolution.getElementsByAttribute("lastSelected", "true")
if (lastSelected.length > 0)
lastSelected = lastSelected[0];
else {
var preference = document.getElementById("browser.display.screen_resolution");
lastSelected = screenResolution.getElementsByAttribute("value", preference.value);
if (lastSelected.length > 0)
lastSelected = lastSelected[0];
else
lastSelected = document.getElementById("defaultResolution");
}
if (aMenulist.selectedItem.value == "choose") {
var rv = { newdpi: -1 };
document.documentElement.openSubDialog("chrome://mozapps/content/preferences/fontscaling.xul",
"", rv);
if (rv.newdpi != -1) {
this._setResolution(rv.newdpi);
lastSelected.removeAttribute("lastSelected");
screenResolution.selectedItem.setAttribute("lastSelected", "true");
}
else
screenResolution.selectedItem = lastSelected;
}
else if (!(screenResolution.value == userResolution.value)) {
// User has selected one of the hard-coded resolutions
userResolution.hidden = true;
lastSelected.removeAttribute("lastSelected");
screenResolution.selectedItem.setAttribute("lastSelected", "true");
}
},
_setResolution: function (aResolution)
{
// Given a number, if it's equal to a hard-coded resolution we use that,
// otherwise we set the userResolution field.
var screenResolution = document.getElementById("screenResolution");
var userResolution = document.getElementById("userResolution");
var items = screenResolution.getElementsByAttribute("value", aResolution);
if (items[0]) {
// If it's one of the hard-coded values, we'll select it directly
screenResolution.selectedItem = items[0];
userResolution.hidden = true;
}
else {
// Otherwise we need to set up the userResolution field
var bundlePreferences = document.getElementById("bundlePreferences");
var label = bundlePreferences.getFormattedString("fontScalingResolutionFormat",
[aResolution]);
userResolution.value = aResolution;
userResolution.label = label;
userResolution.hidden = false;
screenResolution.selectedItem = userResolution;
}
}
};

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

@ -63,9 +63,6 @@
<preferences id="fontPreferences">
<preference id="font.language.group" name="font.language.group" type="wstring"/>
<preference id="browser.display.screen_resolution"
name="browser.display.screen_resolution"
type="int"/>
<preference id="browser.display.use_document_fonts"
name="browser.display.use_document_fonts"
type="int"/>
@ -239,27 +236,6 @@
<separator class="thin"/>
<hbox flex="1">
<hbox align="center" pack="end">
<label accesskey="&resolution.accesskey;" control="screenResolution">&resolution.label;</label>
<menulist id="screenResolution"
oncommand="gFontsDialog.changeScreenResolution(this)"
preference="browser.display.screen_resolution"
onsyncfrompreference="return gFontsDialog.readScreenResolution();">
<menupopup>
<menuitem id="otherResolution" value="72"/>
<menuitem id="defaultResolution" value="96"/>
#ifdef XP_UNIX
#ifndef XP_MACOSX
<menuitem id="systemResolution" value="0" label="&resolution.system.label;"/>
#endif
#endif
<menuseparator id="resolutionSeparator"/>
<menuitem id="userResolution" hidden="true"/>
<menuitem id="chooseUserResolution" value="choose" label="&resolution.other;"/>
</menupopup>
</menulist>
</hbox>
<spacer flex="1"/>
<hbox align="center" pack="end">
<label accesskey="&minSize.accesskey;" control="minSize">&minSize.label;</label>

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

@ -62,13 +62,3 @@
<!ENTITY useDocumentFonts.label "Allow messages to use other fonts">
<!ENTITY useDocumentFonts.accesskey "o">
<!-- font scaling -->
<!ENTITY resolution.label "Display resolution:">
<!ENTITY resolution.accesskey "r">
<!-- LOCALIZATION NOTE (resolution.dpi): dpi stands for "dots per inch" -->
<!ENTITY resolution.dpi "dpi">
<!-- LOCALIZATION NOTE (resolution.dpi): $val will be replaced by a numeric dpi value. -->
<!ENTITY resolution.dpival "$val &resolution.dpi;">
<!ENTITY resolution.system.label "System setting">
<!ENTITY resolution.other "Other...">