From 79493f4697df87edc695f3329af778707935097d Mon Sep 17 00:00:00 2001 From: "gayatrib%netscape.com" Date: Tue, 6 Jul 1999 08:26:47 +0000 Subject: [PATCH] Modified the xul files to reflect the new window tag syntax --- profile/resources/content1.xul | 52 --------- profile/resources/content2.xul | 64 ---------- profile/resources/content3.xul | 63 ---------- profile/resources/content4.xul | 58 ---------- profile/resources/contentManager4.xul | 51 -------- profile/resources/cpw.xul | 5 +- profile/resources/cpwManager.xul | 105 ----------------- profile/resources/cpwPreg.xul | 109 ------------------ profile/resources/navFinishPreg.xul | 5 +- profile/resources/navStartPreg.xul | 6 +- profile/resources/navigation.xul | 75 ------------ profile/resources/navigationFinish.xul | 4 +- profile/resources/navigationManagerFinish.xul | 6 +- profile/resources/navigationManagerStart.xul | 4 +- profile/resources/navigationStart.xul | 4 +- profile/resources/pm.xul | 74 +++++++++++- profile/resources/pmDelete.xul | 21 ++++ profile/resources/pmrename.xul | 5 +- profile/resources/profileManagerContainer.xul | 63 ---------- 19 files changed, 108 insertions(+), 666 deletions(-) create mode 100644 profile/resources/pmDelete.xul diff --git a/profile/resources/content1.xul b/profile/resources/content1.xul index 6a1b4aa1194..e69de29bb2d 100644 --- a/profile/resources/content1.xul +++ b/profile/resources/content1.xul @@ -1,52 +0,0 @@ - - - - - - - - - - - - - -Communicator Profile Manager -

-Creating a New Profile -

-Communicator stores information about your settings, preferences, bookmarks and -

-stored messages in your personal profile. -

- -

-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. -

- -

-If you are the only person using this copy of Communicator, you must create atleast -

-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. -

- - -

-To begin Creating your profile, click Next. -

- -
\ No newline at end of file diff --git a/profile/resources/content2.xul b/profile/resources/content2.xul index f06895b9565..e69de29bb2d 100644 --- a/profile/resources/content2.xul +++ b/profile/resources/content2.xul @@ -1,64 +0,0 @@ - - - - - - - - - - - - - -

-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. -

- -

-Enter New Profile name -

- -

- -

-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). -

- -

- -
- diff --git a/profile/resources/content3.xul b/profile/resources/content3.xul index be588ea0ab6..e69de29bb2d 100644 --- a/profile/resources/content3.xul +++ b/profile/resources/content3.xul @@ -1,63 +0,0 @@ - - - - - - - - - - - - - -

-Please Enter name and information for the profile. This information will be -

-saved in the preferences of the new profile. -

- -

-Full name -

- (e.g. John Smith) -

- -

-Email Address if available -

- (e.g. jsmith@company.com) -

- -

-Please click Next to continue -

- -
\ No newline at end of file diff --git a/profile/resources/content4.xul b/profile/resources/content4.xul index f29f37709b3..e69de29bb2d 100644 --- a/profile/resources/content4.xul +++ b/profile/resources/content4.xul @@ -1,58 +0,0 @@ - - - - - - - - - - - - - -

-Communicator now has enough information to setup your basic profile. -

-However, Communicator needs additional information if you want to -

-send or receive email or use newsgroups. If you do not know the -

-information requested, please contact your system administrator or -

-Internet Service Provider. -

- -

-Outgoing SMTP server -

- -

- -

- -Click Finish and start apprunner again for this new profile -to be used. - -

- -
diff --git a/profile/resources/contentManager4.xul b/profile/resources/contentManager4.xul index c298c05a645..e69de29bb2d 100644 --- a/profile/resources/contentManager4.xul +++ b/profile/resources/contentManager4.xul @@ -1,51 +0,0 @@ - - - - - - - - - - - - - -

-Communicator now has enough information to setup your basic profile. -

-However, Communicator needs additional information if you want to -

-send or receive email or use newsgroups. If you do not know the -

-information requested, please contact your system administrator or -

-Internet Service Provider. -

- -

-Outgoing SMTP server -

- -

- -
\ No newline at end of file diff --git a/profile/resources/cpw.xul b/profile/resources/cpw.xul index f4a501c4069..a7ac229e66d 100644 --- a/profile/resources/cpw.xul +++ b/profile/resources/cpw.xul @@ -3,14 +3,13 @@ - - + var profName = ""; @@ -115,4 +114,6 @@ function Finish() + + diff --git a/profile/resources/cpwManager.xul b/profile/resources/cpwManager.xul index 1d79aced248..e69de29bb2d 100644 --- a/profile/resources/cpwManager.xul +++ b/profile/resources/cpwManager.xul @@ -1,105 +0,0 @@ - - - - - - - - - -var profName = ""; -var profDir = ""; -var fullName = ""; -var emailAddr = ""; -var smtpVal = ""; - -var toolkitCore; -nameGlobal = new Array(); -nameArray = new Array(); -var count = 0; -var dataCount = 0; - -function Startup() -{ - //dump("Doing Startup...\n"); - toolkitCore = XPAppCoresManager.Find("toolkitCore"); - if (!toolkitCore) { - toolkitCore = new ToolkitCore(); - - if (toolkitCore) { - toolkitCore.Init("toolkitCore"); - } - } -} - - -function SetValue(name, value) -{ - //dump("Inside SetValue\n"); - var found = false; - for (i = 0; i !=dataCount; i++) { - if (nameArray[i] == name) { - //dump("Name exists: "+nameGlobal[i]+"\n"); - nameGlobal[i] = name+"="+value+"%"; - //dump("New values: "+name+" "+value+"\n"); - found = true; - break; - } - } - - - if (!found) { - //dump("Name does not exist\n"); - nameGlobal[dataCount] = name+"="+value+"%"; - //dump("Name Value: "+name+" "+value+"\n"); - - nameArray[dataCount] = name; - dataCount++; - } -} - -function Finish() -{ - var data = ""; - var i = 0; - //dump("before for loop\n"); - for (i = 0; i !=dataCount; i++) { - data = data+nameGlobal[i]; - } - dump("DATA IS: "+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"); - } - } - - if (profileCore) { - //dump("yes profileCore\n"); - profileCore.CreateNewProfile(data); - } - -} - - - - - - - \ No newline at end of file diff --git a/profile/resources/cpwPreg.xul b/profile/resources/cpwPreg.xul index da1e5a70d40..e69de29bb2d 100644 --- a/profile/resources/cpwPreg.xul +++ b/profile/resources/cpwPreg.xul @@ -1,109 +0,0 @@ - - - - - - - - - - - - - -var profName = ""; -var profDir = ""; -var fullName = ""; -var emailAddr = ""; -var smtpVal = ""; - -var toolkitCore; -nameGlobal = new Array(); -nameArray = new Array(); -var count = 0; -var dataCount = 0; - -function Startup() -{ - //dump("Doing Startup...\n"); - toolkitCore = XPAppCoresManager.Find("toolkitCore"); - if (!toolkitCore) { - toolkitCore = new ToolkitCore(); - - if (toolkitCore) { - toolkitCore.Init("toolkitCore"); - } - } -} - -function SetValue(name, value) -{ - //dump("Inside SetValue\n"); - var found = false; - for (i = 0; i !=dataCount; i++) { - if (nameArray[i] == name) { - //dump("Name exists: "+nameGlobal[i]+"\n"); - nameGlobal[i] = name+"="+value+"%"; - //dump("New values: "+name+" "+value+"\n"); - found = true; - break; - } - } - - - if (!found) { - //dump("Name does not exist\n"); - nameGlobal[dataCount] = name+"="+value+"%"; - //dump("Name Value: "+name+" "+value+"\n"); - - nameArray[dataCount] = name; - dataCount++; - } -} - -function Finish() -{ - var data = ""; - var i = 0; - //dump("before for loop\n"); - for (i = 0; i !=dataCount; i++) { - data = data+nameGlobal[i]; - } - dump("DATA IS: "+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"); - } - } - - if (profileCore) { - //dump("yes profileCore\n"); - profileCore.CreateNewProfile(data); - profileCore.StartCommunicator(profName); - } - -} - - - - - - - diff --git a/profile/resources/navFinishPreg.xul b/profile/resources/navFinishPreg.xul index 69a086f740b..c2c0b580f3b 100644 --- a/profile/resources/navFinishPreg.xul +++ b/profile/resources/navFinishPreg.xul @@ -4,14 +4,12 @@ - - - + var count = parent.count; @@ -70,4 +68,5 @@ Finish + diff --git a/profile/resources/navStartPreg.xul b/profile/resources/navStartPreg.xul index d74dfc7cf57..728e9acd463 100644 --- a/profile/resources/navStartPreg.xul +++ b/profile/resources/navStartPreg.xul @@ -4,15 +4,12 @@ - - - - + var count = parent.count; @@ -60,4 +57,5 @@ Next + diff --git a/profile/resources/navigation.xul b/profile/resources/navigation.xul index 3b43957088a..e69de29bb2d 100644 --- a/profile/resources/navigation.xul +++ b/profile/resources/navigation.xul @@ -1,75 +0,0 @@ - - - - - - - - - - - var count = 0; - - pages = new Object(); - pages[0] = "resource:/res/profile/content1.xul"; - pages[1] = "resource:/res/profile/content2.xul"; - pages[2] = "resource:/res/profile/content3.xul"; - pages[3] = "resource:/res/profile/content4.xul"; - - function BrowserLoadURL(func) - { - if (func == "Prev") { - if (count > 0) { - count = count - 1; - } - } - - if (func == "Next") { - if (count != 3) { - count = count + 1; - } - } - - parent.frames[0].commit(); - parent.frames[0].location.replace( pages[count] ); - } - - - function SetValue(name, value) - { - dump("Set Value"); - dump("name: "+name+"\n"); - dump("value: "+value+"\n"); - } - - - function ExitWizard() - { - parent.frames[0].commit(); - parent.Finish(); - var toolkitCore = XPAppCoresManager.Find("toolkitCore"); - if (!toolkitCore) { - toolkitCore = new ToolkitCore(); - - if (toolkitCore) { - toolkitCore.Init("toolkitCore"); - } - } - - if (toolkitCore) { - toolkitCore.CloseWindow(parent); - } - } - - - - - Prev - Next - Exit - - - \ No newline at end of file diff --git a/profile/resources/navigationFinish.xul b/profile/resources/navigationFinish.xul index 711c64c8a2e..abf66f88899 100644 --- a/profile/resources/navigationFinish.xul +++ b/profile/resources/navigationFinish.xul @@ -3,13 +3,12 @@ - - + var count = parent.count; @@ -66,4 +65,5 @@ Finish + diff --git a/profile/resources/navigationManagerFinish.xul b/profile/resources/navigationManagerFinish.xul index d17b4179ad3..5862f7c2fcf 100644 --- a/profile/resources/navigationManagerFinish.xul +++ b/profile/resources/navigationManagerFinish.xul @@ -3,13 +3,12 @@ - - + var count = parent.count; @@ -45,7 +44,7 @@ { parent.frames[0].commit(); parent.Finish(); - parent.location.replace("resource:/res/profile/profileManager.html"); + parent.location.replace("resource:/res/profile/pm.xul"); } @@ -55,4 +54,5 @@ Finish + \ No newline at end of file diff --git a/profile/resources/navigationManagerStart.xul b/profile/resources/navigationManagerStart.xul index 632aa80cbf4..2b926099e0e 100644 --- a/profile/resources/navigationManagerStart.xul +++ b/profile/resources/navigationManagerStart.xul @@ -3,13 +3,12 @@ - - + var count = parent.count; @@ -57,4 +56,5 @@ Next + \ No newline at end of file diff --git a/profile/resources/navigationStart.xul b/profile/resources/navigationStart.xul index 7fc0e6420c6..fd99c9dd9a9 100644 --- a/profile/resources/navigationStart.xul +++ b/profile/resources/navigationStart.xul @@ -3,14 +3,13 @@ - - + var count = parent.count; @@ -58,4 +57,5 @@ Next + diff --git a/profile/resources/pm.xul b/profile/resources/pm.xul index f8ba4441653..f296e1adf37 100644 --- a/profile/resources/pm.xul +++ b/profile/resources/pm.xul @@ -2,13 +2,12 @@ - - + var profileCore = ""; @@ -53,12 +52,32 @@ function MigrateProfile(override) function MigrateAllProfiles() { var body = document.getElementById("theTreeBody"); - var child = body.firstChild; + dump("I am here 1\n"); + dump("body: "+body); + + var child = body.getChild; + dump("I am here 2\n"); + dump("child: "+child+"\n"); + while (child) { + dump("Inside while loop\n\n"); dump("Child : " + child); + + var var3 = child.getAttribute("rowMigrate"); + dump("var3: "+var3+"\n"); + if (child.getAttribute("rowMigrate") == "true") + { + dump("Child to be migrated: "+child+"\n"); + + var var1 = child.getAttribute("rowName"); + var var2 = child.getAttribute("rowMigrate"); + dump("var1: "+var1+"\n"); + dump("var1: "+var2+"\n"); + MigrateProfile(child); + } child = child.nextSibling; } } @@ -102,6 +121,27 @@ function DeleteProfile() this.location.replace(this.location); } +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") + { + dump("Migrate this profile before using it to start communicator.\n"); + return; + } + profileCore.StartCommunicator(name); + ExitApp(); +} + function ExitApp() { var toolkitCore = XPAppCoresManager.Find("toolkitCore"); @@ -209,6 +249,27 @@ function openRename() } } + +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; +} + @@ -270,7 +331,7 @@ bookmarks, and stored messages in your personal profile. - + @@ -279,9 +340,10 @@ bookmarks, and stored messages in your personal profile. - - + + + diff --git a/profile/resources/pmDelete.xul b/profile/resources/pmDelete.xul new file mode 100644 index 00000000000..1dcc90cf10e --- /dev/null +++ b/profile/resources/pmDelete.xul @@ -0,0 +1,21 @@ + + + + + + + + + +Confirm delete? + + + + + + + diff --git a/profile/resources/pmrename.xul b/profile/resources/pmrename.xul index eb1eefc15b6..50069cf372d 100644 --- a/profile/resources/pmrename.xul +++ b/profile/resources/pmrename.xul @@ -2,14 +2,14 @@ - - + + Enter a new name for the profile: @@ -17,4 +17,5 @@ Enter a new name for the profile: + diff --git a/profile/resources/profileManagerContainer.xul b/profile/resources/profileManagerContainer.xul index a2c08776ddd..e69de29bb2d 100644 --- a/profile/resources/profileManagerContainer.xul +++ b/profile/resources/profileManagerContainer.xul @@ -1,63 +0,0 @@ - - - - - - - - - - - - -var curProfileName; -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"); - } -} - -function GetProfileCore() -{ - //dump("****************In GetProfileCore\n"); - return profileCore; -} - - - - -function SetProfileName(profName) -{ - //dump("****************In SetProfileName\n"); - //dump("********************************ProfileName: "+profName+"\n"); - curProfileName = profName; -} - -function GetProfileName() -{ - //dump("****************In GetProfileName\n"); - //dump("********************************ProfileName: "+curProfileName+"\n"); - - return curProfileName; -} - - - - - - \ No newline at end of file