gecko-dev/suite/common/pref/pref-appearance.xul

150 строки
5.4 KiB
XML

<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
-->
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/dialogOverlay.css" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % prefAppearanceDTD SYSTEM "chrome://communicator/locale/pref/pref-appearance.dtd" >
%prefAppearanceDTD;
]>
<window xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="color-dialog"
orient="vertical"
onload="parent.initPanel(panel);">
<script type="application/x-javascript">
<![CDATA[
var panel = "chrome://communicator/content/pref/pref-appearance.xul";
// the first elements in this array will be poked from chromeregistry loaded
// overlays once overlays.rdf works properly
var _elementIDs = ["generalStartupBrowser", "showHideTooltips", "languageList"];
function Startup()
{
parent.hPrefWindow.registerOKCallbackFunc( switchUILanguage );
}
function switchUILanguage()
{
var oldLangCode = parent.hPrefWindow.getPref( "string", "general.useragent.locale");
var newLangCode;
try {
var languageList = document.getElementById('languageList');
var newLangCode = languageList ?
languageList.selectedItem.value :
parent.hPrefWindow.wsm.dataManager.getItemData( "chrome://communicator/content/pref/pref-appearance.xul", "languageList" ).value;
}
catch (e) {}
if (newLangCode != oldLangCode) {
try {
var chromeRegistry = Components.classes["@mozilla.org/chrome/chrome-registry;1"].getService();
if ( chromeRegistry )
chromeRegistry = chromeRegistry.QueryInterface( Components.interfaces.nsIChromeRegistry );
chromeRegistry.selectLocale(newLangCode, true);
}
catch(e) {
return false;
}
}
return true;
}
]]>
</script>
<box class="box-smallheader" title="&lHeader;"/>
<titledbox id="generalStartupPreferences" orient="vertical" autostretch="never">
<label value="&onStartLegend.label;"/>
<!-- XXX remove when navigator overlays.rdf works -->
<checkbox id="generalStartupBrowser" wsm_persist="true"
label="&navCheck.label;" accesskey="&navCheck.accesskey;"
pref="true" preftype="bool" prefstring="general.startup.browser"
prefattribute="checked"/>
<!-- XXX -->
</titledbox>
<!-- displaying none for beta -->
<titledbox id="toolbarStyleBox" orient="vertical" style="display: none;">
<label value="&showToolsLegend.label;"/>
<radiogroup id="toolbarStyle" orient="vertical" autostretch="never"
pref="true" preftype="int" prefstring="browser.chrome.toolbar_style"
prefattribute="value" wsm_persist="true">
<radio group="toolbarStyle" value="2" label="&picsNtextRadio.label;" accesskey="&picsNtextRadio.accesskey;"/>
<radio group="toolbarStyle" value="0" label="&picsOnlyRadio.label;" accesskey="&picsOnlyRadio.accesskey;"/>
<radio group="toolbarStyle" value="1" label="&textonlyRadio.label;" accesskey="&textonlyRadio.accesskey;"/>
</radiogroup>
</titledbox>
<vbox class="box-padded" autostretch="never">
<separator class="thin" />
<checkbox id="showHideTooltips" label="&showHideTooltips.label;"
accesskey="&showHideTooltips.accesskey;" pref="true"
preftype="bool" prefstring="browser.chrome.toolbar_tips"
prefattribute="checked"/>
<separator/>
<html>&languageList.txt.label;</html>
<separator class="thin" />
<text class="label" value="&languageList.label;" for="languageList"/>
<separator class="thin" />
<menulist id="languageList" class="small-margin"
pref="true" preftype="localizedstring"
prefstring="general.useragent.locale" prefattribute="value"
wsm_attributes="value"
datasources="rdf:chrome" ref="urn:mozilla:locale:root"
sortResource="http://www.mozilla.org/rdf/chrome#name"
sortDirection="ascending">
<template xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<rule chrome:localeType="region"/>
<rule>
<menupopup>
<menuitem
uri="..."
label="rdf:http://www.mozilla.org/rdf/chrome#displayName"
value="rdf:http://www.mozilla.org/rdf/chrome#name"/>
</menupopup>
</rule>
</template>
</menulist>
</vbox>
</window>