2006-04-08 00:57:21 +00:00
|
|
|
<?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.
|
2006-04-08 00:57:20 +00:00
|
|
|
|
2006-04-08 00:57:21 +00:00
|
|
|
Contributor(s): J. M. Betak <loadrunner@betak.net>
|
|
|
|
Josh Soref <timeless@mac.com>
|
|
|
|
-->
|
2006-04-08 00:57:20 +00:00
|
|
|
|
2006-04-08 00:57:21 +00:00
|
|
|
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
|
|
|
|
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
|
2006-04-08 00:57:20 +00:00
|
|
|
|
2006-04-08 00:57:21 +00:00
|
|
|
<!DOCTYPE window [
|
|
|
|
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
|
|
|
|
%brandDTD;
|
|
|
|
<!ENTITY % prefContentDTD SYSTEM "chrome://content-packs/locale/pref-contentpacks.dtd" >
|
|
|
|
%prefContentDTD;
|
|
|
|
]>
|
|
|
|
|
107642 - XUL syntax/cleanup landing. Fixes 94470, 96008, 96019, 76800, 102637, 80399, 108303, and removes over a thousand unnecessary or nonsensical attributes. Also fixes 108302, 102366, 102367, 105815. r=sspitzer,cmanske on appropriate parts sr=ben
2006-04-08 00:57:28 +00:00
|
|
|
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
2006-04-08 00:57:29 +00:00
|
|
|
onload="parent.initPanel('chrome://content-packs/content/pref-contentpacks.xul');"
|
|
|
|
headertitle="&lHeader;">
|
2006-04-08 00:57:21 +00:00
|
|
|
|
|
|
|
<stringbundle id="bundle_contentPack"
|
|
|
|
src="chrome://content-packs/locale/contentpacks.properties"/>
|
|
|
|
|
|
|
|
<stringbundle id="bundle_brand"
|
|
|
|
src="chrome://global/locale/brand.properties"/>
|
|
|
|
|
|
|
|
<script type="application/x-javascript">
|
|
|
|
<![CDATA[
|
|
|
|
var _elementIDs = ["contentPackTree"];
|
|
|
|
|
|
|
|
|
|
|
|
function Startup()
|
|
|
|
{
|
|
|
|
var tree = document.getElementById( "contentPackTree" );
|
|
|
|
var regionName = tree.getAttribute("prefvalue");
|
|
|
|
var elements = tree.getElementsByAttribute("value", regionName);
|
|
|
|
|
|
|
|
if (elements.length) {
|
|
|
|
tree.selectItem(elements[0].parentNode.parentNode);
|
|
|
|
} else {
|
|
|
|
tree.selectedIndex = 0;
|
|
|
|
}
|
|
|
|
parent.hPrefWindow.registerOKCallbackFunc( SwitchContentPack );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function SwitchContentPack()
|
|
|
|
{
|
2006-04-08 00:57:25 +00:00
|
|
|
var oldContentPack = parent.hPrefWindow.getPref( "localizedstring", "general.useragent.contentlocale");
|
2006-04-08 00:57:21 +00:00
|
|
|
var newContentPack;
|
|
|
|
|
|
|
|
try {
|
|
|
|
var tree = document.getElementById("contentPackTree");
|
|
|
|
if (tree) {
|
|
|
|
var selectedItem = tree.selectedItems.length ? tree.selectedItems[0] : null;
|
|
|
|
if (selectedItem) {
|
2006-04-08 00:57:30 +00:00
|
|
|
newContentPack = selectedItem.firstChild.firstChild.getAttribute("value");
|
2006-04-08 00:57:21 +00:00
|
|
|
}
|
|
|
|
} else {
|
2006-04-08 00:57:30 +00:00
|
|
|
newContentPack = parent.hPrefWindow.wsm.dataManager.getItemData( "chrome://communicator/content/pref/pref-content.xul", "contentPackTree" ).prefvalue;
|
2006-04-08 00:57:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (e) {}
|
|
|
|
|
|
|
|
if (newContentPack && (newContentPack != oldContentPack))
|
|
|
|
{
|
|
|
|
try {
|
2006-04-08 00:57:24 +00:00
|
|
|
var chromeRegistry = Components.classes["@mozilla.org/chrome/chrome-registry;1"].getService(Components.interfaces.nsIChromeRegistry);
|
2006-04-08 00:57:21 +00:00
|
|
|
chromeRegistry.selectLocale(newContentPack, true);
|
2006-04-08 00:57:24 +00:00
|
|
|
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
|
2006-04-08 00:57:27 +00:00
|
|
|
observerService.notifyObservers(null, "locale-selected", null);
|
2006-04-08 00:57:21 +00:00
|
|
|
var contentBundle = document.getElementById("bundle_contentPack");
|
|
|
|
var brandBundle = document.getElementById("bundle_brand");
|
|
|
|
var alertText = contentBundle.getString("contentAlert");
|
|
|
|
alertText = alertText.replace(/%brand%/g, brandBundle.getString("brandShortName"));
|
|
|
|
var titleText = contentBundle.GetStringFromName("languageTitle");
|
|
|
|
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
|
|
|
|
promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService)
|
|
|
|
promptService.alert(window, titleText, alertText);
|
|
|
|
}
|
|
|
|
catch(e) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function SelectContentPack()
|
|
|
|
{
|
|
|
|
var tree = document.getElementById("contentPackTree");
|
|
|
|
var selectedItem = tree.selectedItems.length ? tree.selectedItems[0] : null;
|
|
|
|
|
|
|
|
if (selectedItem) {
|
|
|
|
var regionName = selectedItem.firstChild.firstChild.getAttribute("value");
|
|
|
|
tree.setAttribute("prefvalue", regionName);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function DownloadRegionPacks()
|
|
|
|
{
|
2006-04-08 00:57:23 +00:00
|
|
|
openTopWin(xlateURL("urn:clienturl:viewmenu:intlwebcontent"));
|
2006-04-08 00:57:21 +00:00
|
|
|
}
|
|
|
|
]]>
|
|
|
|
</script>
|
|
|
|
|
107642 - XUL syntax/cleanup landing. Fixes 94470, 96008, 96019, 76800, 102637, 80399, 108303, and removes over a thousand unnecessary or nonsensical attributes. Also fixes 108302, 102366, 102367, 105815. r=sspitzer,cmanske on appropriate parts sr=ben
2006-04-08 00:57:28 +00:00
|
|
|
<hbox class="box-smallheader" title="&lHeader;"/>
|
2006-04-08 00:57:21 +00:00
|
|
|
|
107642 - XUL syntax/cleanup landing. Fixes 94470, 96008, 96019, 76800, 102637, 80399, 108303, and removes over a thousand unnecessary or nonsensical attributes. Also fixes 108302, 102366, 102367, 105815. r=sspitzer,cmanske on appropriate parts sr=ben
2006-04-08 00:57:28 +00:00
|
|
|
<description>&contentIntro.label;</description>
|
2006-04-08 00:57:21 +00:00
|
|
|
<separator class="thin"/>
|
107642 - XUL syntax/cleanup landing. Fixes 94470, 96008, 96019, 76800, 102637, 80399, 108303, and removes over a thousand unnecessary or nonsensical attributes. Also fixes 108302, 102366, 102367, 105815. r=sspitzer,cmanske on appropriate parts sr=ben
2006-04-08 00:57:28 +00:00
|
|
|
<description>&installedContentPacks.label;</description>
|
2006-04-08 00:57:21 +00:00
|
|
|
|
107642 - XUL syntax/cleanup landing. Fixes 94470, 96008, 96019, 76800, 102637, 80399, 108303, and removes over a thousand unnecessary or nonsensical attributes. Also fixes 108302, 102366, 102367, 105815. r=sspitzer,cmanske on appropriate parts sr=ben
2006-04-08 00:57:28 +00:00
|
|
|
<tree id="contentPackTree" flex="1" rows="5"
|
2006-04-08 00:57:21 +00:00
|
|
|
ref="urn:mozilla:locale:root" datasources="rdf:chrome"
|
|
|
|
sortResource="http://www.mozilla.org/rdf/chrome#name"
|
107642 - XUL syntax/cleanup landing. Fixes 94470, 96008, 96019, 76800, 102637, 80399, 108303, and removes over a thousand unnecessary or nonsensical attributes. Also fixes 108302, 102366, 102367, 105815. r=sspitzer,cmanske on appropriate parts sr=ben
2006-04-08 00:57:28 +00:00
|
|
|
preftype="localizedstring" prefstring="general.useragent.contentlocale"
|
2006-04-08 00:57:21 +00:00
|
|
|
prefvalue="" prefattribute="prefvalue" wsm_attributes="prefvalue"
|
|
|
|
multiple="false" onselect="SelectContentPack();"
|
|
|
|
sortDirection="ascending">
|
|
|
|
<treecolgroup>
|
|
|
|
<treecol flex="1"/>
|
|
|
|
</treecolgroup>
|
|
|
|
<template xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
|
|
|
|
<rule chrome:localeType="region">
|
|
|
|
<treechildren flex="1">
|
|
|
|
<treeitem id="treechildren" uri="..." translation="true" nselected="false" >
|
|
|
|
<treerow>
|
|
|
|
<treecell label="rdf:http://www.mozilla.org/rdf/chrome#displayName"
|
|
|
|
value="rdf:http://www.mozilla.org/rdf/chrome#name"/>
|
|
|
|
</treerow>
|
|
|
|
</treeitem>
|
|
|
|
</treechildren>
|
|
|
|
</rule>
|
|
|
|
</template>
|
|
|
|
</tree>
|
|
|
|
|
|
|
|
<separator class="thin"/>
|
|
|
|
|
2006-04-08 00:57:23 +00:00
|
|
|
<hbox>
|
2006-04-08 00:57:26 +00:00
|
|
|
<spacer flex="1"/>
|
2006-04-08 00:57:23 +00:00
|
|
|
<button id="downloadContentPacks"
|
|
|
|
label="&downloadContentPacks.label;"
|
|
|
|
accesskey="&downloadContentPacks.accesskey;"
|
|
|
|
oncommand="DownloadRegionPacks()"/>
|
|
|
|
</hbox>
|
107642 - XUL syntax/cleanup landing. Fixes 94470, 96008, 96019, 76800, 102637, 80399, 108303, and removes over a thousand unnecessary or nonsensical attributes. Also fixes 108302, 102366, 102367, 105815. r=sspitzer,cmanske on appropriate parts sr=ben
2006-04-08 00:57:28 +00:00
|
|
|
</page>
|
2006-04-08 00:57:21 +00:00
|
|
|
|