diff --git a/profile/resources/.cvsignore b/profile/resources/.cvsignore new file mode 100644 index 00000000000..e69de29bb2d diff --git a/profile/resources/Makefile.in b/profile/resources/Makefile.in new file mode 100644 index 00000000000..c444a786ee0 --- /dev/null +++ b/profile/resources/Makefile.in @@ -0,0 +1,44 @@ +#!gmake +# +# 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. + +DEPTH=../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +include $(topsrcdir)/config/config.mk + +include $(topsrcdir)/config/rules.mk + +FILES = \ + content1.xul \ + content2.xul \ + content3.xul \ + content4.xul \ + cpw.xul \ + navigation.xul \ + common.css \ + $(NULL) + + +FILES := $(addprefix $(srcdir)/, $(FILES)) + +install:: + $(INSTALL) $(FILES) $(DIST)/bin/res/profile + diff --git a/profile/resources/common.css b/profile/resources/common.css new file mode 100644 index 00000000000..e69de29bb2d diff --git a/profile/resources/content1.xul b/profile/resources/content1.xul new file mode 100644 index 00000000000..28a01ec4c68 --- /dev/null +++ b/profile/resources/content1.xul @@ -0,0 +1,50 @@ + + + + + + + + + + + +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 new file mode 100644 index 00000000000..8309ccbbb79 --- /dev/null +++ b/profile/resources/content2.xul @@ -0,0 +1,52 @@ + + + + + + + + + + + +

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

+ +

+ + +

+Please click Next to continue +

+
\ No newline at end of file diff --git a/profile/resources/content3.xul b/profile/resources/content3.xul new file mode 100644 index 00000000000..2e7172ff312 --- /dev/null +++ b/profile/resources/content3.xul @@ -0,0 +1,48 @@ + + + + + + + + + + + +

+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 new file mode 100644 index 00000000000..a5e2cb58315 --- /dev/null +++ b/profile/resources/content4.xul @@ -0,0 +1,47 @@ + + + + + + + + + + + +

+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 Exit and start apprunner again for this new profile +to be used. + +

+ +
\ No newline at end of file diff --git a/profile/resources/cpw.xul b/profile/resources/cpw.xul new file mode 100644 index 00000000000..30a64ed9843 --- /dev/null +++ b/profile/resources/cpw.xul @@ -0,0 +1,110 @@ + + + + + + + + + + + +var toolkitCore; +nameGlobal = new Array(); +nameArray = new Array(); +count = 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 !=count; 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[count] = name+"="+value+"%"; + dump("Name Value: "+name+" "+value+"\n"); + + nameArray[count] = name; + count++; + } +} + +function Finish() +{ + var data = ""; + var i = 0; + dump("before for loop\n"); + for (i = 0; i !=count; 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); + } + + toolkitCore = XPAppCoresManager.Find("toolkitCore"); + if (!toolkitCore) { + toolkitCore = new ToolkitCore(); + + if (toolkitCore) { + toolkitCore.Init("toolkitCore"); + } + } + if (toolkitCore) { + toolkitCore.CloseWindow(parent); + } +} + + + + + + + \ No newline at end of file diff --git a/profile/resources/makefile.win b/profile/resources/makefile.win new file mode 100644 index 00000000000..370f019be57 --- /dev/null +++ b/profile/resources/makefile.win @@ -0,0 +1,34 @@ +#!gmake +# +# 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. + +DEPTH=..\.. +MODULE=profile + +include <$(DEPTH)\config\rules.mak> + +FILES=\ + content1.xul \ + content2.xul \ + content3.xul \ + content4.xul \ + cpw.xul \ + navigation.xul \ + common.css \ + $(NULL) + +install:: + -for %i in ($(FILES:/=\)) do @$(MAKE_INSTALL) %i $(DIST)\bin\res\rdf diff --git a/profile/resources/navigation.xul b/profile/resources/navigation.xul new file mode 100644 index 00000000000..3b43957088a --- /dev/null +++ b/profile/resources/navigation.xul @@ -0,0 +1,75 @@ + + + + + + + + + + + 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