зеркало из https://github.com/mozilla/gecko-dev.git
bug 65253, r=timeless, sr=ben
This commit is contained in:
Родитель
5f59ea510d
Коммит
40b4b6a4a3
|
@ -111,11 +111,19 @@ function onFinish()
|
|||
|
||||
var profName = wizardManager.WSM.PageData["newProfile1_2"].ProfileName.value;
|
||||
var profDir = wizardManager.WSM.PageData["newProfile1_2"].ProfileDir.value;
|
||||
var profLocale = wizardManager.WSM.PageData["newProfile1_2"].ProfileLocale.value;
|
||||
var profLang = wizardManager.WSM.PageData["newProfile1_2"].ProfileLanguage.value;
|
||||
var profRegion = wizardManager.WSM.PageData["newProfile1_2"].ProfileRegion.value;
|
||||
|
||||
// Get & select langcode
|
||||
proceed = processCreateProfileData(profName, profDir, profLocale);
|
||||
proceed = processCreateProfileData(profName, profDir, profLang, profRegion);
|
||||
|
||||
if( proceed ) {
|
||||
|
||||
//select locale region
|
||||
if (profRegion) {
|
||||
selectLocale(profRegion);
|
||||
}
|
||||
|
||||
if( window.opener ) {
|
||||
window.opener.CreateProfile(profName, profDir);
|
||||
window.close();
|
||||
|
@ -134,7 +142,7 @@ function onFinish()
|
|||
* - in: nothing
|
||||
* - out: nothing
|
||||
**/
|
||||
function processCreateProfileData( aProfName, aProfDir, langcode)
|
||||
function processCreateProfileData( aProfName, aProfDir, langcode, regioncode)
|
||||
{
|
||||
try {
|
||||
// note: deleted check for empty profName string here as this should be
|
||||
|
|
|
@ -32,11 +32,13 @@ function GetFields()
|
|||
var profDir = document.getElementById("ProfileDir");
|
||||
var profDirContent = profDir.hasChildNodes() ? profDir.firstChild.nodeValue : "";
|
||||
var profDirRootFolder = profDir.getAttribute("rootFolder");
|
||||
var profLocale = document.getElementById("ProfileLocale").getAttribute("data");
|
||||
var profLanguage = document.getElementById("ProfileLanguage").getAttribute("data");
|
||||
var profRegion = document.getElementById("ProfileRegion").getAttribute("data");
|
||||
var rv = {
|
||||
ProfileName: { id: "ProfileName", value: profName },
|
||||
ProfileDir: { id: "ProfileDir", value: profDirRootFolder },
|
||||
ProfileLocale: { id: "ProfileLocale", value: profLocale }
|
||||
ProfileLanguage: { id: "ProfileLanguage", value: profLanguage },
|
||||
ProfileRegion: { id: "ProfileRegion", value: profRegion }
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
@ -55,10 +57,15 @@ function SetFields( aElement, aValue, aDataObject )
|
|||
case "ProfileName":
|
||||
element.value = aValue;
|
||||
break;
|
||||
case "ProfileLocale":
|
||||
document.getElementById("ProfileLocale").setAttribute("data", aValue);
|
||||
case "ProfileLanguage": {
|
||||
document.getElementById("ProfileLanguage").setAttribute("data", aValue);
|
||||
break;
|
||||
}
|
||||
case "ProfileRegion": {
|
||||
document.getElementById("ProfileRegion").setAttribute("data", aValue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// check to see if some user specified profile folder exists, otherwise use
|
||||
|
@ -161,6 +168,7 @@ function setDisplayToDefaultFolder()
|
|||
|
||||
function showLangDialog()
|
||||
{
|
||||
var selectedLanguage = document.getElementById("ProfileLocale").getAttribute("data");
|
||||
var selectLang = window.openDialog("chrome://communicator/content/profile/selectLang.xul","","modal=yes,titlebar,resizable=no",selectedLanguage);
|
||||
var selectedLanguage = document.getElementById("ProfileLanguage").getAttribute("data");
|
||||
var selectedRegion = document.getElementById("ProfileRegion").getAttribute("data");
|
||||
var selectLang = window.openDialog("chrome://communicator/content/profile/selectLang.xul","","modal=yes,titlebar,resizable=no", selectedLanguage, selectedRegion);
|
||||
}
|
||||
|
|
|
@ -67,5 +67,6 @@
|
|||
|
||||
<html id="finishtext">&pnl2.finish.text;</html>
|
||||
|
||||
<data id="ProfileLocale" />
|
||||
<data id="ProfileLanguage" />
|
||||
<data id="ProfileRegion" />
|
||||
</window>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<window id="selectLangWindow"
|
||||
title="&langSelBox.title.label;"
|
||||
orient="vertical" class="dialog"
|
||||
style="width: 30em; -moz-user-focus: ignore;"
|
||||
style="width: 22em; -moz-user-focus: ignore;"
|
||||
onload="Startup();"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
|||
|
||||
<separator class="thin" />
|
||||
|
||||
<tree class="inset" id="langList" flex="1"
|
||||
<tree class="inset" id="langList" flex="1" rows="5"
|
||||
ref="urn:mozilla:locale:root" datasources="rdf:chrome"
|
||||
sortResource="http://www.mozilla.org/rdf/chrome#name"
|
||||
sortDirection="ascending">
|
||||
|
@ -27,7 +27,10 @@
|
|||
<treecol flex="1"/>
|
||||
</treecolgroup>
|
||||
|
||||
<template>
|
||||
<template xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
|
||||
<rule chrome:localeType="region">
|
||||
</rule>
|
||||
<rule>
|
||||
<treechildren flex="1">
|
||||
<treeitem id="treechildren" uri="...">
|
||||
<treerow>
|
||||
|
@ -36,10 +39,31 @@
|
|||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</rule>
|
||||
</template>
|
||||
|
||||
</tree>
|
||||
|
||||
<separator class="thin" />
|
||||
|
||||
<text class="label" value="®ionList.txt.label;" for="regionList"/>
|
||||
|
||||
<separator class="thin" />
|
||||
|
||||
<menulist id="regionList" flex="1">
|
||||
<menupopup
|
||||
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">
|
||||
<menuitem class="standard" uri="rdf:*"
|
||||
label="rdf:http://www.mozilla.org/rdf/chrome#displayName"
|
||||
value="rdf:http://www.mozilla.org/rdf/chrome#name"/>
|
||||
</rule>
|
||||
</template>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
|
||||
<separator/>
|
||||
<box id="okCancelButtonsRight"/>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
<!ENTITY langSelBox.title.label "Language/Region Selection">
|
||||
<!ENTITY langList.txt.label "Select UI Language and Regional Content">
|
||||
<!ENTITY langList.txt.label "Preferred Language">
|
||||
<!ENTITY regionList.txt.label "Preferred Content">
|
||||
<!ENTITY moreBtn.label "For more choices...">
|
||||
|
|
Загрузка…
Ссылка в новой задаче