finish renaming and moving all the profile xul, js and dtd files.

fix regression with Rename and Delete.  (they work again.)
This commit is contained in:
sspitzer%netscape.com 1999-09-28 22:50:50 +00:00
Родитель 85f2d4b7ac
Коммит bc1ccb9b9a
38 изменённых файлов: 222 добавлений и 1256 удалений

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

@ -22,25 +22,6 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = locale
FILES = \
common.css \
cpw.css \
cpw.js \
cpw.xul \
pm.css \
pm.js \
pm.xul \
pmDelete.xul \
pmMigrateAll.xul \
pmrename.xul \
test-content1_1.xul \
test-content1_2.xul \
$(NULL)
DIRS = content skin locale
include $(topsrcdir)/config/rules.mk
install::
$(INSTALL) $(addprefix $(srcdir)/, $(FILES)) $(DIST)/bin/res/profile

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

@ -1,51 +0,0 @@
window {
display: block;
width: 100%;
background-color: white;
}
tree {
display: table;
background-color: #000000;
border: none;
border-spacing: 0px;
//border-collapse: collapse;
width: 100%;
}
treeitem {
display: table-row;
}
treehead {
display: table-header-group;
}
treebody {
display: table-row-group;
}
treecell {
display: table-cell;
color: white;
font-family: Verdana;
font-size: 10pt;
}
treehead treeitem treecell {
background-color: #a0a0a0;
border: thin black solid;
color: black;
}
icon {
display: list-item;
height: 16px;
width: 16px;
list-style-image: url("resource:/res/mailnews/messenger/closedMailFolder.gif");
}
treecell[selected] {
background-color: #000080;
}

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

@ -26,12 +26,12 @@ include $(DEPTH)/config/autoconf.mk
FILES = \
createProfileWizard.js \
createProfileWizard.xul \
profileManager.js \
profileManager.xul \
profileManager.js \
profileManager.xul \
deleteProfile.xul \
migrateAllProfile.xul \
renameProfile.xul \
newProfile1_1.xul \
newProfile1_1.xul \
newProfile1_2.xul \
$(NULL)

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

@ -4,8 +4,8 @@ var wizardHash = new Array;
var firstTime = true;
var testMap = {
newProfile1_1: { next: "newProfile1_2" },
newProfile1_2: { previous: "newProfile1_1" },
newProfile1_1: { previous: null, next: "newProfile1_2" },
newProfile1_2: { previous: "newProfile1_1", next: null},
}
var pagePostfix=".xul";
@ -15,25 +15,22 @@ var currentPageTag;
var profName = "";
var profDir = "";
var toolkitCore;
// hack for inability to gray out finish button in first screen on first load
var isProfileData = false;
function wizardPageLoaded(tag) {
dump("**********wizardPageLoaded\n");
//dump("**********wizardPageLoaded\n");
if (firstTime) {
Startup();
}
currentPageTag = tag;
dump("currentPageTag: "+currentPageTag+"\n");
currentPageTag = tag;
//dump("currentPageTag: "+currentPageTag+"\n");
SetButtons();
populatePage();
}
var backButton = null;
var nextButton = null;
var finishButton = null;
function loadPage(thePage)
{
@ -41,24 +38,62 @@ function loadPage(thePage)
saveData();
}
dump("**********loadPage\n");
dump("thePage: "+thePage+"\n");
//dump("**********loadPage\n");
//dump("thePage: "+thePage+"\n");
displayPage(thePage);
firstTime = false;
return(true);
}
function SetButtons()
{
if (!currentPageTag) return;
if (!backButton) {
backButton = document.getElementById("back");
}
if (!nextButton) {
nextButton = document.getElementById("next");
}
if (!finishButton) {
finishButton = document.getElementById("finish");
}
//dump("currentPageTag == " + currentPageTag + "\n");
nextTag = testMap[currentPageTag].next;
//dump("nextTag == " + nextTag + "\n");
if (nextTag) {
//dump("next on, finish off\n");
nextButton.setAttribute("disabled", "false");
finishButton.setAttribute("disabled", "true");
}
else {
//dump("next off, finish on\n");
nextButton.setAttribute("disabled", "true");
finishButton.setAttribute("disabled", "false");
}
prevTag = testMap[currentPageTag].previous;
//dump("prevTag == " + prevTag + "\n");
if (prevTag) {
//dump("back on\n");
backButton.setAttribute("disabled", "false");
}
else {
//dump("back off\n");
backButton.setAttribute("disabled", "true");
}
}
function onNext()
{
dump("***********onNext\n");
if (currentPageTag == "newProfile1_1") {
isProfileData = true;
if (nextButton.getAttribute("disabled") == "true") {
return;
}
//dump("***********onNext\n");
if (currentPageTag != "newProfile1_2") {
saveData();
var nextPageTag = testMap[currentPageTag].next;
@ -69,19 +104,22 @@ function onNext()
function onBack()
{
dump("***********onBack\n");
if (backButton.getAttribute("disabled") == "true") {
return;
}
if (currentPageTag != "newProfile1_1") {
if (currentPageTag != "newProfile1_2") {
saveData();
previousPageTag = testMap[currentPageTag].previous;
var url = getUrlFromTag(previousPageTag);
var url = grtUrlFromTag(previousPageTag);
displayPage(url);
}
}
function displayPage(content)
{
dump("********INSIDE DISPLAYPAGE\n\n");
//dump(content + "\n");
//dump("********INSIDE DISPLAYPAGE\n\n");
if (content != "")
{
@ -96,47 +134,47 @@ function displayPage(content)
function populatePage()
{
dump("************initializePage\n");
//dump("************initializePage\n");
var contentWindow = window.frames["content"];
var doc = contentWindow.document;
for (var i in wizardHash) {
var formElement=doc.getElementById(i);
dump("formElement: "+formElement+"\n");
//dump("formElement: "+formElement+"\n");
if (formElement) {
formElement.value = wizardHash[i];
dump("wizardHash["+"i]: "+wizardHash[i]+"\n");
//dump("wizardHash["+"i]: "+wizardHash[i]+"\n");
}
}
}
function saveData()
{
dump("************ SAVE DATA\n");
//dump("************ SAVE DATA\n");
var contentWindow = window.frames["content"];
var doc = contentWindow.document;
var inputs = doc.getElementsByTagName("FORM")[0].elements;
dump("There are " + inputs.length + " input tags\n");
//dump("There are " + inputs.length + " input tags\n");
for (var i=0 ; i<inputs.length; i++) {
dump("Saving: ");
dump("ID=" + inputs[i].id + " Value=" + inputs[i].value + "..");
//dump("Saving: ");
//dump("ID=" + inputs[i].id + " Value=" + inputs[i].value + "..");
wizardHash[inputs[i].id] = inputs[i].value;
}
dump("done.\n");
//dump("done.\n");
}
function onCancel()
{
dump("************** ON CANCEL\n");
//dump("************** ON CANCEL\n");
saveData();
var i;
for (i in wizardHash) {
dump("element: "+i+"\n");
dump("value: "+wizardHash[i]+"\n");
//dump("element: "+i+"\n");
//dump("value: "+wizardHash[i]+"\n");
}
}
@ -150,22 +188,17 @@ function getUrlFromTag(title)
function Startup()
{
//dump("Doing Startup...\n");
toolkitCore = XPAppCoresManager.Find("toolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore) {
toolkitCore.Init("toolkitCore");
}
}
}
function Finish(opener)
{
if (finishButton.getAttribute("disabled") == "true") {
return;
}
//dump("******FINISH ROUTINE\n");
dump("******FINISH ROUTINE\n");
if (isProfileData) {
try {
saveData();
processCreateProfileData();
@ -173,24 +206,23 @@ function Finish(opener)
opener.CreateProfile();
}
}
else {
alert("You need to enter minimum profile info before clicking on finish.\n\nYou can do this by clicking on the next button.\n");
catch (ex) {
alert("Failed to create a profile.");
}
}
function processCreateProfileData()
{
//Process Create Profile Data
dump("******processCreateProfileData ROUTINE\n");
//dump("******processCreateProfileData ROUTINE\n");
var i;
var data = "";
for (i in wizardHash) {
dump("element: "+i+"\n");
dump("value: "+wizardHash[i]+"\n");
//dump("element: "+i+"\n");
//dump("value: "+wizardHash[i]+"\n");
if (i == "ProfileName") {
profName = wizardHash[i];
@ -203,41 +235,31 @@ function processCreateProfileData()
}
}
dump("data: "+data+"\n");
dump("calling javascript reflection\n");
var profileCore = XPAppCoresManager.Find("ProfileCore");
if (!profileCore)
{
//dump("!profileCore\n");
profileCore = new ProfileCore();
//dump("!profileCore\n");
if (profileCore) {
//dump("after ! yes profileCore in if loop\n");
profileCore.Init("ProfileCore");
}
else {
dump("profile not created\n");
}
//dump("data: "+data+"\n");
var profile = Components.classes["component://netscape/profile/manager"].createInstance();
profile = profile.QueryInterface(Components.interfaces.nsIProfile);
//dump("profile = " + profile + "\n");
//dump("********DATA: "+data+"\n\n");
try {
profile.createNewProfile(data);
profile.startCommunicator(profName);
}
if (profileCore) {
//dump("yes profileCore\n");
dump("********DATA: "+data+"\n\n");
profileCore.CreateNewProfile(data);
profileCore.StartCommunicator(profName);
}
toolkitCore = XPAppCoresManager.Find("toolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore) {
toolkitCore.Init("toolkitCore");
}
}
if (toolkitCore) {
toolkitCore.CloseWindow(parent);
}
catch (ex) {
alert("Failed to create a profile.");
return;
}
ExitApp();
}
function ExitApp()
{
// Need to call this to stop the event loop
var appShell = Components.classes['component://netscape/appshell/appShellService'].getService();
appShell = appShell.QueryInterface( Components.interfaces.nsIAppShellService);
appShell.Quit();
}
function cancelApp()
{
dump("fix this.\n");
}

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

@ -1,9 +1,9 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="chrome://profile/skin/createProfileWizard.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://profile/locale/createProfileWizard.dtd" >
<!DOCTYPE window SYSTEM "chrome://profile/locale/createProfileWizard.dtd">
<window title="&window.title.label;" style="width: 100%; height: 100%" align="vertical"
xmlns:html="http://www.w3.org/TR/REC-html40"
@ -25,10 +25,10 @@
<html:iframe src="about:blank" flex="100%" name="content" id="content" scrolling="auto"/>
<box align="horizontal">
<titledbutton id="back" value="&back.label;" onclick="onBack()" align="left" style="margin-top: 1em;"/>
<titledbutton id="back" value="&back.label;" onclick="onBack()" align="left" disabled="true" style="margin-top: 1em;"/>
<titledbutton id="next" value="&next.label;" onclick="onNext()" align="left" style="margin-top: 1em;"/>
<titledbutton id="cancel" value="&cancel.label;" onclick="cancelApp()" align="left" style=" margin-top: 1em;"/>
<titledbutton id="finish" value="&finish.label;" onclick="Finish(opener)" align="left" style=" margin-top: 1em;"/>
<titledbutton id="finish" value="&finish.label;" onclick="Finish(opener)" disabled="true" align="left" style=" margin-top: 1em;"/>
</box>

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

@ -1,8 +1,8 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="chrome://profile/skin/profileManager.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://profile/locale/deleteProfile.dtd" >
<!DOCTYPE window SYSTEM "chrome://profile/locale/profileManagerDelete.dtd" >
<window
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

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

@ -21,15 +21,15 @@ MODULE=profile
include <$(DEPTH)\config\rules.mak>
FILES=\
createProfileWizard.js \
createProfileWizard.xul \
profileManager.js \
profileManager.xul \
deleteProfile.xul \
migrateAllProfile.xul \
renameProfile.xul \
newProfile1_1.xul \
newProfile1_2.xul \
createProfileWizard.js \
createProfileWizard.xul \
deleteProfile.xul \
migrateAllProfile.xul \
newProfile1_1.xul \
newProfile1_2.xul \
profileManager.js \
profileManager.xul \
renameProfile.xul \
$(NULL)
install::

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

@ -1,8 +1,8 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="chrome://profile/skin/profileManager.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://profile/locale/migrateAllProfile.dtd" >
<!DOCTYPE window SYSTEM "chrome://profile/locale/profileManagerMigrateAll.dtd" >
<window
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
@ -14,7 +14,7 @@
<html:center>
<html:div>&intro;</html:div>
<html:br />
<titledbutton value="&ok.label;" class="push" onclick="opener.MigrateAllProfiles();window.close();" />
<titledbutton value="&ok.label;" class="push" onclick="opener.migrateAllProfiles();window.close();" />
<titledbutton value="&cancel.label;" class="push" onclick="window.close();" />
</html:center>

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

@ -18,7 +18,7 @@
-->
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="chrome://profile/skin/profileManager.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://profile/locale/newProfile1_1.dtd" >

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

@ -31,6 +31,7 @@ xmlns:html="http://www.w3.org/TR/REC-html40"
<html:script>
function foo()
{
// what the hell is this?
}
function InitializeValues()

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

@ -1,12 +1,14 @@
var profileCore = "";
var selected = null;
var currProfile = "";
var profile = Components.classes["component://netscape/profile/manager"].createInstance();
profile = profile.QueryInterface(Components.interfaces.nsIProfile);
//dump("profile = " + profile + "\n");
function openCreateProfile()
{
// Need to call CreateNewProfile xuls
var win = window.openDialog('createProfileWizard.xul', 'CPW', 'chrome');
return win;
var win = window.openDialog('chrome://profile/content/createProfileWizard.xul', 'CPW', 'chrome');
return win;
}
function CreateProfile()
@ -18,7 +20,7 @@ function RenameProfile(w)
{
if (!selected)
{
dump("Select a profile to rename.\n");
//dump("Select a profile to rename.\n");
return;
}
@ -28,12 +30,12 @@ function RenameProfile(w)
if (migrate == "true")
{
dump("Migrate this profile before renaming it.\n");
//dump("Migrate this profile before renaming it.\n");
return;
}
//dump("RenameProfile : " + oldName + " to " + newName + "\n");
profileCore.RenameProfile(oldName, newName);
profile.renameProfile(oldName, newName);
//this.location.replace(this.location);
this.location.href = "chrome://profile/content/profileManager.xul";
}
@ -42,7 +44,7 @@ function DeleteProfile(deleteFilesFlag)
{
if (!selected)
{
dump("Select a profile to delete.\n");
//dump("Select a profile to delete.\n");
return;
}
@ -50,7 +52,7 @@ function DeleteProfile(deleteFilesFlag)
var name = selected.getAttribute("rowName");
//dump("Delete '" + name + "'\n");
profileCore.DeleteProfile(name, deleteFilesFlag);
profile.deleteProfile(name, deleteFilesFlag);
//this.location.replace(this.location);
//this.location.href = this.location;
this.location.href = "chrome://profile/content/profileManager.xul";
@ -58,10 +60,10 @@ function DeleteProfile(deleteFilesFlag)
function StartCommunicator()
{
dump("************Inside Start Communicator prof\n");
//dump("************Inside Start Communicator prof\n");
if (!selected)
{
dump("Select a profile to migrate.\n");
//dump("Select a profile to migrate.\n");
return;
}
@ -70,49 +72,42 @@ function StartCommunicator()
if (migrate == "true")
{
profileCore.MigrateProfile(name);
profile.migrateProfile(name);
}
dump("************name: "+name+"\n");
profileCore.StartCommunicator(name);
//dump("************name: "+name+"\n");
profile.startCommunicator(name);
ExitApp();
}
function ExitApp()
{
var toolkitCore = XPAppCoresManager.Find("toolkitCore");
if (!toolkitCore) {
toolkitCore = new ToolkitCore();
if (toolkitCore) {
toolkitCore.Init("toolkitCore");
}
}
if (toolkitCore) {
toolkitCore.CloseWindow(parent);
}
// Need to call this to stop the event loop
var appShell = Components.classes['component://netscape/appshell/appShellService'].getService();
appShell = appShell.QueryInterface( Components.interfaces.nsIAppShellService);
appShell.Quit();
}
function showSelection(node)
{
dump("************** In showSelection routine!!!!!!!!! \n");
//dump("************** In showSelection routine!!!!!!!!! \n");
// (see tree's onclick definition)
// Tree events originate in the smallest clickable object which is the cell. The object
// originating the event is available as event.target. We want the cell's row, so we go
// one further and get event.target.parentNode.
selected = node;
var num = node.getAttribute("rowNum");
dump("num: "+num+"\n");
//dump("num: "+num+"\n");
var name = node.getAttribute("rowName");
dump("name: "+name+"\n");
//dump("name: "+name+"\n");
//dump("Selected " + num + " : " + name + "\n");
}
function addTreeItem(num, name, migrate)
{
dump("Adding element " + num + " : " + name + "\n");
//dump("Adding element " + num + " : " + name + "\n");
var body = document.getElementById("theTreeBody");
var newitem = document.createElement('treeitem');
@ -143,18 +138,21 @@ function addTreeItem(num, name, migrate)
function loadElements()
{
dump("****************hacked onload handler adds elements to tree widget\n");
//dump("****************hacked onload handler adds elements to tree widget\n");
var profileList = "";
profileCore = Components.classes["component://netscape/profile/profile-services"].createInstance();
profileCore = profileCore.QueryInterface(Components.interfaces.nsIProfileServices);
dump("profile = " + profileCore + "\n");
profileList = profileCore.GetProfileList();
profileList = profile.getProfileList();
//dump("Got profile list of '" + profileList + "'\n");
profileList = profileList.split(",");
currProfile = profileCore.GetCurrentProfile();
try {
currProfile = profile.currentProfile;
}
catch (ex) {
if (profileList != "") {
currProfile = profileList;
}
}
for (var i=0; i < profileList.length; i++)
{
@ -165,15 +163,17 @@ function loadElements()
function openRename()
{
if (!selected)
dump("Select a profile to rename.\n");
if (!selected) {
//dump("Select a profile to rename.\n");
}
else
{
var migrate = selected.getAttribute("rowMigrate");
if (migrate == "true")
dump("Migrate the profile before renaming it.\n");
if (migrate == "true") {
//dump("Migrate the profile before renaming it.\n");
}
else
var win = window.openDialog('renameProfile.xul', 'Renamer', 'chrome');
var win = window.openDialog('chrome://profile/content/renameProfile.xul', 'Renamer', 'chrome');
}
}
@ -182,7 +182,7 @@ function ConfirmDelete()
{
if (!selected)
{
dump("Select a profile to delete.\n");
//dump("Select a profile to delete.\n");
return;
}
@ -191,18 +191,18 @@ function ConfirmDelete()
if (migrate == "true")
{
dump("Migrate this profile before deleting it.\n");
//dump("Migrate this profile before deleting it.\n");
return;
}
var win = window.openDialog('deleteProfile.xul', 'Deleter', 'chrome');
var win = window.openDialog('chrome://profile/content/deleteProfile.xul', 'Deleter', 'chrome');
return win;
}
function ConfirmMigrateAll()
{
var win = window.openDialog('migrateAllProfile.xul', 'MigrateAll', 'chrome');
var win = window.openDialog('chrome://profile/content/profileManagerMigrateAll.xul', 'MigrateAll', 'chrome');
return win;
}

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

@ -1,8 +1,8 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="chrome://profile/skin/profileManager.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://profile/locale/renameProfile.dtd" >
<!DOCTYPE window SYSTEM "chrome://profile/locale/profileManagerRename.dtd" >
<window
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

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

@ -1,35 +0,0 @@
window {
display: block;
background-color: light-gray;
width: 100%;
}
iframe {
width: 100%;
height: 100%;
border: 0px;
}
box {
width: 100%;
height: 100%;
display: block;
}
titledbutton.active {
color: yellow;
border: 0px;
margin: 1px;
padding: 3px 2px 0px 1px
}
titledbutton[disabled] {
color: black;
}
titledbutton {
color: black;
margin: 1px;
padding: 2px 1px 1px 2px
}

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

@ -1,264 +0,0 @@
var wizardMap = ["test-content1_1.xul"];
var content;
var wizardHash = new Array;
var firstTime = true;
var testMap = {
content1_1: { previous: null, next: "content1_2" },
content1_2: { previous: "content1_1" , next: null},
}
var pagePrefix="test-";
var pagePostfix=".xul";
var currentPageTag;
var profName = "";
var profDir = "";
// hack for inability to gray out finish button in first screen on first load
var isProfileData = false;
function wizardPageLoaded(tag) {
//dump("**********wizardPageLoaded\n");
if (firstTime) {
Startup();
}
currentPageTag = tag;
//dump("currentPageTag: "+currentPageTag+"\n");
SetButtons();
populatePage();
}
var backButton = null;
var nextButton = null;
var finishButton = null;
function loadPage(thePage)
{
if (!firstTime) {
saveData();
}
//dump("**********loadPage\n");
//dump("thePage: "+thePage+"\n");
displayPage(thePage);
firstTime = false;
return(true);
}
function SetButtons()
{
if (!currentPageTag) return;
if (!backButton) {
backButton = document.getElementById("back");
}
if (!nextButton) {
nextButton = document.getElementById("next");
}
if (!finishButton) {
finishButton = document.getElementById("finish");
}
//dump("currentPageTag == " + currentPageTag + "\n");
nextTag = testMap[currentPageTag].next;
//dump("nextTag == " + nextTag + "\n");
if (nextTag) {
nextButton.setAttribute("disabled", "false");
finishButton.setAttribute("disabled", "true");
}
else {
nextButton.setAttribute("disabled", "true");
finishButton.setAttribute("disabled", "false");
}
prevTag = testMap[currentPageTag].previous;
//dump("prevTag == " + prevTag + "\n");
if (prevTag) {
backButton.setAttribute("disabled", "false");
}
else {
backButton.setAttribute("disabled", "true");
}
}
function onNext()
{
if (nextButton.getAttribute("disabled") == "true") {
return;
}
//dump("***********onNext\n");
if (currentPageTag == "content1_1") {
isProfileData = true;
}
if (currentPageTag != "content1_2") {
saveData();
var nextPageTag = testMap[currentPageTag].next;
var url = getUrlFromTag(nextPageTag);
displayPage(url);
}
}
function onBack()
{
if (backButton.getAttribute("disabled") == "true") {
return;
}
if (currentPageTag != "content1_1") {
saveData();
previousPageTag = testMap[currentPageTag].previous;
var url = getUrlFromTag(previousPageTag);
displayPage(url);
}
}
function displayPage(content)
{
//dump("********INSIDE DISPLAYPAGE\n\n");
if (content != "")
{
var contentFrame = document.getElementById("content");
if (contentFrame)
{
contentFrame.setAttribute("src", content);
}
}
}
function populatePage()
{
//dump("************initializePage\n");
var contentWindow = window.frames["content"];
var doc = contentWindow.document;
for (var i in wizardHash) {
var formElement=doc.getElementById(i);
//dump("formElement: "+formElement+"\n");
if (formElement) {
formElement.value = wizardHash[i];
//dump("wizardHash["+"i]: "+wizardHash[i]+"\n");
}
}
}
function saveData()
{
//dump("************ SAVE DATA\n");
var contentWindow = window.frames["content"];
var doc = contentWindow.document;
var inputs = doc.getElementsByTagName("FORM")[0].elements;
//dump("There are " + inputs.length + " input tags\n");
for (var i=0 ; i<inputs.length; i++) {
//dump("Saving: ");
//dump("ID=" + inputs[i].id + " Value=" + inputs[i].value + "..");
wizardHash[inputs[i].id] = inputs[i].value;
}
//dump("done.\n");
}
function onCancel()
{
//dump("************** ON CANCEL\n");
saveData();
var i;
for (i in wizardHash) {
//dump("element: "+i+"\n");
//dump("value: "+wizardHash[i]+"\n");
}
}
// utility functions
function getUrlFromTag(title)
{
return pagePrefix + title + pagePostfix;
}
function Startup()
{
//dump("Doing Startup...\n");
}
function Finish(opener)
{
if (finishButton.getAttribute("disabled") == "true") {
return;
}
//dump("******FINISH ROUTINE\n");
if (isProfileData) {
saveData();
processCreateProfileData();
if (opener) {
opener.CreateProfile();
}
}
else {
alert("You need to enter minimum profile info before clicking on finish.\n\nYou can do this by clicking on the next button.\n");
}
}
function processCreateProfileData()
{
//Process Create Profile Data
//dump("******processCreateProfileData ROUTINE\n");
var i;
var data = "";
for (i in wizardHash) {
//dump("element: "+i+"\n");
//dump("value: "+wizardHash[i]+"\n");
if (i == "ProfileName") {
profName = wizardHash[i];
data = data+i+"="+profName+"%";
}
if (i == "ProfileDir") {
profDir = wizardHash[i];
data = data+i+"="+profDir+"%";
}
}
//dump("data: "+data+"\n");
var profile = Components.classes["component://netscape/profile/manager"].createInstance();
profile = profile.QueryInterface(Components.interfaces.nsIProfile);
//dump("profile = " + profile + "\n");
//dump("********DATA: "+data+"\n\n");
try {
profile.createNewProfile(data);
profile.startCommunicator(profName);
}
catch (ex) {
//dump("failed to create & start\n");
return;
}
ExitApp();
}
function ExitApp()
{
// Need to call this to stop the event loop
var appShell = Components.classes['component://netscape/appshell/appShellService'].getService();
appShell = appShell.QueryInterface( Components.interfaces.nsIAppShellService);
appShell.Quit();
}

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

@ -1,36 +0,0 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="cpw.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://profile/locale/en-US/cpw.dtd" >
<window title="&window.title.label;" style="width: 100%; height: 100%" align="vertical"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="loadPage('test-content1_1.xul')"
width="500" height="400">
<html:script src="cpw.js" />
<tabcontrol align="vertical">
<tabbox align="horizontal">
<tab onclick="loadPage('test-content1_1.xul');">&newprofile.title;</tab>
</tabbox>
<tabpanel />
</tabcontrol>
<html:iframe src="about:blank" flex="100%" name="content" id="content" scrolling="auto"/>
<box align="horizontal">
<titledbutton id="back" value="&back.label;" onclick="onBack()" align="left" disabled="true" style="margin-top: 1em;"/>
<titledbutton id="next" value="&next.label;" onclick="onNext()" align="left" style="margin-top: 1em;"/>
<titledbutton id="cancel" value="&cancel.label;" onclick="cancelApp()" align="left" style=" margin-top: 1em;"/>
<titledbutton id="finish" value="&finish.label;" onclick="Finish(opener)" disabled="true" align="left" style=" margin-top: 1em;"/>
</box>
</window>

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

@ -1,7 +1,7 @@
cpw.dtd
pm.dtd
pmDelete.dtd
pmMigrateAll.dtd
pmrename.dtd
test-content1_1.dtd
test-content1_2.dtd
createProfileWizard.dtd
newProfile1_1.dtd
newProfile1_2.dtd
profileManager.dtd
profileManagerDelete.dtd
profileManagerMigrateAll.dtd
profileManagerRename.dtd

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

@ -24,14 +24,14 @@ include $(DEPTH)/config/autoconf.mk
FILES = \
cpw.dtd \
pm.dtd \
pmDelete.dtd \
pmMigrateAll.dtd \
pmrename.dtd \
test-content1_1.dtd \
test-content1_2.dtd \
$(NULL)
createProfileWizard.dtd \
newProfile1_1.dtd \
newProfile1_2.dtd \
profileManager.dtd \
profileManagerDelete.dtd \
profileManagerMigrateAll.dtd \
profileManagerRename.dtd \
$(NULL)
include $(topsrcdir)/config/rules.mk

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

@ -1,11 +0,0 @@
<!-- extracted from cpw.xul -->
<!ENTITY window.title.label "Communicator Profile Manager">
<!ENTITY newprofile.title "New Profile">
<!ENTITY dialup.title "Dialup">
<!ENTITY mailnews.title "Mail News">
<!ENTITY addrbook.title "Address Book">
<!ENTITY back.label "Back">
<!ENTITY next.label "Next">
<!ENTITY cancel.label "Cancel">
<!ENTITY finish.label "Finish">

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

@ -21,13 +21,13 @@ MODULE=profile
include <$(DEPTH)\config\rules.mak>
FILES=\
cpw.dtd \
pm.dtd \
pmDelete.dtd \
pmMigrateAll.dtd \
pmrename.dtd \
test-content1_1.dtd \
test-content1_2.dtd \
createProfileWizard.dtd \
newProfile1_1.dtd \
newProfile1_2.dtd \
profileManager.dtd \
profileManagerDelete.dtd \
profileManagerMigrateAll.dtd \
profileManagerRename.dtd \
$(NULL)
install::

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

@ -1,15 +0,0 @@
<!-- extracted from pm.xul -->
<!ENTITY reg.gif "reg.gif">
<!ENTITY intro "Communicator stores information about your settings, preferences, bookmarks, and stored messages in your personal Netscape Name.">
<!ENTITY intro.new "Click New to create a new Netscape Name.">
<!ENTITY intro.delete "Click Delete to remove a selected Netscape Name.">
<!ENTITY intro.rename "Click Rename to change the name of a selected Netscape Name.">
<!ENTITY migration.label "Migration">
<!ENTITY user.label "User Name">
<!ENTITY newCmd.label "New...">
<!ENTITY renameCmd.label "Rename...">
<!ENTITY deleteCmd.label "Delete">
<!ENTITY startCmd.label "Start">
<!ENTITY closeCmd.label "Close">
<!ENTITY windowtitle.label "Profiles and Migration">

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

@ -1,7 +0,0 @@
<!-- extracted from pmDelete.xul -->
<!ENTITY title "Delete Profile">
<!ENTITY intro "Confirm delete?">
<!ENTITY delete.yes.label "Delete Files">
<!ENTITY delete.no.label "Don't Delete Files">
<!ENTITY cancel.label "Cancel">

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

@ -1,6 +0,0 @@
<!-- extracted from pmMigrateAll.xul -->
<!ENTITY title "Migrate All Profiles">
<!ENTITY intro "Migrate all profiles? ">
<!ENTITY ok.label "Ok">
<!ENTITY cancel.label "Cancel">

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

@ -1,6 +0,0 @@
<!-- extracted from pmrename.xul -->
<!ENTITY title "Rename Profile">
<!ENTITY intro "Enter a new name for the profile: ">
<!ENTITY ok.label "Ok">
<!ENTITY cancel.label "Cancel">

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

@ -1,8 +0,0 @@
<!-- extracted from test-content1_1.xul -->
<!ENTITY heading "Communicator Profile Manager">
<!ENTITY title "Creating a New Profile">
<!ENTITY para.one "Communicator stores information about your settings, preferences, bookmarks, and stored messages in your personal profile.">
<!ENTITY para.two "If you are sharing this copy of Communicator 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 and optionally protect it with a password.">
<!ENTITY para.three "If you are the only person using this copy of Communicator, you must create at least one profile. If you would like, you can create multiple profiles for yourself to store different sets of setting and preferences. For example, you may want to have separate profiles for business and personal use.">
<!ENTITY para.four "To begin creating your profile, click Next.">

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

@ -1,6 +0,0 @@
<!-- extracted from test-content1_2.xul -->
<!ENTITY intro "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 profile.name "Enter New Profile name.">
<!ENTITY profile.dir "Your user settings, preferences, bookmarks and stored messages will be stored in the directory below. We recommend that you use the default directory (by leaving the box blank).">
<!ENTITY para "Click Finish to create this new profile.">

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

@ -18,23 +18,6 @@
DEPTH=..\..
MODULE=profile
DIRS= locale
DIRS=locale content skin
include <$(DEPTH)\config\rules.mak>
FILES=\
common.css \
cpw.css \
cpw.js \
cpw.xul \
pm.css \
pm.js \
pm.xul \
pmDelete.xul \
pmMigrateAll.xul \
pmRename.xul \
test-content1_1.xul \
test-content1_2.xul \
$(NULL)
install::
-for %i in ($(FILES:/=\)) do $(MAKE_INSTALL) %i $(DIST)\bin\res\profile

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

@ -1,43 +0,0 @@
window {
background-color: white;
}
tree {
background-color: #FFFFFF;
border: 5px ridge;
border-spacing: 0px;
width: 75%;
}
treecol[id="migration"] {
width: 25%;
}
treecol[id="username"] {
width: 75%;
}
treecell {
font-family: Verdana, Sans-Serif;
font-size: 8pt;
white-space: nowrap;
}
treeitem[selected] {
background-color: yellow;
}
//treecell[selectedcell] {
//background-color: yellow;
//}
treehead treeitem treecell {
background-color: #00C0FF;
border: outset 1px;
border-color: white #707070 #707070 white;
vertical-align: middle;
}
//popup {
//display: none;
//}

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

@ -1,212 +0,0 @@
var selected = null;
var currProfile = "";
var profile = Components.classes["component://netscape/profile/manager"].createInstance();
profile = profile.QueryInterface(Components.interfaces.nsIProfile);
//dump("profile = " + profile + "\n");
function openCreateProfile()
{
// Need to call CreateNewProfile xuls
var win = window.openDialog('cpw.xul', 'CPW', 'chrome');
return win;
}
function CreateProfile()
{
this.location.href = "resource:/res/profile/pm.xul";
}
function RenameProfile(w)
{
if (!selected)
{
//dump("Select a profile to rename.\n");
return;
}
var newName = w.document.getElementById("NewName").value;
var oldName = selected.getAttribute("rowName");
var migrate = selected.getAttribute("rowMigrate");
if (migrate == "true")
{
//dump("Migrate this profile before renaming it.\n");
return;
}
//dump("RenameProfile : " + oldName + " to " + newName + "\n");
profile.RenameProfile(oldName, newName);
//this.location.replace(this.location);
this.location.href = "resource:/res/profile/pm.xul";
}
function DeleteProfile(deleteFilesFlag)
{
if (!selected)
{
//dump("Select a profile to delete.\n");
return;
}
var migrate = selected.getAttribute("rowMigrate");
var name = selected.getAttribute("rowName");
//dump("Delete '" + name + "'\n");
profile.DeleteProfile(name, deleteFilesFlag);
//this.location.replace(this.location);
//this.location.href = this.location;
this.location.href = "resource:/res/profile/pm.xul";
}
function StartCommunicator()
{
//dump("************Inside Start Communicator prof\n");
if (!selected)
{
//dump("Select a profile to migrate.\n");
return;
}
var migrate = selected.getAttribute("rowMigrate");
var name = selected.getAttribute("rowName");
if (migrate == "true")
{
profile.migrateProfile(name);
}
//dump("************name: "+name+"\n");
profile.startCommunicator(name);
ExitApp();
}
function ExitApp()
{
// Need to call this to stop the event loop
var appShell = Components.classes['component://netscape/appshell/appShellService'].getService();
appShell = appShell.QueryInterface( Components.interfaces.nsIAppShellService);
appShell.Quit();
}
function showSelection(node)
{
//dump("************** In showSelection routine!!!!!!!!! \n");
// (see tree's onclick definition)
// Tree events originate in the smallest clickable object which is the cell. The object
// originating the event is available as event.target. We want the cell's row, so we go
// one further and get event.target.parentNode.
selected = node;
var num = node.getAttribute("rowNum");
//dump("num: "+num+"\n");
var name = node.getAttribute("rowName");
//dump("name: "+name+"\n");
//dump("Selected " + num + " : " + name + "\n");
}
function addTreeItem(num, name, migrate)
{
//dump("Adding element " + num + " : " + name + "\n");
var body = document.getElementById("theTreeBody");
var newitem = document.createElement('treeitem');
var newrow = document.createElement('treerow');
newrow.setAttribute("rowNum", num);
newrow.setAttribute("rowName", name);
newrow.setAttribute("rowMigrate", migrate);
var elem = document.createElement('treecell');
// Hack in a differentation for migration
if (migrate)
var text = document.createTextNode('Migrate');
else
var text = document.createTextNode('');
elem.appendChild(text);
newrow.appendChild(elem);
var elem = document.createElement('treecell');
var text = document.createTextNode(name);
elem.appendChild(text);
newrow.appendChild(elem);
newitem.appendChild(newrow);
body.appendChild(newitem);
}
function loadElements()
{
//dump("****************hacked onload handler adds elements to tree widget\n");
var profileList = "";
profileList = profile.getProfileList();
//dump("Got profile list of '" + profileList + "'\n");
profileList = profileList.split(",");
try {
currProfile = profile.currentProfile;
}
catch (ex) {
if (profileList != "") {
currProfile = profileList;
}
}
for (var i=0; i < profileList.length; i++)
{
var pvals = profileList[i].split(" - ");
addTreeItem(i, pvals[0], (pvals[1] == "migrate"));
}
}
function openRename()
{
if (!selected) {
//dump("Select a profile to rename.\n");
}
else
{
var migrate = selected.getAttribute("rowMigrate");
if (migrate == "true") {
//dump("Migrate the profile before renaming it.\n");
}
else
var win = window.openDialog('pmrename.xul', 'Renamer', 'chrome');
}
}
function ConfirmDelete()
{
if (!selected)
{
//dump("Select a profile to delete.\n");
return;
}
var migrate = selected.getAttribute("rowMigrate");
var name = selected.getAttribute("rowName");
if (migrate == "true")
{
//dump("Migrate this profile before deleting it.\n");
return;
}
var win = window.openDialog('pmDelete.xul', 'Deleter', 'chrome');
return win;
}
function ConfirmMigrateAll()
{
var win = window.openDialog('pmMigrateAll.xul', 'MigrateAll', 'chrome');
return win;
}
// -------------------------------------------- begin Hack for OnLoad handling
setTimeout('loadElements()', 0);
// -------------------------------------------- end Hack for OnLoad handling

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

@ -1,88 +0,0 @@
<?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
<!--
The contents of this file are subject to the Netscape Public License
Version 1.0 (the "NPL"); you may not use this file except in
compliance with the NPL. You may obtain a copy of the NPL at
http://www.mozilla.org/NPL/
Software distributed under the NPL is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
for the specific language governing rights and limitations under the
NPL.
The Initial Developer of this code under the NPL is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998 Netscape Communications Corporation. All Rights
Reserved.
-->
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="pm.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://profile/locale/en-US/pm.dtd" >
<window
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" class="dialog"
title="&windowtitle.label;"
width="500" height="500">
<html:script language="javascript" src="pm.js"/>
<html:div flex="100%" style="width: 100%; height: 100%;">
<html:div style="width: 300px; margin: 5px;">&intro;</html:div>
<html:div>&intro.new;</html:div>
<html:div>&intro.delete;</html:div>
<html:div>&intro.rename;</html:div>
<html:br></html:br>
<html:br></html:br>
<box align="horizontal" style="width: 75%; height: 70%;">
<tree id="tree" flex="100%" style="background-color: white; width: 75%; height: 70%; margin: 2px;"
onclick="return showSelection(event.target.parentNode);">
<treecol style="width: 25%"/>
<treecol style="width: 50%"/>
<treehead>
<treerow>
<treecell style="background-color: #CCCCCC; border-right: 1px solid white;padding: 2px;">&migration.label;</treecell>
<treecell style="background-color: #CCCCCC; border-right: 1px solid white;padding: 2px;">&user.label;</treecell>
</treerow>
</treehead>
<treechildren id="theTreeBody" style="background-color: white; border: 1px inset white;">
</treechildren>
</tree>
<box align="horizontal">
<box align="vertical">
<titledbutton value="&newCmd.label;" onclick="openCreateProfile();" />
<titledbutton value="&renameCmd.label;" onclick="openRename();" />
<titledbutton value="&deleteCmd.label;" onclick="ConfirmDelete();" />
</box>
<!--<html:br></html:br>-->
<box align="vertical" flex="100%">
<!-- A workaorund to add some vertical space before the Start/Exit buttons are displayed-->
<box align="vertical" flex="100%">
<html:p></html:p>
<html:p></html:p>
<html:p></html:p>
<html:p></html:p>
<html:p></html:p>
<html:p></html:p>
<html:p></html:p>
<html:p></html:p>
<html:br></html:br>
</box>
<box align="horizontal">
<titledbutton value="&startCmd.label;" onclick="StartCommunicator();" />
<titledbutton value="&closeCmd.label;" onclick="ExitApp();" />
</box>
</box>
</box>
</box>
</html:div>
</window>

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

@ -1,23 +0,0 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="pm.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://profile/locale/en-US/pmDelete.dtd" >
<window
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&title;" width="300" height="120">
<html:div flex="100%">
<html:center>
<html:div>&intro;</html:div>
<html:br />
<titledbutton value="&delete.yes.label;" class="push" onclick="opener.DeleteProfile('true');window.close();" />
<titledbutton value="&delete.no.label;" class="push" onclick="opener.DeleteProfile('false');window.close();" />
<titledbutton value="&cancel.label;" class="push" onclick="window.close();" />
</html:center>
</html:div>
</window>

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

@ -1,22 +0,0 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="pm.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://profile/locale/en-US/pmMigrateAll.dtd" >
<window
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&title;" width="300" height="120">
<html:div flex="100%">
<html:center>
<html:div>&intro;</html:div>
<html:br />
<titledbutton value="&ok.label;" class="push" onclick="opener.MigrateAllProfiles();window.close();" />
<titledbutton value="&cancel.label;" class="push" onclick="window.close();" />
</html:center>
</html:div>
</window>

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

@ -1,24 +0,0 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="pm.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://profile/locale/en-US/pmrename.dtd" >
<window
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&title;" width="300" height="120">
<html:div flex="100%">
<html:center>
<html:div>&intro;</html:div>
<html:input type="text" id="NewName" size="20" />
<html:br />
<html:br />
<titledbutton value="&ok.label;" class="push" onclick="opener.RenameProfile(window);window.close();" />
<titledbutton value="&cancel.label;" class="push" onclick="window.close();" />
</html:center>
</html:div>
</window>

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

@ -24,7 +24,7 @@ include $(DEPTH)/config/autoconf.mk
FILES = \
common.css \
profile.css \
createProfileWizard.css \
profileManager.css \
$(NULL)

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

@ -1,51 +0,0 @@
window {
display: block;
width: 100%;
background-color: white;
}
tree {
display: table;
background-color: #000000;
border: none;
border-spacing: 0px;
//border-collapse: collapse;
width: 100%;
}
treeitem {
display: table-row;
}
treehead {
display: table-header-group;
}
treebody {
display: table-row-group;
}
treecell {
display: table-cell;
color: white;
font-family: Verdana;
font-size: 10pt;
}
treehead treeitem treecell {
background-color: #a0a0a0;
border: thin black solid;
color: black;
}
icon {
display: list-item;
height: 16px;
width: 16px;
list-style-image: url("resource:/res/mailnews/messenger/closedMailFolder.gif");
}
treecell[selected] {
background-color: #000080;
}

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

@ -21,7 +21,7 @@ MODULE=profile
include <$(DEPTH)\config\rules.mak>
FILES=\
common.css \
profile.css \
createProfileWizard.css \
profileManager.css \
$(NULL)

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

@ -1,47 +0,0 @@
<?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
<!--
The contents of this file are subject to the Netscape Public License
Version 1.0 (the "NPL"); you may not use this file except in
compliance with the NPL. You may obtain a copy of the NPL at
http://www.mozilla.org/NPL/
Software distributed under the NPL is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
for the specific language governing rights and limitations under the
NPL.
The Initial Developer of this code under the NPL is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998 Netscape Communications Corporation. All Rights
Reserved.
-->
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="pm.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://profile/locale/en-US/test-content1_1.dtd" >
<window
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" class="dialog"
width="500" height="500"
onload="parent.wizardPageLoaded('content1_1');">
<html:div flex="100%" style="width: 100%; height: 100%;">
<html:div style="width: 300px;">&heading;</html:div>
<html:br/>
<html:div>&title;</html:div>
<html:div>&para.one;</html:div>
<html:br/>
<html:div>&para.two;</html:div>
<html:br/>
<html:div>&para.three;</html:div>
<html:br/>
<html:div>&para.four;</html:div>
</html:div>
</window>

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

@ -1,79 +0,0 @@
<?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
<!--
The contents of this file are subject to the Netscape Public License
Version 1.0 (the "NPL"); you may not use this file except in
compliance with the NPL. You may obtain a copy of the NPL at
http://www.mozilla.org/NPL/
Software distributed under the NPL is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
for the specific language governing rights and limitations under the
NPL.
The Initial Developer of this code under the NPL is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998 Netscape Communications Corporation. All Rights
Reserved.
-->
<?xml-stylesheet href="chrome://global/skin/xul.css" type="text/css"?>
<?xml-stylesheet href="pm.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://profile/locale/en-US/test-content1_2.dtd" >
<window
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" class="dialog"
width="500" height="500"
onload="parent.wizardPageLoaded('content1_2');">
<html:script>
function foo()
{
}
function InitializeValues()
{
element = document.getElementById("ProfileName");
element.value = parent.profName;
element = document.getElementById("ProfileDir");
element.value = parent.profDir;
}
function commit()
{
var element;
element = document.getElementById("ProfileName");
parent.SetValue(element.id, element.value);
parent.profName = element.value;
element = document.getElementById("ProfileDir");
data += "ProfileDir="+element.value+"%";
parent.SetValue(element.id, element.value);
parent.profDir = element.value;
}
setTimeout("foo()", 0);
</html:script>
<html:div flex="100%" style="width: 100%; height: 100%;">
<html:div>&intro;</html:div>
<html:br/>
<html:div>&profile.name;</html:div>
<html:input type="text" id="ProfileName" value="mozProfile" size="30"/>
<html:br/>
<html:br/>
<html:div>&profile.dir;</html:div>
<html:input type="text" id="ProfileDir" size="30"/>
<html:br/>
<html:br/>
<html:div>&para;</html:div>
</html:div>
</window>

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

@ -97,10 +97,12 @@
#define REGISTRY_DIRECTORY_STRING "directory"
#define REGISTRY_NEED_MIGRATION_STRING "NeedMigration"
#define PROFILE_PREG_URL "resource:/res/profile/cpwPreg.xul"
#define PROFILE_MANAGER_URL "resource:/res/profile/pm.xul"
// this used to be cpwPreg.xul, that no longer exists. we need to fix this.
#define PROFILE_PREG_URL "chrome://profile/content/createProfileWizard.xul"
#define PROFILE_MANAGER_URL "chrome://profile/content/profileManager.xul"
#define PROFILE_MANAGER_CMD_LINE_ARG "-ProfileManager"
#define PROFILE_WIZARD_URL "resource:/res/profile/cpw.xul"
#define PROFILE_WIZARD_URL "chrome://profile/content/createProfileWizard.xul"
#define PROFILE_WIZARD_CMD_LINE_ARG "-ProfileWizard"
#define INSTALLER_CMD_LINE_ARG "-installer"
#define CREATE_PROFILE_CMD_LINE_ARG "-CreateProfile"
@ -159,6 +161,7 @@ private:
nsCString & profileURLStr);
nsresult LoadDefaultProfileDir(nsCString & profileURLStr);
nsresult OpenRegistry();
nsresult CloseRegistry();
char mNewProfileData[_MAX_NUM_PROFILES][_MAX_LENGTH];
char mProfiles[_MAX_NUM_PROFILES][_MAX_LENGTH];
@ -244,6 +247,14 @@ NS_IMETHODIMP nsProfile::Startup(const char *filename)
return rv;
}
nsresult
nsProfile::CloseRegistry()
{
nsresult rv;
rv = m_reg->Close();
return rv;
}
nsresult
nsProfile::OpenRegistry()
{
@ -295,13 +306,13 @@ nsProfile::StartupWithArgs(nsICmdLineService *cmdLineArgs)
rv = LoadDefaultProfileDir(profileURLStr);
// Closing the registry that was opened in Startup()
m_reg->Close();
rv = CloseRegistry();
#ifdef DEBUG_profile
printf("Profile Manager : Profile Wizard and Manager activites : End\n");
#endif
return NS_OK;
return rv;
}
@ -1701,7 +1712,9 @@ NS_IMETHODIMP nsProfile::StartCommunicator(const char* profileName)
NS_WITH_SERVICE(nsIBookmarksService, bookmarks, kBookmarksCID, &rv);
if (NS_FAILED(rv)) return rv;
rv = bookmarks->ReadBookmarks();
if (NS_FAILED(rv)) return rv;
rv = CloseRegistry();
return rv;
}