Yes, I forgot to commit from /profile last night...

This commit is contained in:
blakeross%telocity.com 2001-11-03 16:47:13 +00:00
Родитель 49457cbb7c
Коммит cb9774d60a
12 изменённых файлов: 186 добавлений и 208 удалений

Просмотреть файл

@ -1,31 +0,0 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://communicator/skin/profile/profile.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/profile/profileMigrationProgress.dtd" >
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
orient="vertical"
onload="onLoad()"
title="&window.title;"
class="dialog">
<script type="application/x-javascript" src="chrome://communicator/content/profile/profileMigrationProgress.js"/>
<keyset id="keyset"/>
<hbox>
<hbox autostretch="never">
<image class="message-icon"/>
</hbox>
<vbox flex="100%">
<text id="info.header" value="&dialogTitle.label;" />
<text id="info1" flex="100%" value="&currentlyProcessing.text;" />
<text id="info2" flex="100%" value="&downloadBeforeUpdate.text;" />
<hbox id="pm-box">
<progressmeter id="dialog.progress" mode="undetermined" flex="100%"/>
</hbox>
</vbox>
</hbox>
</window>

Просмотреть файл

@ -1,41 +0,0 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://communicator/skin/profile/profile.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % migrationDTD SYSTEM "chrome://communicator/locale/profile/confirmMigration.dtd" >
%migrationDTD;
]>
<window xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
orient="vertical"
title="&window.title;"
onload="onLoad()"
class="dialog">
<stringbundle id="bundle_migration"
src="chrome://communicator/locale/profile/migration.properties"/>
<script type="application/x-javascript" src="chrome://communicator/content/profile/confirmMigration.js"/>
<keyset id="keyset"/>
<hbox>
<vbox>
<image class="message-icon"/>
<spacer flex="1"/>
</vbox>
<separator orient="vertical" class="thin"/>
<vbox flex="1">
<html>&confirmMigrationPart1.label;</html>
<html>&confirmMigrationPart2.label;</html>
</vbox>
</hbox>
<separator class="thin"/>
<hbox id="okCancelButtons"/>
</window>

Просмотреть файл

@ -28,16 +28,9 @@ profile = profile.QueryInterface(Components.interfaces.nsIProfileInternal);
var gCreateProfileWizardBundle;
var gProfileManagerBundle;
// Navigation Set for pages contained in wizard
var wizardMap = {
newProfile1_1: { previous: null, next: "newProfile1_2", finish: false },
newProfile1_2: { previous: "newProfile1_1", next: null, finish: true },
}
// page specific variables
var profName = "";
var profDir = "";
var wizardManager = null;
// startup procedure
function Startup( startPage, frame_id )
@ -49,15 +42,6 @@ function Startup( startPage, frame_id )
gCreateProfileWizardBundle = document.getElementById("bundle_createProfileWizard");
gProfileManagerBundle = document.getElementById("bundle_profileManager");
// instantiate the Wizard Manager
wizardManager = new WizardManager( frame_id, null, null, wizardMap );
wizardManager.URL_PagePrefix = "chrome://communicator/content/profile/";
wizardManager.URL_PagePostfix = ".xul";
// set the button handler functions
wizardManager.SetHandlers( null, null, onFinish, onCancel, null, null );
// load the start page
wizardManager.LoadPage (startPage, false);
// move to center of screen if no opener, otherwise, to center of opener
if( window.opener )
moveToAlertPosition();
@ -78,37 +62,59 @@ function onCancel()
}
window.close();
}
return true;
}
function onFinish()
{
// check if we're at final stage
if( !wizardManager.wizardMap[wizardManager.currentPageTag].finish )
return;
var tag = wizardManager.WSM.GetTagFromURL( wizardManager.content_frame.src, "/", ".xul" );
wizardManager.WSM.SavePageData( tag, null, null, null );
var profName = wizardManager.WSM.PageData["newProfile1_2"].ProfileName.value;
var profDir = wizardManager.WSM.PageData["newProfile1_2"].ProfileDir.value;
var profLang = wizardManager.WSM.PageData["newProfile1_2"].ProfileLanguage.value;
var profRegion = wizardManager.WSM.PageData["newProfile1_2"].ProfileRegion.value;
var profName = document.getElementById("ProfileName").value;
var profDir = document.getElementById("ProfileDir").getAttribute("rootFolder");
var profLang = document.getElementById("ProfileLanguage").getAttribute("data");
var profRegion = document.getElementById("ProfileRegion").getAttribute("data");
// Get & select langcode
proceed = processCreateProfileData(profName, profDir, profLang, profRegion);
var proceed = processCreateProfileData(profName, profDir, profLang, profRegion);
if( proceed ) {
alert('fo');
if( window.opener ) {
window.opener.CreateProfile(profName, profDir);
}
else {
profile.startApprunner(profName);
}
alert('fo');
window.close();
}
else
return;
return true;
}
// function createProfileWizard.js::chooseProfileFolder();
// invoke a folder selection dialog for choosing the directory of profile storage.
function chooseProfileFolder( aRootFolder )
{
if( !aRootFolder ) {
try {
var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(Components.interfaces.nsIFilePicker);
var newProfile1_2Bundle = document.getElementById("bundle_newProfile1_2");
fp.init(window, newProfile1_2Bundle.getString("chooseFolder"), Components.interfaces.nsIFilePicker.modeGetFolder);
fp.appendFilters(Components.interfaces.nsIFilePicker.filterAll);
fp.show();
// later change to
aRootFolder = fp.file.unicodePath;
}
catch(e) {
aRootFolder = null;
}
}
if( aRootFolder ) {
var folderText = document.getElementById("ProfileDir");
dump("*** setting rootFolderAttribute to " + aRootFolder + "\n");
folderText.setAttribute( "rootFolder", aRootFolder );
if ( aRootFolder != top.profile.defaultProfileParentDir.unicodePath )
document.getElementById( "useDefault" ).removeAttribute("disabled");
updateProfileName();
}
}
/** void processCreateProfileData( void ) ;
@ -174,4 +180,76 @@ function processCreateProfileData( aProfName, aProfDir, langcode, regioncode)
dump("*** Failed to create a profile\n");
}
}
function updateProfileName()
{
const nsILocalFile = Components.interfaces.nsILocalFile;
const nsILocalFile_CONTRACTID = "@mozilla.org/file/local;1";
var profileName = document.getElementById( "ProfileName" );
var folderDisplayElement = document.getElementById( "ProfileDir" );
var rootFolder = folderDisplayElement.getAttribute( "rootFolder" );
try {
var sfile = Components.classes[nsILocalFile_CONTRACTID].createInstance(nsILocalFile);
if ( sfile ) {
// later change to
sfile.initWithUnicodePath(rootFolder);
}
// later change to
sfile.appendUnicode(profileName.value);
clearFolderDisplay();
// later change to
var value = document.createTextNode( sfile.unicodePath );
folderDisplayElement.appendChild( value );
}
catch(e) {
}
}
function clearFolderDisplay()
{
var folderText = document.getElementById("ProfileDir");
if ( folderText.hasChildNodes() ) {
while ( folderText.hasChildNodes() )
folderText.removeChild( folderText.firstChild );
}
}
function setDisplayToDefaultFolder()
{
var profileName = document.getElementById( "ProfileName" );
var profileDisplay = document.getElementById( "ProfileDir" );
var fileSpec;
try {
fileSpec = top.profile.defaultProfileParentDir;
if ( fileSpec )
fileSpec = fileSpec.QueryInterface( Components.interfaces.nsIFile );
if ( fileSpec )
profileDisplay.setAttribute("rootFolder", fileSpec.unicodePath );
}
catch(e) {
}
document.getElementById("useDefault").setAttribute("disabled", "true");
// reset the display field
updateProfileName();
}
function showLangDialog()
{
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);
}
// check to see if some user specified profile folder exists, otherwise use
// default.
function initPage2()
{
var displayField = document.getElementById( "ProfileDir" );
if ( !displayField.value || !displayField.rootFolder )
setDisplayToDefaultFolder();
}

Просмотреть файл

@ -12,32 +12,53 @@
]>
<window title="&newprofile.title;" orient="vertical"
class="color-dialog"
xmlns:html="http://www.w3.org/1999/xhtml"
<window title="&newprofile.title;" orient="horizontal" class="color-dialog"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onclose="onCancel();"
onload="Startup('newProfile1_1','content');">
onload="window.sizeToContent(); Startup('newProfile1_1','content');">
<stringbundle id="bundle_createProfileWizard"
src="chrome://communicator/locale/profile/createProfileWizard.properties"/>
<stringbundle id="bundle_profileManager"
src="chrome://communicator/locale/profile/profileManager.properties"/>
<stringbundle id="bundle_newProfile1_2"
src="chrome://communicator/locale/profile/newProfile1_2.properties"/>
<!-- XXX: strres.js is needed so that wizardManager.js will work -->
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/profile/createProfileWizard.js"/>
<script type="application/x-javascript" src="chrome://global/content/wizardOverlay.js"/>
<script type="application/x-javascript" src="chrome://global/content/wizardHandlerSet.js"/>
<script type="application/x-javascript" src="chrome://global/content/wizardManager.js"/>
<script type="application/x-javascript" src="chrome://global/content/widgetStateManager.js"/>
<grid>
<columns>
<column/>
<column flex="5"/>
<column flex="1"/>
</columns>
<rows>
<row align="center">
<description value="&pnl2.pname.label;" accesskey="P" control="ProfileName"/>
<textbox id="ProfileName" value="&pnl2.defaultPName.label;" onkeypress="updateProfileName();"/>
<spacer/>
</row>
<row>
<separator class="thin"/>
<separator class="thin"/>
<spacer/>
</row>
<row align="center">
<hbox>
<description>&pnl2.pdir.label;</description>
<hbox id="dirbox">
<description class="indent" id="ProfileDir" flex="1" style="overflow: auto;"/>
<vbox valign="top">
<button label="&button.choosefolder.label;" oncommand="chooseProfileFolder();"/>
</vbox>
</hbox>
</hbox>
<spacer/>
</row>
</rows>
</grid>
<hbox class="box-header" id="header" title="&window.title.label;" description="&profileWizard.title;"/>
<hbox class="wizard-box" flex="1">
<html:iframe src="about:blank" style="width: 40em; height: 23em; overflow: auto;" name="content" id="content" flex="1"/>
</hbox>
<separator class="groove"/>
<hbox id="wizardButtons"/>
<data id="ProfileLanguage" />
<data id="ProfileRegion" />
</window>

Просмотреть файл

@ -1,37 +0,0 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/profile/profile.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % deleteProfileDTD SYSTEM "chrome://communicator/locale/profile/profileManagerDelete.dtd" >
%deleteProfileDTD;
]>
<window
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="dialog"
orient="vertical"
style="width: 35em;"
title="&title;"
onload="Startup();">
<stringbundle id="bundle_profileManager"
src="chrome://communicator/locale/profile/profileManager.properties"/>
<script type="application/x-javascript"
src="chrome://communicator/content/profile/deleteProfile.js"/>
<keyset id="keyset"/>
<vbox flex="1">
<html>&intro;</html>
<html>&question;</html>
<separator/>
<hbox id="okCancelButtonsRight" class="Button1"/>
</vbox>
</window>

Просмотреть файл

@ -31,11 +31,8 @@
%profileDTD;
]>
<page
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
orient="vertical"
onload="parent.wizardManager.onPageLoad('newProfile1_1');">
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.wizardManager.onPageLoad('newProfile1_1');">
<description>&pnl1.p1.text;</description>
<description>&pnl1.p2.text;</description>

Просмотреть файл

@ -68,16 +68,7 @@ function SetFields( aElement, aValue, aDataObject )
}
}
// check to see if some user specified profile folder exists, otherwise use
// default.
function initFields()
{
var displayField = document.getElementById( "ProfileDir" );
if ( !displayField.value || !displayField.rootFolder )
setDisplayToDefaultFolder();
gNewProfile1_2Bundle = document.getElementById("bundle_newProfile1_2");
}
// function createProfileWizard.js::chooseProfileFolder();
// invoke a folder selection dialog for choosing the directory of profile storage.

Просмотреть файл

@ -26,30 +26,27 @@
<?xml-stylesheet href="chrome://communicator/skin/profile/newProfile1_2.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/profile/newProfile1_2.dtd" >
<page
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
orient="vertical"
onload="initFields();parent.wizardManager.onPageLoad('newProfile1_2');">
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="initFields();parent.wizardManager.onPageLoad('newProfile1_2');">
<stringbundle id="bundle_newProfile1_2"
src="chrome://communicator/locale/profile/newProfile1_2.properties"/>
<script type="application/x-javascript" src="chrome://communicator/content/profile/newProfile1_2.js"/>
<html>&pnl2.intro.text;</html>
<html>&pnl2.pname.label;</html>
<description>&pnl2.intro.text;</description>
<description>&pnl2.pname.label;</description>
<textbox id="ProfileName" value="&pnl2.defaultPName.label;" onkeypress="updateProfileName();"/>
<separator/>
<html>&pnl2.pdir.label;</html>
<description>&pnl2.pdir.label;</description>
<hbox id="dirbox">
<html class="indent" id="ProfileDir" flex="1" style="overflow: auto;"/>
<description class="indent" id="ProfileDir" flex="1" style="overflow: auto;"/>
<vbox valign="top">
<button label="&button.choosefolder.label;" oncommand="chooseProfileFolder();"/>
<button id="useDefault" label="&button.usedefault.label;" oncommand="setDisplayToDefaultFolder();" disabled="true"/>
@ -58,14 +55,14 @@
<separator/>
<hbox autostretch="never">
<hbox align="center">
<spacer flex="1"/>
<button label="&langSelection.label;" oncommand="showLangDialog();"/>
</hbox>
<spacer flex="1"/>
<html id="finishtext">&pnl2.finish.text;</html>
<description id="finishtext">&pnl2.finish.text;</description>
<data id="ProfileLanguage" />
<data id="ProfileRegion" />

Просмотреть файл

@ -58,9 +58,7 @@
<script type="application/x-javascript" src="chrome://communicator/content/profile/profileSelection.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/profile/profileManager.js"/>
<keyset id="dialogKeys">
<key id="fooKey" key="s" event="keydown" oncommand="foo()" modifiers="accel, shift"/>
</keyset>
<keyset id="dialogKeys"/>
<hbox class="box-header" id="header" title="&profilemanager.label;" description="&windowtitle.label;"/>
@ -100,7 +98,7 @@
</treehead>
<treechildren id="profilekids" flex="1"/>
</tree>
<hbox autostretch="never">
<hbox align="start">
<checkbox id="offlineState" label="&offlineState.label;" accesskey="&offlineState.accesskey;"/>
</hbox>
</vbox>

Просмотреть файл

@ -1,6 +1,5 @@
function Startup()
{
doSetOKCancel(onOK);
var selectedLanguage = window.arguments.length ? window.arguments[0] : null;
var tree = document.getElementById("langList");
if (selectedLanguage) {
@ -23,7 +22,7 @@ function Startup()
}
}
function onOK()
function onAccept()
{
//cache language on the parent window
var tree = document.getElementById("langList");
@ -45,5 +44,5 @@ function onOK()
regionStore.setAttribute("data", regionName);
}
window.close();
return true;
}

Просмотреть файл

@ -1,25 +1,21 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://communicator/skin/"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://communicator/locale/profile/selectLang.dtd">
<window id="selectLangWindow"
title="&langSelBox.title.label;"
orient="vertical" class="dialog"
style="width: 22em; -moz-user-focus: ignore;"
<dialog title="&langSelBox.title.label;"
style="width: 22em;"
onload="Startup();"
ondialogaccept="return onAccept();"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript" src="chrome://communicator/content/profile/selectLang.js"/>
<keyset id="keyset"/>
<text class="label" value="&langList.txt.label;" for="langList"/>
<label value="&langList.txt.label;" control="langList"/>
<separator class="thin" />
<tree class="inset" id="langList" flex="1" rows="5"
<tree id="langList" flex="1" rows="5"
ref="urn:mozilla:locale:root" datasources="rdf:chrome"
sortResource="http://www.mozilla.org/rdf/chrome#name"
sortDirection="ascending">
@ -45,7 +41,7 @@
<separator class="thin" />
<text class="label" value="&regionList.txt.label;" for="regionList"/>
<label value="&regionList.txt.label;" control="regionList"/>
<separator class="thin" />
@ -62,9 +58,5 @@
</rule>
</template>
</menupopup>
</menulist>
<separator/>
<hbox id="okCancelButtonsRight"/>
</window>
</menulist>
</dialog>

Просмотреть файл

@ -8,4 +8,18 @@
<!ENTITY dialup.title "Dialup">
<!ENTITY mailnews.title "Mail News">
<!ENTITY addrbook.title "Address Book">
<!-- LOCALIZATION NOTE (pnl1.p1.text): Don't translate "&brandShortName" -->
<!ENTITY pnl1.p1.text "&brandShortName; stores information about your settings, preferences, bookmarks, and mail in your personal profile.">
<!ENTITY pnl1.p2.text "If you are sharing this copy of &brandShortName; with other users, you can use profiles to keep each user's information separate. To do this, each user should create his or her own profile.">
<!ENTITY pnl1.p3.text "If you are the only person using this copy of &brandShortName;, you must have at least one profile. If you would like, you can create multiple profiles for yourself to store different sets of settings and preferences. For example, you may want to have separate profiles for business and personal use.">
<!ENTITY pnl1.p4.text "To begin creating your profile, click Next.">
<!ENTITY pnl2.intro.text "If you create several profiles you can tell them apart by the profile names. You may use the name provided here or use one of your own.">
<!ENTITY pnl2.pname.label "Profile Name:">
<!ENTITY pnl2.pdir.label "Profile Directory:">
<!ENTITY pnl2.deffldr.label " the default folder.">
<!ENTITY pnl2.finish.text "Click Finish to create this new profile.">
<!ENTITY button.choosefolder.label "Choose Folder...">
<!ENTITY button.usedefault.label "Use Default">
<!ENTITY pnl2.defaultPName.label "Default User">
<!ENTITY langSelection.label "Region Selection...">