hyatt%netscape.com 2518cd7fad Fix for 32087, custom icon support in tabs and url bar. r=andreww, sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@107588 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 06:40:04 +00:00

144 lines
5.3 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;
]>
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
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", "useSiteIcons", "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;
}
}
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
var strbundle = document.getElementById("navigatorBundle");
var brandbundle = document.getElementById("brandBundle");
var dialogTitle = strbundle.getString("switchlanguagetitle");
var brandName = brandbundle.getString("brandShortName");
var msg = strbundle.getFormattedString("switchlanguage", [brandName]);
promptService.alert(window, dialogTitle, msg);
return true;
}
]]>
</script>
<hbox class="box-smallheader" title="&lHeader;"/>
<stringbundle id="navigatorBundle" src="chrome://navigator/locale/navigator.properties"/>
<stringbundle id="brandBundle" src="chrome://global/locale/brand.properties"/>
<groupbox id="generalStartupPreferences" align="start">
<caption label="&onStartLegend.label;"/>
<!-- XXX remove when navigator overlays.rdf works -->
<checkbox id="generalStartupBrowser"
label="&navCheck.label;" accesskey="&navCheck.accesskey;"
prefstring="general.startup.browser"/>
<!-- XXX -->
</groupbox>
<vbox class="box-padded" align="start">
<separator class="thin" />
<checkbox id="showHideTooltips" label="&showHideTooltips.label;"
accesskey="&showHideTooltips.accesskey;"
prefstring="browser.chrome.toolbar_tips"/>
<checkbox id="useSiteIcons" label="&useSiteIcons.label;"
accesskey="&useSiteIcons.accesskey;"
prefstring="browser.chrome.site_icons"/>
<separator/>
<description>&languageList.txt.label;</description>
<separator class="thin" />
<label value="&languageList.label;" control="languageList"/>
<separator class="thin" />
<menulist id="languageList"
preftype="localizedstring"
prefstring="general.useragent.locale"
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>
</page>