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

146 строки
5.5 KiB
Plaintext
Исходник Обычный вид История

1999-06-05 03:28:56 +04:00
<?xml version="1.0"?>
1999-08-10 06:48:56 +04:00
<!--
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):
-->
2006-05-17 06:24:52 +04:00
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/dialogOverlay.css" type="text/css"?>
1999-06-05 03:28:56 +04:00
<!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"
2006-05-17 06:24:52 +04:00
class="color-dialog"
orient="vertical"
onload="parent.initPanel(panel);">
1999-06-05 03:28:56 +04:00
<script type="application/x-javascript">
2006-05-17 06:24:52 +04:00
<![CDATA[
2006-05-17 06:26:11 +04:00
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( "localizedstring", "general.useragent.locale");
var newLangCode;
try {
var languageList = document.getElementById('languageList');
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(Components.interfaces.nsIChromeRegistry);
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
chromeRegistry.selectLocale(newLangCode, true);
observerService.notifyObservers(null, "locale-selected", null);
}
catch(e) {
return false;
}
}
return true;
}
2006-05-17 06:24:52 +04:00
]]>
</script>
<hbox class="box-smallheader" title="&lHeader;"/>
1999-06-05 03:28:56 +04:00
<groupbox id="generalStartupPreferences" orient="vertical" align="start">
<caption label="&onStartLegend.label;"/>
2006-05-17 06:24:52 +04:00
<!-- XXX remove when navigator overlays.rdf works -->
<checkbox id="generalStartupBrowser" wsm_persist="true"
label="&navCheck.label;" accesskey="&navCheck.accesskey;"
2006-05-17 06:24:52 +04:00
pref="true" preftype="bool" prefstring="general.startup.browser"
prefattribute="checked"/>
<!-- XXX -->
</groupbox>
2006-05-17 06:24:52 +04:00
<groupbox id="toolbarStyleBox" orient="vertical" style="display: none;">
<caption label="&showToolsLegend.label;"/>
<radiogroup id="toolbarStyle" orient="vertical" align="start"
2006-05-17 06:24:52 +04:00
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;"/>
2006-05-17 06:24:52 +04:00
</radiogroup>
</groupbox>
<vbox class="box-padded" align="start">
<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>