Compare commits
1 Commits
montulli
...
tags/SMART
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54ddf75a37 |
37715
mozilla/CHANGES.html
@@ -1,18 +1,15 @@
|
||||
Please be apprised of the following Legal Notices:
|
||||
|
||||
A) The U.S. District Court for the Eastern District of Virginia has
|
||||
ruled that the Netscape Navigator code does not infringe Wang's U.S.
|
||||
Patent No. 4,751,669 ("the '669 Patent") because: 1) HTML is not
|
||||
Videotex as defined by the '669 patent; 2) web servers are not central
|
||||
suppliers; and 3) Navigator does not "connect," as defined by the '669
|
||||
Patent, to web servers on the Internet. Wang may appeal this decision to
|
||||
the Federal Circuit. Wang contended that its Patent disclosing a
|
||||
"Videotext" system, is infringed by the following functionality in the
|
||||
Netscape Navigator code: 1) the animated logo and status line indicators
|
||||
--See Claims 1,8 and 9; 2) the "File Save As" function --See Claims
|
||||
23-27; 3) Bookmarks and Rename Bookmarks in the Properties window --See
|
||||
Claims 20-22; 4) storing HTML, GIF, and JPEG files and adding filename
|
||||
extensions --See Claim 38
|
||||
A) Wang contends that its U.S. Patent No. 4, 751,669 ("the '669
|
||||
Patent") disclosing a "video text" system, is infringed by the following
|
||||
functionality in the Netscape Navigator code: 1) the animated logo and
|
||||
status line indicators --See Claims 1,8 and 9; 2) the "File Save As"
|
||||
function --See Claims 23-27; 3) Bookmarks and Rename Bookmarks in the
|
||||
Properties window --See Claims 20-22; 4) storing HTML, GIF, and JPEG
|
||||
files and adding filename extensions based on mime types (performed in
|
||||
Windows OS) --See Claim 38. Netscape believes the '669 Patent is
|
||||
invalid and non-infringed. Netscape is vigorously defending against
|
||||
Wang's claims.
|
||||
|
||||
B) Intermind owns pending U.S. patent applications on communications
|
||||
systems which employ metadata ("channel objects") to define a control
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 12 KiB |
@@ -1,400 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Building Mozilla on the Macintosh PPC platform</TITLE>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B"
|
||||
ALINK="#FF0000">
|
||||
<HR>
|
||||
<H1>
|
||||
Building Mozilla on the Macintosh PPC platform</H1>
|
||||
|
||||
<H2>
|
||||
Daniel Nunes, <TT><A HREF="mailto:leaf@netscape.com">leaf@netscape.com</A></TT>
|
||||
</H2>
|
||||
v 1.0, June 1998
|
||||
|
||||
<P>
|
||||
<HR><I>How to build Mozilla on a Macintosh PPC System.</I>
|
||||
<HR>
|
||||
<H2>1. <A HREF="#s1">Introduction</A></H2>
|
||||
|
||||
<H2>2. <A HREF="#s2">Building Mozilla</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI>
|
||||
<A HREF="#ss2.1">2.1 Get the Code </A></LI>
|
||||
|
||||
<LI>
|
||||
<A HREF="#ss2.2">2.2 Requirements</A></LI>
|
||||
|
||||
<LI>
|
||||
<A HREF="#ss2.3">2.3 Set up the Build Environment</A></LI>
|
||||
|
||||
<LI>
|
||||
<A HREF="#ss2.4">2.4 Build the Lizard </A></LI>
|
||||
</UL>
|
||||
|
||||
<H2>3. <A HREF="#s3"> Common Problems </A></H2>
|
||||
|
||||
<H2>4. <A HREF="#s4"> Credits </A></H2>
|
||||
|
||||
<HR>
|
||||
<H2><A NAME="s1">1. Introduction</A></H2>
|
||||
|
||||
<P>
|
||||
What this document is: A guide to building the Mozilla application.
|
||||
This includes:
|
||||
<OL>
|
||||
<LI> A listing of the development tools you will need to build Mozilla. </LI>
|
||||
<LI> A list of environment variables you will need to set before building. </LI>
|
||||
</OL>
|
||||
<P>
|
||||
If you're looking for documentation on developing features or fixing bugs,
|
||||
the Mozilla
|
||||
<A HREF="http://www.mozilla.org/docs/tplist/tplist.html">Technical Documents
|
||||
</A> or <A HREF="http://www.mozilla.org/library.html"> Library </A>
|
||||
are probably what you're looking for.
|
||||
<P>
|
||||
<HR>
|
||||
<H2><A NAME="s2">2. Building Mozilla </A></H2>
|
||||
<P>
|
||||
<UL>Each of the following subsections describes, or gives references to
|
||||
descriptions of, the steps necessary to build Mozilla.
|
||||
<H2><A NAME="ss2.1">2.1 Get the Code</A></H2>
|
||||
<P>
|
||||
<UL>
|
||||
There are two principal ways of getting the code,
|
||||
<A HREF="http://www.mozilla.org/download.html"> ftp</A> and
|
||||
<A HREF="http://www.mozilla.org/cvs.html"> CVS</A>.
|
||||
CVS will provide the most current code for building, but is
|
||||
slower than ftp (takes longer to download).
|
||||
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="ss2.2">2.2 Requirements</A></H2>
|
||||
The following need to be installed:
|
||||
<UL>
|
||||
<LI>CodeWarrior (CW) 2 - obtainable from
|
||||
<A HREF="http://www.metrowerks.com">Metrowerks</A>.
|
||||
See <A HREF="#s3">Common Sticking Points</A> if you have a different
|
||||
version.
|
||||
</LI>
|
||||
|
||||
<LI>PowerPlant 1.8 - obtainable from the CodeWarrior CD.</LI>
|
||||
|
||||
<LI>MSL - the Metrowerks Standard Library, obtainable from the
|
||||
CodeWarrior CD</LI>
|
||||
|
||||
<LI><A HREF="ftp://ftp.boingo.com//dan/WASTE/waste-13.hqx">WASTE
|
||||
1.3</A></LI>
|
||||
|
||||
<LI><A HREF="http://www.bact.wisc.edu/CWASTEEdit/CWASTEEdit.sit.hqx">CWASTE
|
||||
1.6.2</A></LI>
|
||||
|
||||
<LI>
|
||||
<A HREF="ftp://ftp.scripting.com/userland/menuSharingToolkit4.1.sit.hqx">
|
||||
Menu Sharing Toolkit</A> (from UserLand)</LI>
|
||||
|
||||
<LI>
|
||||
<A HREF="ftp://ftp.digitalalchemy.com/pub/digitalalchemy/mercutio-SDK.sit.bin">
|
||||
Mercutio 1.5 SDK</A> (only download the SDK, not the entire package, else
|
||||
the access paths will be wrong)</LI>
|
||||
|
||||
<LI>
|
||||
<A HREF="ftp://ftp.share.com/pub/internet-configuration/ICProgKit1.4.sit">
|
||||
Internet Config 1.4 SDK</A></LI>
|
||||
|
||||
<LI><A HREF="http://www.mooseyard.com/Jens/Software/">AEGizmos
|
||||
1.4.2</A></LI>
|
||||
|
||||
<LI><A HREF="ftp://sunsite.cnlab-switch.ch/software/platform/macos/perl/Mac_Perl_520r4_tool.bin">
|
||||
MacPerl 5 MPW Tool</A></LI>
|
||||
|
||||
<LI>
|
||||
<A HREF="ftp://sunsite.cnlab-switch.ch/software/platform/macos/perl/Mac_Perl_520r4_appl.bin">MacPerl 5 Application</A></LI>
|
||||
|
||||
<LI>MakeStub - MPW (installed with CodeWarrior Heaven option). If
|
||||
you choose not to install MPW, it is located on the MacOS Tools CD
|
||||
in "CW Pro 2 Tools:CodeWarrior MPW:MPW:Tools"</LI>
|
||||
|
||||
<LI>RunTSScript - in Mozilla source distribution
|
||||
(mozilla:build:mac:RunTSScript), needs to be installed by hand</LI>
|
||||
|
||||
<LI><A HREF="ftp://dev.apple.com/devworld/Tool_Chest/Core_Mac_OS_Tools/MPW_etc./MPW-GM/MPW/ToolServer.sit.hqx">ToolServer</A>
|
||||
- or in the CW distribution (CW Pro 2 Tools:Apple Development
|
||||
Tools:ToolServer 3.4.1.sit). <B>We recommend pulling it off the
|
||||
CD</B> because it comes with configuration files for CodeWarrior
|
||||
which you would have to create manually were you to pull it off
|
||||
the net.</LI>
|
||||
|
||||
<LI>
|
||||
<A HREF="http://people.netscape.com/sfraser/software/NewAlias_tool.sit.hqx">
|
||||
New Alias MPW Tool</A> An MPW tool that creates Finder aliases for files.
|
||||
</LI>
|
||||
|
||||
<LI>StreamEdit MPW Tool - MPW (installed with CodeWarrior Heaven option). If
|
||||
you choose not to install MPW, it is located on the MacOS Tools CD
|
||||
in "CW Pro 2 Tools:CodeWarrior MPW:MPW:Tools"</LI>
|
||||
</LI>
|
||||
|
||||
<LI>
|
||||
<A HREF="ftp://dev.apple.com/devworld/Periodicals/develop/develop25/develop_Issue_25_code/ToolFrontEnd.sit.hqx">ToolFrontEnd</A></LI>
|
||||
|
||||
<LI>
|
||||
<A HREF="http://sunsite.cnlab-switch.ch/ftp/software/platform/macos/src/HTML/MPW_C.html">
|
||||
patch 2.1</A></LI>
|
||||
</UL>
|
||||
|
||||
<P>
|
||||
Hardware/OS
|
||||
<UL>
|
||||
<LI>To build Navigator, you need a fast PPC Mac. The faster the
|
||||
better. You can't build with a 68K machine because we have too many
|
||||
resources, and the build process will crash when trying to generate
|
||||
resources out of our cross-platform strings. See the discussion below
|
||||
for a way around this.
|
||||
</LI>
|
||||
<LI>You will need about 96 MB of physical RAM to "fast link" the app.
|
||||
You can still fast link if you give your machine 96 MB of virtual
|
||||
memory, but then the VM hit is large enough to counteract any
|
||||
improvement. One of our beta testers had a machine with only 64MB of
|
||||
physical RAM (VM was off) and it ran out of memory trying to link.
|
||||
Turning VM on got it to link, but build time increased greatly.
|
||||
</LI>
|
||||
<LI>Reports from the net indicate that the optimized version
|
||||
(MozillaPPC) take much less RAM to build than the 96MB we suggest. If
|
||||
you are running out of memory, try building that instead of the debug
|
||||
version (the debug symbols require a lot of RAM come link time).
|
||||
</LI>
|
||||
<LI>You should be ok with a 400MB disk partition, even when fully
|
||||
built. This does not include tools like the IDE, just source.
|
||||
</LI>
|
||||
<LI>On an HFS+ volume, a full build takes about 110MB. HFS+ is good,
|
||||
but utilities are sparse.
|
||||
</LI>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="ss2.3">2.3 Setup the Build Environment</A></H2>
|
||||
<P>
|
||||
<OL>
|
||||
<LI>Install CodeWarrior from the CD. While it is large, installing
|
||||
the "CodeWarrior Heaven" option will guarantee that you have
|
||||
everything you need. This will give you PowerPlant, MSL, and MPW.
|
||||
If you choose to install less, proceed at your own risk.</LI>
|
||||
|
||||
<LI>In the Finder, increase the memory partition of the IDE to
|
||||
15MB (you can get by with 12, if need be).</LI>
|
||||
|
||||
<LI>Download ToolFrontEnd. After expanding it, in "ToolFrontEnd
|
||||
Folder:Drop-Ins" there are three items:
|
||||
|
||||
<UL>
|
||||
<LI><I>#include</I></LI>
|
||||
|
||||
<LI><I>ToolFrontEnd</I></LI>
|
||||
|
||||
<LI><I>ToolFrontEnd Panel</I></LI>
|
||||
</UL>
|
||||
|
||||
<P>Create a folder named "Include Scanners". Place the file
|
||||
"#include" into the Include Scanners folder. Move the Include
|
||||
Scanners folder to the CodeWarrior Plugins folder. Create a folder
|
||||
named "ToolFrontEnd". Place the files "ToolFrontEnd" and
|
||||
"ToolFrontEnd Panel" into the ToolFrontEnd folder. Place this
|
||||
folder in the CodeWarrior Plugins folder.</P></LI>
|
||||
|
||||
<LI>Open "ToolFrontEnd Panel" with ResEdit. Change the file type
|
||||
from <B>'Panl'</B> to <B>'PanL'</B>. Save.</LI>
|
||||
|
||||
<LI>Uncompress the StuffIt Archive for ToolServer. The goal is to
|
||||
let ToolServer and MPW share the same Tools directory so you don't
|
||||
need to have multiple versions of tools. Do the following:
|
||||
|
||||
<OL>
|
||||
<LI>Open ToolServer's Tools folder. There is one file called
|
||||
"RMetrowerks". </LI>
|
||||
|
||||
<LI>Move RMetrowerks to Tools folder of MPW. MPW folder must be
|
||||
at "Metrowerks:Codewarrior MPW:MPW" if you installed
|
||||
Codewarrior Heaven. </LI>
|
||||
|
||||
<LI>Remove ToolServer's Tools folder.</LI>
|
||||
|
||||
<LI>Now create an alias of Tools folder in "CodeWarrior MPW"
|
||||
and move it to your ToolServer folder. Rename the alias
|
||||
(probably called "Tools alias") to "Tools"</LI>
|
||||
|
||||
|
||||
<LI><FONT COLOR="#FF0000"><B>IMPORTANT</B></FONT>: Make sure
|
||||
you only have one instance of ToolServer on your machine. If
|
||||
the build script finds the wrong one, the correct tools will
|
||||
not be found and strange things will happen.</LI>
|
||||
</OL>
|
||||
</LI>
|
||||
|
||||
<LI>After installing the MacPerl MPW Tool distribution (run the
|
||||
InstallerVISE application), in the "MacPerl ƒ" folder, there
|
||||
will be an MPW tool named "perl". Install this in MPW's tools
|
||||
folder.</LI>
|
||||
|
||||
<LI>Install the MacPerl Application (run the
|
||||
InstallerVISE application). You can install this anywhere, but it is
|
||||
recommended that you install it inside of your CodeWarrior folder for
|
||||
easy reference. After installation, you will need to set a preference
|
||||
to enable double-click launch of the perl scripts. This preference is set
|
||||
by going under the Edit Menu to Preferences. Click on the "Script" button
|
||||
and hit the radio button "Run Scripts opened from Finder"</LI>
|
||||
|
||||
<LI>Install the "patch", "MakeStub", "NewAlias" and "StreamEdit" Tools in the
|
||||
tools
|
||||
folder. Note that "MakeStub" and "StreamEdit" are automatically installed by the
|
||||
"CodeWarrior Heaven" install option.</LI>
|
||||
|
||||
<LI>Install RunTSScript (found in the Mozilla source distribution)
|
||||
in the compilers folder in your build environment
|
||||
("Metrowerks:Metrowerks Codewarrior:Codewarrior
|
||||
Plugins:Compilers")</LI>
|
||||
|
||||
<LI>Next, after downloading all the 3rd party software components,
|
||||
drag WASTE, CWASTE, Menu Sharing, Mercutio, Internet Config, and
|
||||
the AEGizmo folders (just as they are) into the "MacOS Support"
|
||||
folder in your build environment.</LI>
|
||||
|
||||
<LI>Start ToolServer from within CodeWarrior (or use MPW if you
|
||||
are brave enough). We're about to patch some files. Make sure the
|
||||
ToolServer menu is in the CodeWarrior menu bar by turning on the
|
||||
<A HREF="IDEPrefs.gif">preference</A> under the "Extras" panel in
|
||||
the IDE Preferences (not the project preferences!). The menu bar
|
||||
should look like this:
|
||||
|
||||
|
||||
<P><IMG SRC="IDEMenuBar.gif" WIDTH=359 HEIGHT=20 X-CLARIS-USEIMAGEWIDTH X-CLARIS-USEIMAGEHEIGHT ALIGN=bottom></P>
|
||||
|
||||
<P>Choose "Start ToolServer" from the ToolServer menu (this is the
|
||||
icon menu between "Window" and "Help" in the menubar above). You
|
||||
will now see a window with no close box. This is your ToolServer
|
||||
Worksheet where you will type (or cut & paste) the commands
|
||||
for the following steps.</P>
|
||||
|
||||
<P>In case you have never used MPW/ToolServer before, the
|
||||
following is <B>very important</B>. Pressing "return" does not
|
||||
execute commands like you might think. It just inserts a newline
|
||||
into the worksheet like a normal text editor. <B>To actually get
|
||||
ToolServer to execute the command, you must press "Enter" (lower
|
||||
right of numeric keypad).</B> This executes the line that the
|
||||
cursor is on, and only that line. If you want to execute multiple
|
||||
lines at once, select them all and hit Enter.</P></LI>
|
||||
|
||||
<LI>Set the shell variables {IDE} and {Source} to the correct
|
||||
paths for your build environment. {IDE} is where your CodeWarrior
|
||||
IDE is located. {Source} is the folder containing the toplevel
|
||||
"ns" folder of the Mozilla source. Mine look like this (don't
|
||||
forget to keep the quotes if your path includes spaces), yours
|
||||
will almost certainly be different (<FONT COLOR="#FF0000">to
|
||||
punctuate this, the things you need to change are in red</FONT>).
|
||||
|
||||
<PRE>Set IDE "<FONT COLOR="#FF0000">Develop:Source331 Build Environment:CW Pro 2:Metrowerks CodeWarrior:</FONT>"
|
||||
Set Source "<FONT COLOR="#FF0000">Source:FreeSource:</FONT>"</PRE>
|
||||
</LI>
|
||||
|
||||
<LI>If you are using CWPro2, execute the following lines to patch
|
||||
LDropFlag to draw correcly over non-white backgrounds.
|
||||
|
||||
<PRE>directory "{IDE}MacOS Support:PowerPlant:_In Progress:_Table Classes:"
|
||||
patch LDropFlag.cp "{Source}mozilla:lib:mac:patches:LDropFlag.patch"
|
||||
duplicate -y "{Source}mozilla:lib:mac:patches:DropFlag Icons.rsrc" "{IDE}MacOS Support:PowerPlant:PowerPlant Resources:"</PRE></LI>
|
||||
|
||||
<LI>Execute the following lines to patch menusharing.c to allow it
|
||||
to compile with the new Universal Headers. It references an
|
||||
obsolete header file (GestaltEqu.h).
|
||||
|
||||
<PRE>directory "{IDE}MacOS Support:Menu Sharing Toolkit 4.1:"
|
||||
patch menusharing.c "{Source}mozilla:lib:mac:patches:menusharing.patch"</PRE></LI>
|
||||
|
||||
|
||||
<LI>If you are using CWPro2 straight off the CD, you need to patch
|
||||
AppleEvents.r to fix a problem with the Universal Headers (the
|
||||
definition of the 'aedt' resource was omitted). <B>You do not have
|
||||
to do this if you have applied the netborne patch to Pro2e
|
||||
</B> because it has been fixed.
|
||||
|
||||
<PRE>directory "{IDE}MacOS Support:Headers:Rez Headers:"
|
||||
patch AppleEvents.r "{Source}mozilla:lib:mac:patches:AppleEvents.r.patch"</PRE></LI>
|
||||
|
||||
<LI>You need to patch stat.mac.h to fix a problem in MSL where
|
||||
lines were omitted.
|
||||
|
||||
<PRE>directory "{IDE}Metrowerks Standard Library:MSL C:MSL Mac:Public Includes"
|
||||
patch stat.mac.h "{Source}mozilla:lib:mac:patches:stat.mac.h.patch"</PRE></LI>
|
||||
|
||||
<LI>Congratulations! Now you are ready to build. Once these steps
|
||||
are done, you don't have to repeat these setups the next
|
||||
time!</LI>
|
||||
</OL>
|
||||
|
||||
|
||||
<P>
|
||||
|
||||
<H2><A NAME="ss2.4">2.4 Run the build </A></H2>
|
||||
<UL>
|
||||
<P>In the folder mozilla:build:mac:, there are several Perl scripts with
|
||||
names of the form BuildMozillaXXX.pl, where XXX is "Optimized",
|
||||
"Debug", "Tinderbox", et al. Each script builds the corresponding
|
||||
version of Mozilla. If you configured the MacPerl application to
|
||||
execute scripts that are opened from the finder, all you have to do is
|
||||
double click on the appropriate one; otherwise, launch MacPerl, and
|
||||
run the appropriate script from the "Run Script..." menu item.</P>
|
||||
|
||||
<P>These `configured build' scripts are simple, and you might want to
|
||||
make your own to force your build to StopForErrors(), or alternatively
|
||||
DontStopForErrors(), et al. You can set up certain build-script
|
||||
variables and (soon) compile-time flags. Compare the supplied scripts
|
||||
to figure out what you might want. Note that CodeWarriorLib, Moz.pm,
|
||||
and BuildList.pm, are AppleScript libraries and Perl modules meant to
|
||||
be used by a `configured build'. Use your favorite POD viewer (Shuck
|
||||
comes with MacPerl) to view the documentation in the Perl scripts.</P>
|
||||
|
||||
<P>If there were any errors in any of the projects along the way, the
|
||||
script will stop at that point and the IDE will tell you the errors.
|
||||
You can fix them and make sure they current project builds, but to
|
||||
continue the automation, you have to start from the beginning by
|
||||
double-clicking the script again. This isn't quite as bad as it
|
||||
sounds because the previous projects are already built (unless you
|
||||
changed some major header file). Please note that stopping the script
|
||||
once it has started is difficult. We are working to address
|
||||
this issue.</P>
|
||||
|
||||
<P>After the build is complete, you can find aliases to the built libraries
|
||||
and the final Mozilla application. Debug builds are built to
|
||||
Mozilla:dist:client_debug, while optimized builds are built to Mozilla:dist:client.
|
||||
</P>
|
||||
|
||||
<P>Don't worry too much about the numerous warnings generated during
|
||||
the build. We try our best to get the XP teams to use real compilers,
|
||||
but alas, they continue to write warning-laden code. There is also
|
||||
some generated code (Java is one example) that has a lot of warnings
|
||||
that we can't help either. If you write any new code, please help us
|
||||
in our quest to get zero warnings.</P>
|
||||
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
<HR>
|
||||
<H2><A NAME="s3">3. Common Sticking Points</A></H2>
|
||||
<UL>
|
||||
<LI><B>I have CodeWarrior3, how do i build with it?</B>
|
||||
<UL> Currently, the answer is, "You don't." Eventually, the distribution
|
||||
will be modified to allow building using CodeWarrior3, but for now
|
||||
CodeWarrior2 is the only IDE that is supported.
|
||||
</UL>
|
||||
</LI>
|
||||
</UL>
|
||||
<HR>
|
||||
<H2><A NAME="s4">4. Credits</A></H2>
|
||||
<UL>
|
||||
The majority of this document is taken from the build document included
|
||||
in the Mozilla source distribution at README:mozilla:macbuild.htm written
|
||||
by Mike Pinkerton, <A HREF="mailto:pinkerton@netscape.com">
|
||||
pinkerton@netscape.com</A>.
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -1,137 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Building Mozilla on unix platforms</TITLE>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B"
|
||||
ALINK="#FF0000">
|
||||
<HR>
|
||||
<H1>
|
||||
Building Mozilla on Unix platforms</H1>
|
||||
|
||||
<H2>
|
||||
Daniel Nunes, <TT><A HREF="mailto:leaf@netscape.com">leaf@netscape.com</A></TT></H2>
|
||||
v 1.0, June 1998
|
||||
|
||||
<P>
|
||||
<HR><I>How to build Mozilla on a Unix System.</I>
|
||||
<HR>
|
||||
<H2>1. <A HREF="#s1">Introduction</A></H2>
|
||||
|
||||
<H2>2. <A HREF="#s2">Building Mozilla</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI>
|
||||
<A HREF="#ss2.1">2.1 Get the Code </A></LI>
|
||||
|
||||
<LI>
|
||||
<A HREF="#ss2.2">2.2 Requirements</A></LI>
|
||||
|
||||
<LI>
|
||||
<A HREF="#ss2.3">2.3 Set up the Build Environment</A></LI>
|
||||
|
||||
<LI>
|
||||
<A HREF="#ss2.4">2.4 Build the Lizard </A></LI>
|
||||
</UL>
|
||||
|
||||
<H2>3. <A HREF="#s3"> Common Problems </A></H2>
|
||||
|
||||
<HR>
|
||||
<H2><A NAME="s1">1. Introduction</A></H2>
|
||||
|
||||
<P>
|
||||
What this document is: A guide to building the Mozilla application.
|
||||
<BR>
|
||||
This includes:
|
||||
<OL>
|
||||
<LI> A listing of the development tools you will need to build Mozilla. </LI>
|
||||
<LI> A list of environment variables you will need to set before building. </LI>
|
||||
</OL>
|
||||
<P>
|
||||
If you're looking for documentation on developing features or fixing bugs,
|
||||
the Mozilla
|
||||
<A HREF="http://www.mozilla.org/docs/tplist/tplist.html">Technical Documents
|
||||
</A> or <A HREF="http://www.mozilla.org/library.html"> Library </A>
|
||||
are probably what you're looking for.
|
||||
<P>
|
||||
<HR>
|
||||
<H2><A NAME="s2">2. Building Mozilla </A></H2>
|
||||
<P>
|
||||
<UL>Each of the following subsections describes, or gives references to
|
||||
descriptions of, the steps necessary to build Mozilla.
|
||||
</UL>
|
||||
<H2><A NAME="ss2.1">2.1 Get the Code</A></H2>
|
||||
<P>
|
||||
<UL>
|
||||
There are two principal ways of getting the code,
|
||||
<A HREF="http://www.mozilla.org/download.html"> ftp</A> and
|
||||
<A HREF="http://www.mozilla.org/cvs.html"> CVS</A>.
|
||||
CVS will provide the least outdated code for building, but is
|
||||
slower than ftp.
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="ss2.2">2.2 Requirements</A></H2>
|
||||
<UL>
|
||||
The following need to be installed:
|
||||
<UL>
|
||||
<LI>Motif 1.2 (2.1 recommended for RedHat Linux)
|
||||
<LI>GNU C/C++ compiler 2.7.2
|
||||
<LI>GNU make 3.74 or better
|
||||
<LI>Perl (or, if you have no Perl, then set <CODE>PERL=/bin/echo</CODE>)
|
||||
</UL>
|
||||
<P>
|
||||
Your hardware should be equal to, or better than:
|
||||
<UL>
|
||||
32 MB RAM, 128 MB swap (64 MB RAM recommended)
|
||||
</UL>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="ss2.3">2.3 Setup the Build Environment</A></H2>
|
||||
<P>
|
||||
<UL>
|
||||
The following environment variables need to be set:
|
||||
<CODE>
|
||||
<PRE>
|
||||
MOZILLA_CLIENT=1
|
||||
MOZ_MEDIUM=1
|
||||
NO_SECURITY=1
|
||||
NO_MDUPDATE=1
|
||||
</PRE>
|
||||
</CODE>
|
||||
Optionally, you can set <CODE>BUILD_OPT=1</CODE> if you don't want a debug
|
||||
build.
|
||||
<BR>
|
||||
Environment variables are set by the shell, and each shell may or may not have
|
||||
its own way of setting them. Type <CODE>man setenv</CODE> to find out how your
|
||||
shell sets variables, if you don't know already.
|
||||
<P>
|
||||
</UL>
|
||||
|
||||
<H2><A NAME="ss2.4">2.4 Run the build </A></H2>
|
||||
<UL>
|
||||
Change to the directory you copied the source into (for example,
|
||||
<CODE>cd /builds</CODE>). If this directory was empty before you
|
||||
installed the source, there should be two directories here:
|
||||
<CODE>README</CODE> and <CODE>mozilla</CODE>.
|
||||
<CODE>
|
||||
<PRE>
|
||||
cd mozilla
|
||||
gmake
|
||||
</PRE>
|
||||
</CODE>
|
||||
</UL>
|
||||
<HR>
|
||||
<H2><A NAME="s3">3. Common Sticking Points</A></H2>
|
||||
<LI>My linker dies with this error: undefined reference to `_Xsetlocale'
|
||||
<UL>If this error occurs, you might have to recompile libX11.so
|
||||
with the -DX_LOCALE flag (thanks to Scott Lampert,
|
||||
<A HREF="mailto:fortunato@heavymetal.org">fortunato@heavymetal.org</A>).
|
||||
This problem stems from use of an older version of RedHat Motif.
|
||||
Moving to Motif 2.1 should resolve this. There are probably other problems
|
||||
with using the older versions of Motif, but i haven't encountered them.
|
||||
|
||||
</UL>
|
||||
<HR>
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -1,209 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Building Mozilla on Microsoft Windows 32-bit platforms</TITLE>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000EE" VLINK="#551A8B"
|
||||
ALINK="#FF0000">
|
||||
<HR>
|
||||
<H1>
|
||||
Building Mozilla on Microsoft Windows 32-bit platforms</H1>
|
||||
|
||||
<H2>
|
||||
Daniel Nunes, <TT><A HREF="mailto:leaf@netscape.com">leaf@netscape.com</A></TT>
|
||||
</H2>
|
||||
v 1.0, June 1998
|
||||
|
||||
<P>
|
||||
<HR><I>How to build Mozilla on a Microsoft Windows 32-bit System.</I>
|
||||
<HR>
|
||||
<H2>1. <A HREF="#s1">Introduction</A></H2>
|
||||
|
||||
<H2>2. <A HREF="#s2">Building Mozilla</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI>
|
||||
<A HREF="#ss2.1">2.1 Get the Code </A></LI>
|
||||
|
||||
<LI>
|
||||
<A HREF="#ss2.2">2.2 Requirements</A></LI>
|
||||
|
||||
<LI>
|
||||
<A HREF="#ss2.3">2.3 Set up the Build Environment</A></LI>
|
||||
|
||||
<LI>
|
||||
<A HREF="#ss2.4">2.4 Build the Lizard </A></LI>
|
||||
</UL>
|
||||
|
||||
<H2>3. <A HREF="#s3"> Common Problems </A></H2>
|
||||
|
||||
<HR>
|
||||
<H2><A NAME="s1">1. Introduction</A></H2>
|
||||
|
||||
<P>
|
||||
What this document is: A guide to building the Mozilla application.
|
||||
<BR>
|
||||
This includes:
|
||||
<OL>
|
||||
<LI> A listing of the development tools you will need to build Mozilla. </LI>
|
||||
<LI> A list of environment variables you will need to set before building. </LI>
|
||||
</OL>
|
||||
<P>
|
||||
If you're looking for documentation on developing features or fixing bugs,
|
||||
the Mozilla
|
||||
<A HREF="http://www.mozilla.org/docs/tplist/tplist.html">Technical Documents
|
||||
</A> or <A HREF="http://www.mozilla.org/library.html"> Library </A>
|
||||
are probably what you're looking for.
|
||||
<P>
|
||||
<HR>
|
||||
<H2><A NAME="s2">2. Building Mozilla </A></H2>
|
||||
<P>
|
||||
<UL>Each of the following subsections describes, or gives references to
|
||||
descriptions of, the steps necessary to build Mozilla.
|
||||
<H2><A NAME="ss2.1">2.1 Get the Code</A></H2>
|
||||
<P>
|
||||
<UL>
|
||||
There are two principal ways of getting the code,
|
||||
<A HREF="http://www.mozilla.org/download.html"> ftp</A> and
|
||||
<A HREF="http://www.mozilla.org/cvs.html"> CVS</A>.
|
||||
CVS will provide the least outdated code for building, but is
|
||||
slower than ftp.
|
||||
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="ss2.2">2.2 Requirements</A></H2>
|
||||
<UL>
|
||||
The following need to be installed:
|
||||
<UL>
|
||||
<LI>Microsoft Visual C++ version 4.2 or later
|
||||
<LI>GNU Tools for Microsoft Windows, located:
|
||||
<UL>
|
||||
<LI><A HREF="http://www.cygnus.com/misc/gnu-win32">Cygnus</A></LI>
|
||||
<LI><A HREF="http://www.gnu.org/order/ftp.html">GNU home page</A></LI>
|
||||
<LI><A HREF="ftp://prep.ai.mit.edu/pub/gnu">MIT</A></LI>
|
||||
</UL>
|
||||
Specifically, you'll need:
|
||||
<UL><CODE>
|
||||
cp.exe<BR>
|
||||
rm.exe<BR>
|
||||
uname.exe<BR>
|
||||
</CODE>
|
||||
</UL>
|
||||
Netscape has internally modified version of gmake, shmsdos and win32gnu
|
||||
that we use to get around some problems we were having keeping in sync
|
||||
with the Unix version of gmake. This version of gmake can be found in the
|
||||
Windows Build Tools package, which can be ftp'd from
|
||||
<A HREF="http://www.mozilla.org/download-mozilla.html"> the Mozilla
|
||||
Download page</A>.
|
||||
The three files you will need are:
|
||||
<UL><CODE>
|
||||
gmake.exe<BR>
|
||||
shmsdos.exe<BR>
|
||||
uname.exe<BR>
|
||||
</CODE>
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
<P>
|
||||
Hardware/OS
|
||||
<UL>
|
||||
<LI>Pentium 133 MHz or better</LI>
|
||||
<LI>64 MB RAM, 128 MB recommended</LI>
|
||||
<LI>250 MB NTFS or 500 MB FAT disk space</LI>
|
||||
<LI>NT 4.0 is preferred; NT 3.51 will also work.
|
||||
</LI>
|
||||
</UL>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="ss2.3">2.3 Setup the Build Environment</A></H2>
|
||||
<P>
|
||||
<UL>
|
||||
The following environment variables need to be set:
|
||||
<UL>
|
||||
<CODE>
|
||||
set MOZ_BITS=32
|
||||
<BR>
|
||||
set MOZ_DEBUG=1 (set this only if you want to build a debug build)
|
||||
<BR>
|
||||
set MOZ_GOLD=1
|
||||
<BR>
|
||||
set MOZ_MEDIUM=1
|
||||
<BR>
|
||||
set MOZ_NT=351 (if running NT3.51)
|
||||
<BR>
|
||||
set MOZ_OUT=(optional: specifies location of resultant executable)
|
||||
<BR>
|
||||
set MOZ_SRC=(top of your tree, for example: set MOZ_SRC=d:\mozilla_source
|
||||
if this is the directory where you checked or unzipped the source into)
|
||||
<BR>
|
||||
set MOZ_TOOLS=(location of the bin directory of your GNU tools. The build
|
||||
looks for MOZ_TOOLS\bin\gmake.exe, so make sure that the gmake.exe from
|
||||
the Windows Build Tools package resides there.)
|
||||
<BR>
|
||||
set NO_SECURITY=1
|
||||
<BR>
|
||||
set NSPR20=1
|
||||
<BR>
|
||||
set _MSC_VER=1100 (if you are running VC++ 5.0 or higher)
|
||||
<BR>
|
||||
</CODE>
|
||||
</UL>
|
||||
<BR>
|
||||
<P>
|
||||
</UL>
|
||||
|
||||
<H2><A NAME="ss2.4">2.4 Run the build </A></H2>
|
||||
<UL>
|
||||
Change to the directory you copied the source into (for example,
|
||||
<CODE>cd d:\mozilla_source</CODE>). If this directory was empty before you
|
||||
installed the source, there should be two directories here:
|
||||
<CODE>README</CODE> and <CODE>mozilla</CODE>.
|
||||
<CODE>
|
||||
<PRE>
|
||||
cd mozilla\config
|
||||
nmake /f makefile.win
|
||||
cd ..
|
||||
nmake /f client.mak
|
||||
</PRE>
|
||||
</CODE>
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
<HR>
|
||||
<H2><A NAME="s3">3. Common Sticking Points</A></H2>
|
||||
<UL>
|
||||
<LI><B>nmake has a 'fatal error', listing one of the GNU commands and a
|
||||
hexadecimal return code.</B>
|
||||
<UL>
|
||||
This will happen as a result of not having the GNU tools and Windows Build
|
||||
tools in your path. Add the directories with the appropriate binaries to your
|
||||
path.
|
||||
</UL>
|
||||
</LI>
|
||||
<LI>
|
||||
<B>It fails with the message "'.\WIN32' unexpected": </B>
|
||||
<UL>
|
||||
You didn't properly
|
||||
set the environment variables -- you must not include a space at the end
|
||||
of the set statements (be careful if you are cut'n'pasting).
|
||||
</UL>
|
||||
</LI>
|
||||
<LI>
|
||||
<B>It fails to build, with directory-related errors: </B>
|
||||
<UL>
|
||||
The full path
|
||||
to the source must not include any spaces. Additionally, the source must
|
||||
be extracted with an intact directory structure by a utility that understands
|
||||
long filenames. If in doubt, grab Info-Zip at
|
||||
<A HREF="ftp://ftp.cdrom.com/pub/infozip">ftp://ftp.cdrom.com/pub/infozip</A>
|
||||
</UL>
|
||||
</LI>
|
||||
<LI>
|
||||
<B>I'm not running a 32-bit windows system, how do i build?</B>
|
||||
<UL>
|
||||
Currently, the build process depends on a 32-bit operating system.
|
||||
Windows NT 4.0 is the recommended windows operating system.
|
||||
</UL>
|
||||
</UL>
|
||||
<HR>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -1,53 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<META NAME="Author" CONTENT="Chris Yeh">
|
||||
<META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en]C-NSCP (WinNT; U) [Netscape]">
|
||||
<TITLE>Running Mozilla...</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
|
||||
<H2>
|
||||
<FONT FACE="Arial,Helvetica">Running Mozilla Without Trashing Netscape
|
||||
Installation</FONT></H2>
|
||||
This document explains how to run <TT>mozilla.exe</TT> separately from
|
||||
<TT>netscape.exe</TT> without trashing your regular installation of Netscape
|
||||
Communicator. This is necessary if, for example, you want to use Communicator's
|
||||
mail client while you work on Mozilla development.
|
||||
<BR>
|
||||
<HR WIDTH="100%">
|
||||
<OL>
|
||||
<LI>
|
||||
Before running <TT>mozilla.exe</TT>, create a new user profile either from
|
||||
a Netscape 4.0x installation using the "User Profile Manager" shortcut
|
||||
in the Utilities folder (on Windows) or by using the <TT>-new_account</TT>
|
||||
option on the command line of either <TT>netscape.exe</TT> or <TT>mozilla.exe</TT>.
|
||||
We suggest calling the profile "<TT>mozilla</TT>."</LI>
|
||||
|
||||
<LI>
|
||||
Always use that new account when running <TT>mozilla.exe</TT>, and never
|
||||
run <TT>netscape.exe</TT> using that same account profile.</LI>
|
||||
</OL>
|
||||
To make things easier, you can start the application with the user account
|
||||
on the command line, for example:
|
||||
<UL><TT>mozilla.exe -P"mozilla"</TT></UL>
|
||||
This assures that prefs and the cache will not interfere between the two
|
||||
versions. This will be especially
|
||||
<BR>important as new prefs are added to the Mozilla product. Note that
|
||||
you must use quotes around the name and there can be no space between the
|
||||
"P" and the profile name. Otherwise, the application won't catch the profile
|
||||
switch, and it will try to load the profile name as the initial URL.
|
||||
|
||||
<P>
|
||||
<HR WIDTH="100%">
|
||||
<BR>You can copy your <TT>bookmark.htm</TT> file from an existing profile
|
||||
to your new profile directory if you want to share bookmarks.
|
||||
|
||||
<P>After the initial 3/31 release, we will add some code to Mozilla to
|
||||
prevent running with a profile that is already being used by <TT>netscape.exe</TT>.
|
||||
<BR>
|
||||
<HR WIDTH="100%">
|
||||
<BR><FONT SIZE=-1>Copyright © 1998 <A HREF="http://home.netscape.com/misc/contact_info.html">Netscape
|
||||
Communications Corporation</A></FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -1,184 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=x-mac-roman">
|
||||
<META NAME="GENERATOR" CONTENT="Mozilla/4.04 [en] (WinNT; I) [Netscape]">
|
||||
<META NAME="KeyWords" CONTENT="client, source, documentation">
|
||||
<META NAME="Author" CONTENT="Kipp E.B. Hickman">
|
||||
<TITLE>NGLayout Windows Build Instructions</TITLE>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
|
||||
<H2>
|
||||
<FONT FACE="Arial,Helvetica">NGLayout Windows Build Instructions</FONT></H2>
|
||||
This document explains how to build NGLayout for the Windows platform.
|
||||
<HR><B><FONT SIZE=+1>Required Tools:</FONT></B>
|
||||
<UL>
|
||||
<LI>
|
||||
<B>Microsoft Visual C++ version 4.2 or later</B></LI>
|
||||
|
||||
<LI>
|
||||
<B>The same set of tools for building <A HREF="http://www.mozilla.org/docs/tplist/catBuild/winbuild.htm">Mozilla</A></B></LI>
|
||||
</UL>
|
||||
<B><FONT SIZE=+1>Setting up:</FONT></B>
|
||||
<UL>
|
||||
<LI>
|
||||
You need a Pentium with at least a 133 MHz processor and at least 250 megs
|
||||
(NTFS partition) or 500 megs (FAT partition) of hard drive space. You need
|
||||
to have a minimum of 64 megs of memory in order to build this tree. These
|
||||
numbers are approximations.</LI>
|
||||
|
||||
<LI>
|
||||
The preferred platform is NT 4.0. NT 3.51 will also work, and Win95 might
|
||||
work if you're lucky. Maybe.</LI>
|
||||
|
||||
<LI>
|
||||
Install MSVC. If you don't choose to have the MSVC install modify your
|
||||
environment variables for PATH, INCLUDE, and LIB information, be sure to
|
||||
run VCVARS32.BAT out of the MSVC bin directory prior to attempting to build.</LI>
|
||||
|
||||
<LI>
|
||||
Download and install GNU tools. Put them in your path.</LI>
|
||||
|
||||
<LI>
|
||||
Install NGLayout source.</LI>
|
||||
|
||||
<UL>
|
||||
<LI>
|
||||
cd <your-source-area></LI>
|
||||
|
||||
<LI>
|
||||
unzip -o -q win-19980415.zip</LI>
|
||||
</UL>
|
||||
|
||||
<LI>
|
||||
There are several environment variables you will need to set, either manually
|
||||
or via a script within a command session, or by setting them in your system
|
||||
environment located through the Control Panel | System icon.</LI>
|
||||
|
||||
|
||||
<P> <B>Note: There is an additional variable for building NGLayout!
|
||||
Use this list carefully!</B>
|
||||
|
||||
<P> The variables are:
|
||||
<UL>
|
||||
<LI>
|
||||
set MOZ_BITS=32</LI>
|
||||
|
||||
<LI>
|
||||
set MOZ_DEBUG=1 (don't set this if you want to build an optimized release
|
||||
build)</LI>
|
||||
|
||||
<LI>
|
||||
set MOZ_GOLD=1</LI>
|
||||
|
||||
<LI>
|
||||
set MOZ_MEDIUM=1</LI>
|
||||
|
||||
<LI>
|
||||
set MOZ_NT=351 (if running NT 3.51, don't set otherwise)</LI>
|
||||
|
||||
<LI>
|
||||
set MOZ_OUT=(location of resulting executable and totally optional, see
|
||||
Notes for more details)</LI>
|
||||
|
||||
<LI>
|
||||
set MOZ_SRC=(top of your tree, drive letter and path, i.e. set MOZ_SRC=d:\mozilla_src.
|
||||
The topmost directory under this should be mozilla)</LI>
|
||||
|
||||
<LI>
|
||||
set MOZ_TOOLS=(location of the bin directory containing your GNU tools.
|
||||
The build looks for MOZ_TOOLS\bin\gmake.exe, so make sure your MOZ_TOOLS
|
||||
is figured appropriately)</LI>
|
||||
|
||||
<LI>
|
||||
set NO_SECURITY=1</LI>
|
||||
|
||||
<LI>
|
||||
set NSPR20=1</LI>
|
||||
|
||||
<LI>
|
||||
if you are running VC++ 5.0 or higher: set _MSC_VER=1100; if you are running
|
||||
VC++ 4.2 then set MOZ_VCVER=42</LI>
|
||||
|
||||
<LI>
|
||||
<B>set STANDALONE_IMAGE_LIB=1</B></LI>
|
||||
|
||||
<LI>
|
||||
<B>set MODULAR_NETLIB=1</B></LI>
|
||||
</UL>
|
||||
</UL>
|
||||
<B><FONT SIZE=+1>Building:</FONT></B>
|
||||
<UL>
|
||||
<LI>
|
||||
You need to be running a vanilla command prompt. Other shells may work,
|
||||
but you might have to tweak makefiles.</LI>
|
||||
|
||||
<LI>
|
||||
<B>Build the tools:</B> This generates several tools that handle things
|
||||
like dependency generation</LI>
|
||||
|
||||
<UL>
|
||||
<LI>
|
||||
cd mozilla\config</LI>
|
||||
|
||||
<LI>
|
||||
nmake /f makefile.win</LI>
|
||||
</UL>
|
||||
|
||||
<LI>
|
||||
<B>Build the NGLayout:</B> This will do a complete build of the source
|
||||
tree. You will end up with a viewer.exe at the end. The viewer.exe will
|
||||
be in your dist\win32_[OD].obj\bin directory (O will be used when you don't
|
||||
set MOZ_DEBUG; D will be used when you set MOZ_DEBUG).</LI>
|
||||
|
||||
<UL>
|
||||
<LI>
|
||||
cd mozilla</LI>
|
||||
|
||||
<LI>
|
||||
nmake /f nglayout.mak</LI>
|
||||
</UL>
|
||||
</UL>
|
||||
<B><FONT SIZE=+1>Running:</FONT></B>
|
||||
<UL>
|
||||
<LI>
|
||||
Once you have built the system, do this to run the viewer program (the
|
||||
viewer program is a simple test program that uses the nsIWebWidget API
|
||||
to embed a web widget object). The viewer program has a few basic menu
|
||||
items, include "Samples" which load sample tests.</LI>
|
||||
|
||||
<UL>
|
||||
<LI>
|
||||
cd mozilla\dist\win32_[OD].obj\bin</LI>
|
||||
|
||||
<LI>
|
||||
.\viewer.exe</LI>
|
||||
</UL>
|
||||
</UL>
|
||||
<B><FONT SIZE=+1>Notes:</FONT></B>
|
||||
<UL>
|
||||
<LI>
|
||||
This build process does not use Visual C++ generated project files for
|
||||
several reasons having to do with (among other things) size, maintainability,
|
||||
and the long term desire to start using more of tools like gmake, or plug
|
||||
and play developer tools. This does not preclude you from using the Visual
|
||||
C++ IDE, or it's debugger. Once you have built a viewer.exe do this to
|
||||
run it under the debugger:</LI>
|
||||
</UL>
|
||||
|
||||
<UL>
|
||||
<UL>
|
||||
<LI>
|
||||
cd mozilla\dist\win32_[OD].obj\bin</LI>
|
||||
|
||||
<LI>
|
||||
msdev viewer.exe</LI>
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
<HR WIDTH="100%">
|
||||
<CENTER><FONT SIZE=-1>Copyright © 1998 <A HREF="http://home.netscape.com/misc/contact_info.html">Netscape
|
||||
Communications Corporation</A></FONT></CENTER>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -1,302 +0,0 @@
|
||||
#!perl
|
||||
|
||||
package BuildList;
|
||||
require Exporter;
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(BuildMozilla DistMozilla);
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BuildList - build the [ordered] set of projects needed to construct Mozilla
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
...
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
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.
|
||||
|
||||
=cut
|
||||
|
||||
use Moz;
|
||||
use File::Path;
|
||||
|
||||
sub BuildMozilla()
|
||||
{
|
||||
if ( $main::DEBUG )
|
||||
{
|
||||
$D = "Debug";
|
||||
$dist_dir = ":mozilla:dist:client_debug:";
|
||||
}
|
||||
else
|
||||
{
|
||||
$D = "";
|
||||
$dist_dir = ":mozilla:dist:client:";
|
||||
}
|
||||
|
||||
#
|
||||
# Build the appropriate target of each project
|
||||
#
|
||||
|
||||
BuildProjectClean(":mozilla:lib:mac:NSStdLib:NSStdLib.mcp", "Stubs");
|
||||
BuildProjectClean(":mozilla:lib:mac:NSRuntime:NSRuntime.mcp", "Stubs");
|
||||
BuildProjectClean(":mozilla:lib:mac:MacMemoryAllocator:MemAllocator.mcp", "Stubs");
|
||||
BuildProjectClean(":mozilla:cmd:macfe:projects:client:NavigatorStubs.mcp", "Stubs");
|
||||
|
||||
BuildProject(":mozilla:lib:mac:NSRuntime:NSRuntime.mcp", "NSRuntime$D.shlb");
|
||||
MakeAlias(":mozilla:lib:mac:NSRuntime:NSRuntime$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:cmd:macfe:restext:StringLib.mcp", "Strings$D.shlb");
|
||||
MakeAlias(":mozilla:cmd:macfe:restext:Strings$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:lib:mac:MoreFiles:build:MoreFilesPPC.mcp", "MoreFiles$D.shlb");
|
||||
MakeAlias(":mozilla:lib:mac:MoreFiles:build:MoreFiles$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:nsprpub:macbuild:NSPR20PPC.mcp", "NSPR20$D.shlb");
|
||||
MakeAlias(":mozilla:nsprpub:macbuild:NSPR20$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:dbm:macbuild:DBMPPC.mcp", "DBM$D.shlb");
|
||||
MakeAlias(":mozilla:dbm:macbuild:DBM$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:lib:mac:MacMemoryAllocator:MemAllocator.mcp", "MemAllocator$D.shlb");
|
||||
MakeAlias(":mozilla:lib:mac:MacMemoryAllocator:MemAllocator$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:lib:mac:NSStdLib:NSStdLib.mcp", "NSStdLib$D.shlb");
|
||||
MakeAlias(":mozilla:lib:mac:NSStdLib:NSStdLib$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:xpcom:macbuild:xpcomPPC.mcp", "xpcom$D.shlb");
|
||||
MakeAlias(":mozilla:xpcom:macbuild:xpcom$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:lib:mac:PowerPlant:PowerPlant.mcp", "PowerPlant$D.shlb");
|
||||
MakeAlias(":mozilla:lib:mac:PowerPlant:PowerPlant$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:modules:zlib:macbuild:zlib.mcp", "zlib$D.shlb");
|
||||
MakeAlias(":mozilla:modules:zlib:macbuild:zlib$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:jpeg:macbuild:JPEG.mcp", "JPEG$D.shlb");
|
||||
MakeAlias(":mozilla:jpeg:macbuild:JPEG$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:sun-java:stubs:macbuild:JavaStubs.mcp", "JavaRuntime$D.shlb");
|
||||
MakeAlias(":mozilla:sun-java:stubs:macbuild:JavaRuntime$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:js:jsj:macbuild:JSJ_PPC.mcp", "JSJ$D.o");
|
||||
|
||||
BuildProject(":mozilla:js:macbuild:JavaScriptPPC.mcp", "JavaScript$D.shlb");
|
||||
MakeAlias(":mozilla:js:macbuild:JavaScript$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:nav-java:stubs:macbuild:NavJavaStubs.mcp", "NavJava$D.shlb");
|
||||
MakeAlias(":mozilla:nav-java:stubs:macbuild:NavJava$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:modules:rdf:macbuild:RDF.mcp", "RDF$D.shlb");
|
||||
MakeAlias(":mozilla:modules:rdf:macbuild:RDF$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:modules:xml:macbuild:XML.mcp", "XML$D.shlb");
|
||||
MakeAlias(":mozilla:modules:xml:macbuild:XML$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:modules:schedulr:macbuild:Schedulr.mcp", "Scheduler$D.shlb");
|
||||
MakeAlias(":mozilla:modules:schedulr:macbuild:Scheduler$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:build:mac:CustomLib:CustomLib.mcp", "CustomLib$D.shlb");
|
||||
MakeAlias(":mozilla:build:mac:CustomLib:CustomLib$D.shlb", "$dist_dir");
|
||||
|
||||
BuildProject(":mozilla:modules:security:freenav:macbuild:NoSecurity.mcp", "Security.o");
|
||||
BuildProject(":mozilla:modules:libfont:macbuild:FontBroker.mcp", "FontBroker$D.o");
|
||||
BuildProject(":mozilla:lib:libmocha:macbuild:LibMocha.mcp", "LibMocha$D.o");
|
||||
BuildProject(":mozilla:network:macbuild:network.mcp", "Network$D.o");
|
||||
BuildProject(":mozilla:modules:libimg:macbuild:png.mcp", "png$D.o");
|
||||
BuildProject(":mozilla:modules:libimg:macbuild:libimg.mcp", "libimg$D.o");
|
||||
|
||||
BuildProject(":mozilla:build:mac:CustomLib:CustomLib.mcp", "CustomStaticLib$D.o");
|
||||
|
||||
if ( $main::MOZ_MEDIUM == 1 || $main::MOZ_DARK == 1 )
|
||||
{
|
||||
BuildProject(":mozilla:cmd:macfe:Composer:build:Composer.mcp", "Composer$D.o");
|
||||
|
||||
if ( $main::MOZ_DARK == 1 )
|
||||
{
|
||||
BuildProject(":mozilla:lib:libmsg:macbuild:MsgLib.mcp", "MsgLib$D.o");
|
||||
BuildProject(":mozilla:cmd:macfe:MailNews:build:MailNews.mcp", "MailNews$D.o");
|
||||
BuildProject(":mozilla:directory:c-sdk:ldap:libraries:macintosh:LDAPClient.mcp","LDAPClient$D.o");
|
||||
}
|
||||
else
|
||||
{
|
||||
BuildProject(":mozilla:cmd:macfe:projects:dummies:MakeDummies.mcp", "MsgLib$D.o");
|
||||
BuildProject(":mozilla:cmd:macfe:projects:dummies:MakeDummies.mcp", "MailNews$D.o");
|
||||
BuildProject(":mozilla:cmd:macfe:projects:dummies:MakeDummies.mcp", "LDAPClient$D.o");
|
||||
}
|
||||
|
||||
# Build the appropriate resources target
|
||||
BuildProject(":mozilla:cmd:macfe:projects:client:Client.mcp", "Moz_Resources");
|
||||
}
|
||||
else
|
||||
{
|
||||
# Build a project with dummy targets to make stub libraries
|
||||
BuildProject("cmd:macfe:projects:dummies:MakeDummies.mcp", "Composer$D.o");
|
||||
|
||||
# Build the appropriate resources target
|
||||
BuildProject(":mozilla:cmd:macfe:projects:client:Client.mcp", "Nav_Resources");
|
||||
}
|
||||
|
||||
BuildProject(":mozilla:cmd:macfe:projects:client:Client.mcp", "Client$D");
|
||||
}
|
||||
|
||||
|
||||
sub DistMozilla()
|
||||
{
|
||||
mkpath([ ":mozilla:dist:", ":mozilla:dist:client:", ":mozilla:dist:client_debug:", ":mozilla:dist:client_stubs:" ]);
|
||||
|
||||
#INCLUDE
|
||||
InstallFromManifest(":mozilla:config:mac:MANIFEST", ":mozilla:dist:config:");
|
||||
InstallFromManifest(":mozilla:include:MANIFEST", ":mozilla:dist:include:");
|
||||
InstallFromManifest(":mozilla:cmd:macfe:pch:MANIFEST", ":mozilla:dist:include:");
|
||||
|
||||
#MAC_COMMON
|
||||
InstallFromManifest(":mozilla:build:mac:MANIFEST", ":mozilla:dist:mac:common:");
|
||||
InstallFromManifest(":mozilla:lib:mac:NSStdLib:include:MANIFEST", ":mozilla:dist:mac:common:");
|
||||
InstallFromManifest(":mozilla:lib:mac:MacMemoryAllocator:include:MANIFEST", ":mozilla:dist:mac:common:");
|
||||
InstallFromManifest(":mozilla:lib:mac:Misc:MANIFEST", ":mozilla:dist:mac:common:");
|
||||
InstallFromManifest(":mozilla:lib:mac:MoreFiles:MANIFEST", ":mozilla:dist:mac:common:morefiles:");
|
||||
InstallFromManifest(":mozilla:cmd:macfe:MANIFEST", ":mozilla:dist:mac:macfe:");
|
||||
|
||||
#NSPR
|
||||
InstallFromManifest(":mozilla:nsprpub:pr:include:MANIFEST", ":mozilla:dist:nspr:");
|
||||
InstallFromManifest(":mozilla:nsprpub:pr:src:md:mac:MANIFEST", ":mozilla:dist:nspr:mac:");
|
||||
InstallFromManifest(":mozilla:nsprpub:lib:ds:MANIFEST", ":mozilla:dist:nspr:");
|
||||
InstallFromManifest(":mozilla:nsprpub:lib:libc:include:MANIFEST", ":mozilla:dist:nspr:");
|
||||
InstallFromManifest(":mozilla:nsprpub:lib:msgc:include:MANIFEST", ":mozilla:dist:nspr:");
|
||||
|
||||
#DBM
|
||||
InstallFromManifest(":mozilla:dbm:include:MANIFEST", ":mozilla:dist:dbm:");
|
||||
|
||||
#LIBIMAGE
|
||||
InstallFromManifest(":mozilla:modules:libimg:png:MANIFEST", ":mozilla:dist:libimg:");
|
||||
InstallFromManifest(":mozilla:modules:libimg:src:MANIFEST", ":mozilla:dist:libimg:");
|
||||
InstallFromManifest(":mozilla:modules:libimg:public:MANIFEST", ":mozilla:dist:libimg:");
|
||||
|
||||
#SECURITY_freenav
|
||||
InstallFromManifest(":mozilla:modules:security:freenav:MANIFEST", ":mozilla:dist:security:");
|
||||
|
||||
#XPCOM
|
||||
InstallFromManifest(":mozilla:xpcom:src:MANIFEST", ":mozilla:dist:xpcom:");
|
||||
|
||||
#ZLIB
|
||||
InstallFromManifest(":mozilla:modules:zlib:src:MANIFEST", ":mozilla:dist:zlib:");
|
||||
|
||||
#JPEG
|
||||
InstallFromManifest(":mozilla:jpeg:MANIFEST", ":mozilla:dist:jpeg:");
|
||||
|
||||
#JSJ
|
||||
InstallFromManifest(":mozilla:js:jsj:MANIFEST", ":mozilla:dist:jsj:");
|
||||
|
||||
#JSDEBUG
|
||||
InstallFromManifest(":mozilla:js:jsd:MANIFEST", ":mozilla:dist:jsdebug:");
|
||||
|
||||
#JS
|
||||
InstallFromManifest(":mozilla:js:src:MANIFEST", ":mozilla:dist:js:");
|
||||
|
||||
#RDF
|
||||
InstallFromManifest(":mozilla:modules:rdf:include:MANIFEST", ":mozilla:dist:rdf:");
|
||||
|
||||
#XML
|
||||
InstallFromManifest(":mozilla:modules:xml:glue:MANIFEST", ":mozilla:dist:xml:");
|
||||
InstallFromManifest(":mozilla:modules:xml:expat:xmlparse:MANIFEST", ":mozilla:dist:xml:");
|
||||
|
||||
#LIBFONT
|
||||
InstallFromManifest(":mozilla:modules:libfont:MANIFEST", ":mozilla:dist:libfont:");
|
||||
InstallFromManifest(":mozilla:modules:libfont:src:MANIFEST", ":mozilla:dist:libfont:");
|
||||
|
||||
#LDAP
|
||||
if ( $main::MOZ_LDAP || $main::MOZ_DARK )
|
||||
{
|
||||
InstallFromManifest(":mozilla:directory:c-sdk:ldap:include:MANIFEST", ":mozilla:dist:ldap:");
|
||||
}
|
||||
|
||||
#SCHEDULER
|
||||
InstallFromManifest(":mozilla:modules:schedulr:public:MANIFEST", ":mozilla:dist:schedulr:");
|
||||
|
||||
#NETWORK
|
||||
InstallFromManifest(":mozilla:network:cache:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:client:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:cnvts:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:cstream:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:main:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:mimetype:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:util:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:about:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:certld:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:dataurl:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:file:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:ftp:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:gopher:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:http:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:js:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:mailbox:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:marimba:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:nntp:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:pop3:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:remote:MANIFEST", ":mozilla:dist:network:");
|
||||
InstallFromManifest(":mozilla:network:protocol:smtp:MANIFEST", ":mozilla:dist:network:");
|
||||
|
||||
#HTML_DIALOGS
|
||||
InstallFromManifest(":mozilla:lib:htmldlgs:MANIFEST", ":mozilla:dist:htmldlgs:");
|
||||
|
||||
#LAYOUT
|
||||
InstallFromManifest(":mozilla:lib:layout:MANIFEST", ":mozilla:dist:layout:");
|
||||
|
||||
#LAYERS
|
||||
InstallFromManifest(":mozilla:lib:liblayer:include:MANIFEST", ":mozilla:dist:layers:");
|
||||
|
||||
#PARSE
|
||||
InstallFromManifest(":mozilla:lib:libparse:MANIFEST", ":mozilla:dist:libparse:");
|
||||
|
||||
#STYLE
|
||||
InstallFromManifest(":mozilla:lib:libstyle:MANIFEST", ":mozilla:dist:libstyle:");
|
||||
|
||||
#PLUGIN
|
||||
InstallFromManifest(":mozilla:lib:plugin:MANIFEST", ":mozilla:dist:plugin:");
|
||||
|
||||
#LIBHOOK
|
||||
InstallFromManifest(":mozilla:modules:libhook:public:MANIFEST", ":mozilla:dist:libhook:");
|
||||
|
||||
#LIBPREF
|
||||
InstallFromManifest(":mozilla:modules:libpref:public:MANIFEST", ":mozilla:dist:libpref:");
|
||||
|
||||
#LIBREG
|
||||
InstallFromManifest(":mozilla:modules:libreg:include:MANIFEST", ":mozilla:dist:libreg:");
|
||||
|
||||
#LIBUTIL
|
||||
InstallFromManifest(":mozilla:modules:libutil:public:MANIFEST", ":mozilla:dist:libutil:");
|
||||
|
||||
#PROGRESS
|
||||
InstallFromManifest(":mozilla:modules:progress:public:MANIFEST", ":mozilla:dist:progress:");
|
||||
|
||||
#EDTPLUG
|
||||
InstallFromManifest(":mozilla:modules:edtplug:include:MANIFEST", ":mozilla:dist:edtplug:");
|
||||
|
||||
#NAV_JAVA
|
||||
InstallFromManifest(":mozilla:nav-java:stubs:include:MANIFEST", ":mozilla:dist:nav-java:");
|
||||
InstallFromManifest(":mozilla:nav-java:stubs:macjri:MANIFEST", ":mozilla:dist:nav-java:");
|
||||
|
||||
#SUN_JAVA
|
||||
InstallFromManifest(":mozilla:sun-java:stubs:include:MANIFEST", ":mozilla:dist:sun-java:");
|
||||
InstallFromManifest(":mozilla:sun-java:stubs:macjri:MANIFEST", ":mozilla:dist:sun-java:");
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
||||
@@ -1,143 +0,0 @@
|
||||
#!perl
|
||||
|
||||
package BuildListObsolete;
|
||||
require Exporter;
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(BuildMozilla);
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BuildList - build the [ordered] set of projects needed to construct Mozilla
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
...
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
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.
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
sub BuildMozilla()
|
||||
{
|
||||
use Moz;
|
||||
|
||||
chdir(":::"); # assuming this script is in "...:mozilla:build:mac:", change dir to just inside "mozilla"
|
||||
|
||||
|
||||
if ( $main::DEBUG )
|
||||
{
|
||||
$D = " (Debug)";
|
||||
$LibD = "Debug";
|
||||
$dist_dir = ":dist:client_debug:";
|
||||
}
|
||||
else
|
||||
{
|
||||
$D = "";
|
||||
$LibD = "";
|
||||
$dist_dir = ":dist:client:";
|
||||
}
|
||||
|
||||
#
|
||||
# Build the appropriate target of each project
|
||||
#
|
||||
|
||||
BuildProjectClean(":lib:mac:NSStdLib:NSStdLib.mcp", "Stub Library");
|
||||
BuildProjectClean(":lib:mac:MacMemoryAllocator:MemAllocator.mcp", "Stub Library");
|
||||
BuildProjectClean(":cmd:macfe:projects:client:Navigator.mcp", "Stub Library");
|
||||
|
||||
BuildProject(":lib:mac:NSRuntime:NSRuntime.mcp");
|
||||
MakeAlias(":lib:mac:NSRuntime:NSRuntimePPCLib", "$dist_dir");
|
||||
|
||||
BuildProject(":cmd:macfe:restext:NavStringLibPPC.mcp");
|
||||
MakeAlias(":cmd:macfe:restext:StringsPPCLib", "$dist_dir");
|
||||
|
||||
BuildProject(":lib:mac:MoreFiles:build:MoreFilesPPC.prj");
|
||||
MakeAlias(":lib:mac:MoreFiles:build:MoreFilesPPC.lib", "$dist_dir");
|
||||
|
||||
BuildProject(":nsprpub:macbuild:NSPR20PPC".$LibD.".mcp");
|
||||
MakeAlias(":nsprpub:macbuild:NSPR20PPC".$LibD."Lib", "$dist_dir");
|
||||
|
||||
BuildProject(":dbm:macbuild:DBMPPC".$LibD.".mcp");
|
||||
MakeAlias(":dbm:macbuild:DBMPPC".$LibD."Lib", "${dist_dir}");
|
||||
|
||||
BuildProject(":lib:mac:MacMemoryAllocator:MemAllocator.mcp", "PPC Shared Library$D");
|
||||
MakeAlias(":lib:mac:MacMemoryAllocator:MemAllocatorPPC".$LibD."Lib", "$dist_dir");
|
||||
|
||||
BuildProject(":lib:mac:NSStdLib:NSStdLib.mcp", "PPC Shared Library");
|
||||
MakeAlias(":lib:mac:NSStdLib:NSStdLibPPCLib", "$dist_dir");
|
||||
|
||||
BuildProject(":modules:security:freenav:macbuild:NoSecurity.mcp", "PPC Shared Library$D");
|
||||
MakeAlias(":modules:security:freenav:macbuild:NoSecurity".$LibD."Lib", "$dist_dir");
|
||||
|
||||
BuildProject(":xpcom:macbuild:xpcomPPC".$LibD.".mcp");
|
||||
MakeAlias(":xpcom:macbuild:xpcomPPC".$LibD."Lib", "$dist_dir");
|
||||
|
||||
BuildProject(":lib:mac:PowerPlant:PowerPlant.mcp");
|
||||
MakeAlias(":lib:mac:PowerPlant:PowerPlantPPC".$LibD."Lib", "$dist_dir");
|
||||
|
||||
BuildProject(":modules:zlib:macbuild:zlib.mcp", "PPC Shared Library$D");
|
||||
MakeAlias(":modules:zlib:macbuild:zlibPPC".$LibD."Lib", "$dist_dir");
|
||||
|
||||
BuildProject(":jpeg:macbuild:JPEG.mcp", "PPC Shared Library$D");
|
||||
MakeAlias(":jpeg:macbuild:JPEGPPC".$LibD."Lib", "$dist_dir");
|
||||
|
||||
BuildProject(":sun-java:stubs:macbuild:JavaStubs.mcp", "PPC Shared Library$D");
|
||||
MakeAlias(":sun-java:stubs:macbuild:JavaRuntimePPC".$LibD."Lib", "$dist_dir");
|
||||
|
||||
BuildProject(":js:jsj:macbuild:JSJ_PPC".$LibD.".mcp");
|
||||
|
||||
BuildProject(":js:macbuild:JavaScriptPPC".$LibD.".mcp");
|
||||
MakeAlias(":js:macbuild:JavaScriptPPC".$LibD."Lib", "$dist_dir");
|
||||
|
||||
BuildProject(":nav-java:stubs:macbuild:NavJavaStubs.mcp", "PPC Shared Library$D");
|
||||
MakeAlias(":nav-java:stubs:macbuild:NavJavaPPC".$LibD."Lib", "$dist_dir");
|
||||
|
||||
if ( $main::DEBUG )
|
||||
{
|
||||
BuildProject(":modules:rdf:macbuild:RDF.mcp", "PPC Shared Library +D -LDAP");
|
||||
MakeAlias(":modules:rdf:macbuild:RDFPPCDebugLib", "${dist_dir}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Moz::BuildProject(":modules:rdf:macbuild:RDF.mcp", "PPC Shared Library -LDAP");
|
||||
MakeAlias(":modules:rdf:macbuild:RDFPPCLib", "${dist_dir}");
|
||||
}
|
||||
|
||||
BuildProject(":modules:xml:macbuild:XML.mcp", "PPC Shared Library$D");
|
||||
MakeAlias(":modules:xml:macbuild:XMLPPC".$LibD."Lib", "$dist_dir");
|
||||
|
||||
BuildProject(":modules:libfont:macbuild:FontBroker.mcp", "PPC Library$D");
|
||||
|
||||
BuildProject(":modules:schedulr:macbuild:Schedulr.mcp", "PPC Shared Library$D");
|
||||
MakeAlias(":modules:schedulr:macbuild:Schedulr".$LibD."PPCLib", "$dist_dir");
|
||||
|
||||
BuildProject(":network:macbuild:network.mcp", "PPC Library (Debug Moz)");
|
||||
|
||||
if ( $main::MOZ_LITE == 0 )
|
||||
{
|
||||
BuildProject(":cmd:macfe:Composer:build:Composer.mcp", "PPC Library$D");
|
||||
}
|
||||
|
||||
BuildProject(":cmd:macfe:projects:client:Navigator.mcp", "Moz PPC App$D");
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
#!perl
|
||||
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
use Moz;
|
||||
use BuildList;
|
||||
|
||||
$DEBUG = 0;
|
||||
|
||||
# One of them should be 1. This will come from a config file at some stage.
|
||||
# In the meanwhile, it should match mozilla/config/mac/MacConfig.h
|
||||
$MOZ_LITE = 0;
|
||||
$MOZ_MEDIUM = 1;
|
||||
$MOZ_DARK = 0;
|
||||
|
||||
Moz::OpenErrorLog(":::Mozilla.BuildLog");
|
||||
Moz::StopForErrors();
|
||||
|
||||
chdir("::::");
|
||||
|
||||
# Make and popuplate the dist directory
|
||||
DistMozilla();
|
||||
|
||||
# Now build the projects
|
||||
BuildMozilla();
|
||||
@@ -1,124 +0,0 @@
|
||||
#!perl
|
||||
|
||||
package BuildMozilla;
|
||||
require Exporter;
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(BuildMozilla);
|
||||
|
||||
=head1 NAME
|
||||
|
||||
BuildMozilla - build the [ordered] set of projects needed to construct Mozilla
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
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.
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
sub BuildMozilla()
|
||||
{
|
||||
use Moz;
|
||||
|
||||
chdir("::::"); # assuming this script is in "...:mozilla:build:mac:", change dir to just above "mozilla"
|
||||
|
||||
|
||||
# Ideally, we would set the target name like so:
|
||||
# $target = $main::DEBUG ? "debug" : "optimized";
|
||||
# ...and all projects would have corresponding targets
|
||||
|
||||
|
||||
$D = $main::DEBUG ? " (Debug)" : ""; # $D becomes a suffix to target names for selecting either the debug or non-debug target of a project
|
||||
|
||||
|
||||
#
|
||||
# Build the appropriate target of each project
|
||||
#
|
||||
|
||||
Moz::BuildProject(":mozilla:lib:mac:NSStdLib:NSStdLib.mcp", "Stub Library");
|
||||
Moz::BuildProject(":mozilla:lib:mac:MacMemoryAllocator:MemAllocator.mcp", "Stub Library");
|
||||
Moz::BuildProject(":mozilla:cmd:macfe:projects:client:Navigator.mcp", "Stub Library");
|
||||
|
||||
Moz::BuildProject(":mozilla:lib:mac:NSRuntime:NSRuntime.mcp");
|
||||
Moz::BuildProject(":mozilla:cmd:macfe:restext:NavStringLibPPC.mcp");
|
||||
Moz::BuildProject(":mozilla:lib:mac:MoreFiles:build:MoreFilesPPC.prj");
|
||||
|
||||
if ( $main::DEBUG )
|
||||
{
|
||||
Moz::BuildProject(":mozilla:nsprpub:macbuild:NSPR20PPCDebug.mcp");
|
||||
Moz::BuildProject(":mozilla:dbm:macbuild:DBMPPCDebug.mcp");
|
||||
}
|
||||
else
|
||||
{
|
||||
Moz::BuildProject(":mozilla:nsprpub:macbuild:NSPR20PPC.mcp");
|
||||
Moz::BuildProject(":mozilla:dbm:macbuild:DBMPPC.mcp");
|
||||
}
|
||||
|
||||
Moz::BuildProject(":mozilla:lib:mac:MacMemoryAllocator:MemAllocator.mcp", "PPC Shared Library$D");
|
||||
Moz::BuildProject(":mozilla:lib:mac:NSStdLib:NSStdLib.mcp", "PPC Shared Library");
|
||||
Moz::BuildProject(":mozilla:modules:security:freenav:macbuild:NoSecurity.mcp", "PPC Shared Library$D");
|
||||
|
||||
if ( $main::DEBUG )
|
||||
{
|
||||
Moz::BuildProject(":mozilla:xpcom:macbuild:xpcomPPCDebug.mcp");
|
||||
}
|
||||
else
|
||||
{
|
||||
Moz::BuildProject(":mozilla:xpcom:macbuild:xpcomPPC.mcp");
|
||||
}
|
||||
|
||||
Moz::BuildProject(":mozilla:lib:mac:PowerPlant:PowerPlant.mcp");
|
||||
Moz::BuildProject(":mozilla:modules:zlib:macbuild:zlib.mcp", "PPC Shared Library$D");
|
||||
Moz::BuildProject(":mozilla:jpeg:macbuild:JPEG.mcp", "PPC Shared Library$D");
|
||||
Moz::BuildProject(":mozilla:sun-java:stubs:macbuild:JavaStubs.mcp", "PPC Shared Library$D");
|
||||
|
||||
if ( $main::DEBUG )
|
||||
{
|
||||
Moz::BuildProject(":mozilla:js:jsj:macbuild:JSJ_PPCDebug.mcp");
|
||||
Moz::BuildProject(":mozilla:js:macbuild:JavaScriptPPCDebug.mcp");
|
||||
}
|
||||
else
|
||||
{
|
||||
Moz::BuildProject(":mozilla:js:jsj:macbuild:JSJ_PPC.mcp");
|
||||
Moz::BuildProject(":mozilla:js:macbuild:JavaScriptPPC.mcp");
|
||||
}
|
||||
|
||||
Moz::BuildProject(":mozilla:nav-java:stubs:macbuild:NavJavaStubs.mcp", "PPC Shared Library$D");
|
||||
|
||||
|
||||
# the following `if' can be fixed when we either rename the debug target of the RDF project, or of all the other projects
|
||||
|
||||
if ( $main::DEBUG )
|
||||
{
|
||||
Moz::BuildProject(":mozilla:modules:rdf:macbuild:RDF.mcp", "PPC Shared Library +D -LDAP");
|
||||
}
|
||||
else
|
||||
{
|
||||
Moz::BuildProject(":mozilla:modules:rdf:macbuild:RDF.mcp", "PPC Shared Library -LDAP");
|
||||
}
|
||||
|
||||
Moz::BuildProject(":mozilla:modules:xml:macbuild:XML.mcp", "PPC Shared Library$D");
|
||||
Moz::BuildProject(":mozilla:modules:libfont:macbuild:FontBroker.mcp", "PPC Library$D");
|
||||
Moz::BuildProject(":mozilla:modules:schedulr:macbuild:Schedulr.mcp", "PPC Shared Library$D");
|
||||
Moz::BuildProject(":mozilla:network:macbuild:network.mcp", "PPC Library (Debug Moz)");
|
||||
Moz::BuildProject(":mozilla:cmd:macfe:Composer:build:Composer.mcp", "PPC Library$D");
|
||||
Moz::BuildProject(":mozilla:cmd:macfe:projects:client:Navigator.mcp", "Moz PPC App$D");
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
#!perl
|
||||
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
use Moz;
|
||||
use BuildList;
|
||||
|
||||
$DEBUG = 1;
|
||||
|
||||
# One of them should be 1. This will come from a config file at some stage.
|
||||
# In the meanwhile, it should match mozilla/config/mac/MacConfig.h
|
||||
$MOZ_LITE = 0;
|
||||
$MOZ_MEDIUM = 1;
|
||||
$MOZ_DARK = 0;
|
||||
|
||||
Moz::OpenErrorLog(":::Mozilla.BuildLog");
|
||||
Moz::StopForErrors();
|
||||
|
||||
chdir("::::");
|
||||
|
||||
# Make and popuplate the dist directory
|
||||
DistMozilla();
|
||||
|
||||
# Now build the projects
|
||||
BuildMozilla();
|
||||
@@ -1,128 +0,0 @@
|
||||
#!perl
|
||||
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
#
|
||||
# nglayout build script (debug)
|
||||
#
|
||||
use NGLayoutBuildList;
|
||||
use Cwd;
|
||||
use Moz;
|
||||
|
||||
# configuration variables
|
||||
$DEBUG = 1;
|
||||
$pull{all} = 0;
|
||||
$pull{lizard} = 0;
|
||||
$pull{xpcom} = 0;
|
||||
$pull{imglib} = 0;
|
||||
$pull{netlib} = 0;
|
||||
$pull{nglayout} = 0;
|
||||
$pull{mac} = 0;
|
||||
|
||||
$build{all} = 0;
|
||||
$build{dist} = 0;
|
||||
$build{common}= 0;
|
||||
$build{nglayout}= 0;
|
||||
|
||||
|
||||
#
|
||||
# UI
|
||||
#
|
||||
|
||||
@choices = ("pull_and_build_all",
|
||||
"pull_all",
|
||||
"build_all",
|
||||
"pull_nglayout",
|
||||
"build_dist",
|
||||
"build_projects");
|
||||
#damn, this does not work on
|
||||
if (0)
|
||||
{
|
||||
while (GetFrontProcess () != GetCurrentProcess())
|
||||
{
|
||||
SetFrontProcess( GetCurrentProcess() );
|
||||
}
|
||||
@pick = MacPerl::Pick("What would you like to do?", @choices);
|
||||
$pull{all} = 0;
|
||||
$build{all} = 1;
|
||||
foreach $i (@pick)
|
||||
{
|
||||
if ($i eq "pull_and_build_all")
|
||||
{
|
||||
$pull{all} = 1;
|
||||
$build{all} = 1;
|
||||
}
|
||||
elsif ($i eq "pull_all")
|
||||
{
|
||||
$pull{all} = 1;
|
||||
}
|
||||
elsif ($i eq "build_all")
|
||||
{
|
||||
$build{all} = 1;
|
||||
}
|
||||
elsif ($i eq "build_dist")
|
||||
{
|
||||
$build{dist} = 1;
|
||||
}
|
||||
elsif ($i eq "build_projects")
|
||||
{
|
||||
$build{projects} = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$pull{all} = 1;
|
||||
$build{all} = 1;
|
||||
# $pull{netlib} = 1;
|
||||
# $pull{nglayout} = 1;
|
||||
# $build{common} = 1;
|
||||
# $build{nglayout} = 1;
|
||||
# $build{dist} = 1;
|
||||
# $pull{nglayout} = 1;
|
||||
}
|
||||
|
||||
if ($pull{all})
|
||||
{
|
||||
foreach $k (keys(%pull))
|
||||
{
|
||||
$pull{$k} = 1;
|
||||
}
|
||||
}
|
||||
if ($build{all})
|
||||
{
|
||||
foreach $k (keys(%build))
|
||||
{
|
||||
$build{$k} = 1;
|
||||
}
|
||||
}
|
||||
|
||||
# do the work
|
||||
# you should not have to edit anything bellow
|
||||
|
||||
chdir("::::");
|
||||
$MOZ_SRC = cwd();
|
||||
Moz::StopForErrors();
|
||||
#Moz::DontStopForErrors();
|
||||
OpenErrorLog("::NGLayoutBuildLog");
|
||||
Checkout();
|
||||
chdir($MOZ_SRC);
|
||||
BuildDist();
|
||||
chdir($MOZ_SRC);
|
||||
BuildProjects();
|
||||
print "Build layout complete\n";
|
||||
@@ -1,78 +0,0 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
if {#} != 1
|
||||
echo "CopyExports requires 1 parameters:"
|
||||
echo "Parameter 1: path relative to {SourceRootDir} of the file which contains"
|
||||
echo " the list of files to be copied, one per line. This path"
|
||||
echo " may not begin with a colon"
|
||||
echo
|
||||
Exit 1
|
||||
end if
|
||||
|
||||
|
||||
Set SourceList "{SourceRootDir}{1}"
|
||||
|
||||
Set ScriptsDir "{SourceRootDir}mozilla:build:mac:"
|
||||
|
||||
#set sourceList "{SourceRootDir}mozilla:{1}"
|
||||
|
||||
if {verbose}
|
||||
echo "Source list is in file ¶"{SourceList}¶""
|
||||
echo "Scripts directory is ¶"{ScriptsDir}¶""
|
||||
end if
|
||||
|
||||
# for each line in the source file, remove it if it starts with #, otherwise quote it
|
||||
|
||||
for curLine in `streamedit "{sourceList}" -e '/¥#Å/ Delete; /¥/ Replace /(Å)¨1/ "¶""¨1"¶""'`
|
||||
|
||||
echo "{curLine}"
|
||||
|
||||
# ignore empty lines
|
||||
if `evaluate "{{curLine}}" != ""`
|
||||
|
||||
echo "{curLine}"
|
||||
|
||||
# strip out trailing comments
|
||||
if `evaluate "{curLine}" =~ /(Å)¨1[ ¶t]+(#Å)¨2/`
|
||||
set sourceLine "{¨1}"
|
||||
# echo "Discarding comment {¨2}"
|
||||
else
|
||||
set sourceLine "{curLine}"
|
||||
end if
|
||||
|
||||
if `evaluate "{sourceLine}" =~ /([Â ¶t]+)¨1[ ¶t]+[:]*(Å)¨2/`
|
||||
|
||||
if {verbose}
|
||||
echo "Cur line is {sourceLine}"
|
||||
end if
|
||||
|
||||
set exportFile "{¨1}"
|
||||
set theTarget "{¨2}"
|
||||
|
||||
if {verbose}
|
||||
echo "Export file name is {exportFile}"
|
||||
echo "Target directory is {theTarget}"
|
||||
end if
|
||||
|
||||
"{ScriptsDir}CopyList.script" "{exportFile}" "{theTarget}"
|
||||
|
||||
end if
|
||||
|
||||
end if
|
||||
|
||||
end for
|
||||
@@ -1,81 +0,0 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
|
||||
# This is the controlling script for a set of scripts that copy public
|
||||
# header files in one or more source trees into a single, "dist" directory.
|
||||
#
|
||||
# It relies on the two accompanying scripts, ÒCopyList.scriptÓ and
|
||||
# ÒCopyExports.scriptÓ, which must be in the same directory.
|
||||
#
|
||||
# To execute this script, select everything from "# Get the..." to
|
||||
# " the end" and hit the Enter key.
|
||||
#
|
||||
# Known bugs:
|
||||
# Header files are always copied if the export.mac file contains
|
||||
# non-local paths.
|
||||
# Spurious output is produced even when verbose is off.
|
||||
#
|
||||
|
||||
# Uncomment this to get some progress information
|
||||
# set -e verbose 1
|
||||
|
||||
# Get the root of everything
|
||||
|
||||
set magicfilepath "{systempfolder}filepath" # Temporary items folder, "filepath"
|
||||
if !`Exists "{{magicFilePath}}"`
|
||||
Echo "No file path file seems to have been created in the temporary items folder."
|
||||
Echo "Was this script executed from the perl script? That's the way it was designed."
|
||||
Exit 1
|
||||
end if
|
||||
|
||||
set myDirectory "`catenate "{{magicFilePath}}"`"
|
||||
delete -i "{{magicFilePath}}"
|
||||
|
||||
Set SourceList "{myDirectory}{1}"
|
||||
(Evaluate "{myDirectory}" =~ /(Å:)¨1[Â:]+:[Â:]+:[Â:]+/) #·· dev:null
|
||||
Set -e mozillaDir "{¨1}"
|
||||
|
||||
if !`Exists "{{mozillaDir}}"`
|
||||
Echo "A file path was passed, but it doesn't seem to be the mozilla directory."
|
||||
Exit 1
|
||||
end if
|
||||
echo "Mozilla directory found at {mozillaDir}"
|
||||
|
||||
#Calculate the root directory by stripping off the leaf name.
|
||||
(Evaluate "{mozillaDir}" =~ /(Å:)¨1([Â:]+)¨2/) #·· dev:null
|
||||
Set -e SourceRootDir "{¨1}"
|
||||
Set -e DestRootDir "{mozillaDir}dist:"
|
||||
|
||||
# Ensure the build and stubs folders exist
|
||||
|
||||
if !`exists -d "{mozillaDir}dist"`
|
||||
newfolder "{mozillaDir}dist"
|
||||
end if
|
||||
if !`exists -d "{mozillaDir}dist:client"`
|
||||
newfolder "{mozillaDir}dist:client"
|
||||
end if
|
||||
if !`exists -d "{mozillaDir}dist:client_debug"`
|
||||
newfolder "{mozillaDir}dist:client_debug"
|
||||
end if
|
||||
if !`exists -d "{mozillaDir}dist:client_stubs"`
|
||||
newfolder "{mozillaDir}dist:client_stubs"
|
||||
end if
|
||||
|
||||
"{SourceRootDir}mozilla:build:mac:CopyExports.script" "mozilla:build:mac:MacExportListPublic"
|
||||
|
||||
# the end
|
||||
@@ -1,97 +0,0 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
if {#} != 2
|
||||
echo "CopyList requires 2 parameters:"
|
||||
echo "Parameter 1: path relative to {SourceRootDir} of the file which contains"
|
||||
echo " the list of files to be copied, one per line. This path"
|
||||
echo " may not begin with a colon"
|
||||
echo
|
||||
echo "Parameter 2: path relative to {DestRootDir} of the directory where all the"
|
||||
echo " files are to be copied. No initial colons!"
|
||||
echo
|
||||
Exit 1
|
||||
end if
|
||||
|
||||
set debugEcho "" # This setting will actually duplicate the files
|
||||
#set debugEcho "echo" # This setting will merely print the "duplicate" commands.
|
||||
|
||||
set sourceList "{SourceRootDir}{1}"
|
||||
set targetDir "{DestRootDir}{2}"
|
||||
|
||||
# targetDir may not end in a colon for this script to work.
|
||||
if `Evaluate "{targetDir}" =~ /(Å)¨1:/`
|
||||
#echo "Removed a colon"
|
||||
set targetDir "{¨1}"
|
||||
end if
|
||||
|
||||
#Ensure the target hierarchy exists
|
||||
# Volume name
|
||||
(Evaluate "{TargetDir}" =~ /([Â:]+)¨1:Å/) ·· dev:null
|
||||
Set PartialPath "{¨1}"
|
||||
Loop
|
||||
(Evaluate "{TargetDir}" =~ /("{PartialPath}":[Â:]+)¨1([:]*)¨2Å/) ·· dev:null
|
||||
Set PartialPath "{¨1}"
|
||||
Set Exit 0
|
||||
(NewFolder "{PartialPath}") ·· dev:null
|
||||
Set Exit 1
|
||||
break if "{¨2}" == ""
|
||||
End Loop
|
||||
|
||||
#Calculate the source directory by stripping off the leaf name.
|
||||
(Evaluate "{SourceList}" =~ /(Å:)¨1([Â:]+)¨2/) #·· dev:null
|
||||
Set SourceDir "{¨1}"
|
||||
|
||||
if {verbose}
|
||||
echo "Source list is in file ¶"{sourceList}¶""
|
||||
echo "Source directory is ¶"{SourceDir}¶""
|
||||
echo "Target directory is ¶"{targetDir}¶""
|
||||
end if
|
||||
|
||||
# Strip all comment lines, pipe the stripped lines into the "for" loop.
|
||||
# We quote each whole line here so that we deal with a line at a time in the
|
||||
# for loop. Don't ya just love MPW quoting rulesÉ
|
||||
|
||||
for f in `streamedit "{sourceList}" -e '/¥#Å/ Delete; /¥/ Replace /(Å)¨1/ "¶""¨1"¶""'`
|
||||
|
||||
if `evaluate "{{f}}" != ""`
|
||||
|
||||
# strip out trailing comments (in fact, anything following whitespace)
|
||||
if `evaluate "{f}" =~ /([Â ¶t]+)¨1[ ¶t]+([#]*Å)¨2/`
|
||||
set sourceFile "{¨1}"
|
||||
# echo "Discarding comment {¨2}"
|
||||
else
|
||||
set sourceFile "{f}"
|
||||
end if
|
||||
|
||||
# sourceFile can be a relative path, so need to get the file name for date comparisons
|
||||
if `evaluate "{sourceFile}" =~ /Å:([Â:]+)¨1/`
|
||||
set filename "{¨1}"
|
||||
else
|
||||
set filename "{sourceFile}"
|
||||
end if
|
||||
|
||||
# now copy the file if newer
|
||||
if "`Newer "{sourceDir}{sourceFile}" "{targetDir}:{filename}"`" #|| !`Exists "{targetDir}:{filename}"`
|
||||
if {verbose} ; echo "{sourceDir}{sourceFile} is newer than {targetDir}:{filename}" ; end if
|
||||
#{debugEcho} duplicate -y "{sourceDir}{sourceFile}" "{targetDir}"
|
||||
{debugEcho} newalias "{sourceDir}{sourceFile}" "{targetDir}:{filename}"
|
||||
end if
|
||||
|
||||
end if
|
||||
|
||||
end for
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
/* This library only exists to provide a dummy library for the final project */
|
||||
|
||||
/* There is nothing to do here. */
|
||||
@@ -1,69 +0,0 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
|
||||
# This is the controlling script for a set of scripts that copy public
|
||||
# header files in one or more source trees into a single, "dist" directory.
|
||||
#
|
||||
# It relies on the two accompanying scripts, ÒCopyList.scriptÓ and
|
||||
# ÒCopyExports.scriptÓ, which must be in the same directory.
|
||||
#
|
||||
# To execute this script, select everything from "# Get the..." to
|
||||
# " the end" and hit the Enter key.
|
||||
#
|
||||
# Known bugs:
|
||||
# Spurious output is produced even when verbose is off.
|
||||
#
|
||||
|
||||
# Uncomment this to get some progress information
|
||||
# set -e verbose 1
|
||||
|
||||
# Get the root of everything
|
||||
|
||||
set moz ""
|
||||
loop
|
||||
set mozillaDir `GetFileName -d -m "Please select the ÒmozillaÓ directory"`
|
||||
#set SourceRootDir
|
||||
(Evaluate "{mozillaDir}" =~ /(Å:)¨1([Â:]+)¨2:/) #·· dev:null
|
||||
set moz "{¨2}"
|
||||
break if "{moz}" == "mozilla"
|
||||
Alert "Sorry, this only works if you select the folder called ÒmozillaÓ."
|
||||
end loop
|
||||
|
||||
#Calculate the root directory by stripping off the leaf name.
|
||||
(Evaluate "{mozillaDir}" =~ /(Å:)¨1([Â:]+)¨2/) #·· dev:null
|
||||
Set -e SourceRootDir "{¨1}"
|
||||
Set -e DestRootDir "{mozillaDir}dist:"
|
||||
|
||||
# Ensure the build and stubs folders exist
|
||||
|
||||
if !`exists -d "{mozillaDir}dist"`
|
||||
newfolder "{mozillaDir}dist"
|
||||
end if
|
||||
if !`exists -d "{mozillaDir}dist:client"`
|
||||
newfolder "{mozillaDir}dist:client"
|
||||
end if
|
||||
if !`exists -d "{mozillaDir}dist:client_debug"`
|
||||
newfolder "{mozillaDir}dist:client_debug"
|
||||
end if
|
||||
if !`exists -d "{mozillaDir}dist:client_stubs"`
|
||||
newfolder "{mozillaDir}dist:client_stubs"
|
||||
end if
|
||||
|
||||
"{SourceRootDir}mozilla:build:mac:CopyExports.script" "mozilla:build:mac:MacExportListPublic"
|
||||
|
||||
# the end
|
||||
@@ -26,69 +26,63 @@
|
||||
*/
|
||||
|
||||
/* warning pragmas */
|
||||
#pragma warn_hidevirtual on
|
||||
#pragma warn_emptydecl on
|
||||
#pragma warn_unusedvar on
|
||||
#pragma warn_extracomma on
|
||||
#pragma warn_illpragma on
|
||||
#pragma warn_possunwant on
|
||||
#pragma warn_unusedarg off /* turned off to reduce warnings */
|
||||
#pragma warn_hidevirtual on
|
||||
|
||||
#pragma check_header_flags on
|
||||
#pragma check_header_flags on
|
||||
|
||||
/* Language features that must be the same across libraries... */
|
||||
#pragma enumsalwaysint on
|
||||
#pragma unsigned_char off
|
||||
#pragma exceptions on
|
||||
#pragma bool on
|
||||
#pragma enumsalwaysint on
|
||||
#pragma unsigned_char off
|
||||
#pragma exceptions on
|
||||
#pragma bool on
|
||||
|
||||
|
||||
/* Save as much space as possible with strings... */
|
||||
#pragma pool_strings on
|
||||
#pragma dont_reuse_strings off
|
||||
#pragma dont_reuse_strings off
|
||||
|
||||
#pragma options align=native
|
||||
#pragma sym on /* Takes no memory. OK in non-debug. */
|
||||
#pragma sym on /* Takes no memory. OK in non-debug. */
|
||||
|
||||
|
||||
|
||||
#ifdef powerc /* ...generating PowerPC */
|
||||
#pragma toc_data on
|
||||
#pragma fp_contract on
|
||||
#pragma readonly_strings on
|
||||
#pragma toc_data on
|
||||
#pragma fp_contract on
|
||||
#pragma readonly_strings on
|
||||
|
||||
#ifdef DEBUG
|
||||
#pragma traceback on
|
||||
#pragma global_optimizer off
|
||||
#pragma scheduling off
|
||||
#pragma peephole off
|
||||
#pragma optimize_for_size off
|
||||
#pragma traceback on
|
||||
#pragma global_optimizer off
|
||||
#pragma scheduling off
|
||||
#pragma peephole off
|
||||
#pragma optimize_for_size off
|
||||
#else
|
||||
#pragma traceback off
|
||||
#pragma global_optimizer on
|
||||
#pragma optimization_level 4
|
||||
#pragma scheduling 604
|
||||
#pragma peephole on
|
||||
#pragma optimize_for_size on
|
||||
#pragma traceback off
|
||||
#pragma global_optimizer on
|
||||
#pragma optimization_level 4
|
||||
#pragma scheduling 604
|
||||
#pragma peephole on
|
||||
#pragma optimize_for_size on
|
||||
#endif
|
||||
|
||||
#else /* ...generating 68k */
|
||||
#pragma code68020 on
|
||||
#pragma code68881 off
|
||||
#pragma code68020 on
|
||||
#pragma code68881 off
|
||||
|
||||
/* Far everything... */
|
||||
#pragma far_code
|
||||
#pragma far_data on
|
||||
#pragma far_strings on
|
||||
#pragma far_vtables on
|
||||
#pragma far_data on
|
||||
#pragma far_strings on
|
||||
#pragma far_vtables on
|
||||
|
||||
#pragma fourbyteints on /* 4-byte ints */
|
||||
#pragma IEEEdoubles on /* 8-byte doubles (as required by Java and NSPR) */
|
||||
#pragma fourbyteints on /* 4-byte ints */
|
||||
#pragma IEEEdoubles on /* 8-byte doubles (as required by Java and NSPR) */
|
||||
|
||||
#ifdef DEBUG
|
||||
#pragma macsbug on
|
||||
#pragma macsbug on
|
||||
#pragma oldstyle_symbols off
|
||||
#else
|
||||
#pragma macsbug off
|
||||
#pragma macsbug off
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
IDE_Options.h
|
||||
@@ -1,198 +0,0 @@
|
||||
#!perl -w
|
||||
package MacCVS;
|
||||
|
||||
# package Mac::Apps::MacCVS; this should really be the name of the package
|
||||
# but due to our directory hierarchy in mozilla, I am not doing it
|
||||
|
||||
require 5.004;
|
||||
require Exporter;
|
||||
|
||||
use strict;
|
||||
|
||||
use vars qw($VERSION @ISA @EXPORT $MacCVSLib);
|
||||
use Mac::StandardFile;
|
||||
use Moz;
|
||||
use Cwd;
|
||||
use Exporter;
|
||||
use File::Basename;
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw( new print checkout);
|
||||
$VERSION = "1.00";
|
||||
|
||||
# Architecture:
|
||||
# cvs session object:
|
||||
# name - session name
|
||||
# session_file - session file
|
||||
#
|
||||
# globals
|
||||
# $MacCVSLib - location of MacCVS applescript library
|
||||
#
|
||||
#
|
||||
|
||||
#
|
||||
# utility routines
|
||||
#
|
||||
|
||||
# just like Mac::DoAppleScript, 1 is success, 0 is failure
|
||||
sub _myDoAppleScript($)
|
||||
{
|
||||
my($script) = @_;
|
||||
my $asresult = MacPerl::DoAppleScript($script);
|
||||
if ($asresult eq "0")
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
print STDERR "AppleScript error: $asresult\n";
|
||||
print STDERR "AppleScript was: \n $script \n";
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
# _useMacCVSLib
|
||||
# returns 1 on success
|
||||
# Search the include path for the file called MacCVSLib
|
||||
sub _useMacCVSLib()
|
||||
{
|
||||
unless ( defined($MacCVSLib) )
|
||||
{
|
||||
my($libname) = "MacCVSLib";
|
||||
# try the directory we were run from
|
||||
my($c) = dirname($0) . ":" . $libname;
|
||||
if ( -e $c)
|
||||
{
|
||||
$MacCVSLib = $c;
|
||||
}
|
||||
else
|
||||
{
|
||||
# now search the include directories
|
||||
foreach (@INC)
|
||||
{
|
||||
unless ( m/^Dev:Pseudo/ ) # This is some bizarre MacPerl special-case directory
|
||||
{
|
||||
$c = $_ . $libname;
|
||||
if (-e $c)
|
||||
{
|
||||
$MacCVSLib = $c;
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (! (-e $MacCVSLib))
|
||||
{
|
||||
print STDERR "MacCVS lib could not be found! $MacCVSLib";
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Session object methods
|
||||
#
|
||||
|
||||
sub new {
|
||||
my ( $proto, $session_file) = @_;
|
||||
my $class = ref($proto) || $proto;
|
||||
my $self = {};
|
||||
|
||||
if ( defined($session_file) && ( -e $session_file) )
|
||||
{
|
||||
$self->{"name"} = basename( $session_file );
|
||||
$self->{"session_file"} = $session_file;
|
||||
bless $self, $class;
|
||||
return $self;
|
||||
}
|
||||
else
|
||||
{
|
||||
print STDERR "MacCVS->new cvs file < $session_file > does not exist\n";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
# makes sure that the session is open
|
||||
# assertSessionOpen()
|
||||
# returns 1 on failure
|
||||
sub assertSessionOpen() {
|
||||
my ($self) = shift;
|
||||
_useMacCVSLib() || die "Could not load MacCVSLib\n";
|
||||
my $script = <<END_OF_APPLESCRIPT;
|
||||
tell (load script file "$MacCVSLib") to OpenSession("$self->{session_file}")
|
||||
END_OF_APPLESCRIPT
|
||||
return _myDoAppleScript($script);
|
||||
}
|
||||
|
||||
# prints the cvs object, used mostly for debugging
|
||||
sub print {
|
||||
my($self) = shift;
|
||||
print "MacCVS:: name: ", $self->{name}, " session file: ", $self->{session_file}, "\n";
|
||||
}
|
||||
|
||||
# checkout( self, module, revision, date)
|
||||
# MacCVS checkout command
|
||||
# returns 1 on failure
|
||||
sub checkout {
|
||||
my($self, $module, $revision, $date ) = @_;
|
||||
unless( defined ($module) ) { $module = ""; } # get rid of the pesky undefined warnings
|
||||
unless( defined ($revision) ) { $revision = ""; }
|
||||
unless( defined ($date) ) { $date = ""; }
|
||||
|
||||
$self->assertSessionOpen() || return 1;
|
||||
|
||||
my $script = <<END_OF_APPLESCRIPT;
|
||||
tell (load script file "$MacCVSLib") to Checkout given sessionName:"$self->{name}", module:"$module", revision:"$revision", date:"$date"
|
||||
END_OF_APPLESCRIPT
|
||||
return _myDoAppleScript($script);
|
||||
}
|
||||
|
||||
1;
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
MacCVS - Interface to MacCVS
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use MacCVS;
|
||||
$session = MacCVS->new( <session_file_path>) || die "cannot create session";
|
||||
$session->checkout([module] [revision] [date]) || die "Could not check out";
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This is a MacCVS interface for talking to MacCVS Pro client.
|
||||
MacCVSSession is the class used to manipulate the session
|
||||
|
||||
=item new
|
||||
MacCVS->new( <cvs session file path>);
|
||||
|
||||
Creates a new session. Returns undef on failure.
|
||||
|
||||
=item checkout( <module> [revision] [date] )
|
||||
|
||||
cvs checkout command. Revision and date are optional
|
||||
returns 0 on failure
|
||||
|
||||
=cut
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
=over
|
||||
|
||||
=item MacCVS Home Page
|
||||
|
||||
http://www.maccvs.org/
|
||||
|
||||
=back
|
||||
|
||||
=head1 AUTHORS
|
||||
|
||||
Aleks Totic atotic@netscape.com
|
||||
|
||||
=cut
|
||||
|
||||
__END__
|
||||
@@ -1,159 +0,0 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# This is a list of paths to export.mac files, and destination
|
||||
# directories for the copied headers. Destinations are relative
|
||||
# to "mozilla:dist".
|
||||
|
||||
###################
|
||||
# PUBLIC TREE
|
||||
###################
|
||||
|
||||
# LDAP
|
||||
mozilla:directory:c-sdk:ldap:include:MANIFEST :ldap
|
||||
|
||||
#INCLUDE
|
||||
mozilla:config:mac:export.mac :config
|
||||
mozilla:include:export.mac :include
|
||||
mozilla:cmd:macfe:pch:export.mac :include
|
||||
|
||||
#MAC_COMMON
|
||||
mozilla:build:mac:export.mac :mac:common
|
||||
mozilla:lib:mac:NSStdLib:include:export.mac :mac:common
|
||||
mozilla:lib:mac:MacMemoryAllocator:include:export.mac :mac:common
|
||||
mozilla:lib:mac:Misc:export.mac :mac:common
|
||||
mozilla:lib:mac:MoreFiles:export.mac :mac:common:morefiles
|
||||
mozilla:cmd:macfe:export.mac :mac:macfe
|
||||
|
||||
#NSPR
|
||||
mozilla:nsprpub:pr:include:export.mac :nspr
|
||||
mozilla:nsprpub:pr:src:md:mac:export.mac :nspr:mac
|
||||
mozilla:nsprpub:lib:ds:export.mac :nspr
|
||||
mozilla:nsprpub:lib:libc:include:export.mac :nspr
|
||||
mozilla:nsprpub:lib:msgc:include:export.mac :nspr
|
||||
|
||||
#DBM
|
||||
mozilla:dbm:include:export.mac :dbm
|
||||
|
||||
#LIBIMAGE
|
||||
mozilla:modules:libimg:png:export.mac :libimg
|
||||
mozilla:modules:libimg:src:export.mac :libimg
|
||||
mozilla:modules:libimg:public:export.mac :libimg
|
||||
|
||||
#SECURITY_freenav
|
||||
mozilla:modules:security:freenav:export.mac :security
|
||||
|
||||
#XPCOM
|
||||
mozilla:xpcom:src:export.mac :xpcom
|
||||
|
||||
#ZLIB
|
||||
mozilla:modules:zlib:src:export.mac :zlib
|
||||
|
||||
#JPEG
|
||||
mozilla:jpeg:export.mac :jpeg
|
||||
|
||||
#JSJ
|
||||
mozilla:js:jsj:export.mac :jsj
|
||||
|
||||
#JSDEBUG
|
||||
mozilla:js:jsd:export.mac :jsdebug
|
||||
|
||||
#JS
|
||||
mozilla:js:src:export.mac :js
|
||||
|
||||
#RDF
|
||||
mozilla:modules:rdf:include:export.mac :rdf
|
||||
|
||||
#XML
|
||||
mozilla:modules:xml:glue:export.mac :xml
|
||||
mozilla:modules:xml:expat:xmlparse:export.mac :xml
|
||||
|
||||
#LIBFONT
|
||||
mozilla:modules:libfont:public:export.mac :libfont
|
||||
mozilla:modules:libfont:src:export.mac :libfont
|
||||
|
||||
#SCHEDULER
|
||||
mozilla:modules:schedulr:public:export.mac :schedulr
|
||||
|
||||
#NETWORK
|
||||
#This stuff is all in libnet on the branch.
|
||||
#mozilla:network:cache:export.mac :network
|
||||
#mozilla:network:client:export.mac :network
|
||||
#mozilla:network:cnvts:export.mac :network
|
||||
#mozilla:network:cstream:export.mac :network
|
||||
#mozilla:network:main:export.mac :network
|
||||
#ozilla:network:protocol:about:export.mac :network
|
||||
#mozilla:network:protocol:certld:export.mac :network
|
||||
#mozilla:network:protocol:dataurl:export.mac :network
|
||||
#mozilla:network:protocol:file:export.mac :network
|
||||
#mozilla:network:protocol:ftp:export.mac :network
|
||||
#mozilla:network:protocol:gopher:export.mac :network
|
||||
#mozilla:network:protocol:http:export.mac :network
|
||||
#mozilla:network:protocol:js:export.mac :network
|
||||
#mozilla:network:protocol:mailbox:export.mac :network
|
||||
#mozilla:network:protocol:marimba:export.mac :network
|
||||
#mozilla:network:protocol:nntp:export.mac :network
|
||||
#mozilla:network:protocol:pop3:export.mac :network
|
||||
#mozilla:network:protocol:remote:export.mac :network
|
||||
#mozilla:network:protocol:smtp:export.mac :network
|
||||
|
||||
#NORMANDY_BRANCH only
|
||||
mozilla:lib:libnet:export.mac :libnet
|
||||
|
||||
#HTML_DIALOGS
|
||||
mozilla:lib:htmldlgs:export.mac :htmldlgs
|
||||
|
||||
#LAYOUT
|
||||
mozilla:lib:layout:export.mac :layout
|
||||
|
||||
#LAYERS
|
||||
mozilla:lib:liblayer:include:export.mac :layers
|
||||
|
||||
#PARSE
|
||||
mozilla:lib:libparse:export.mac :libparse
|
||||
|
||||
#STYLE
|
||||
mozilla:lib:libstyle:export.mac :libstyle
|
||||
|
||||
#LIBHOOK
|
||||
mozilla:modules:libhook:public:export.mac :libhook
|
||||
|
||||
#LIBPREF
|
||||
mozilla:modules:libpref:public:export.mac :libpref
|
||||
|
||||
#LIBREG
|
||||
mozilla:modules:libreg:include:export.mac :libreg
|
||||
|
||||
#LIBUTIL
|
||||
mozilla:modules:libutil:public:export.mac :libutil
|
||||
|
||||
#OJI
|
||||
mozilla:modules:oji:src:export.mac :oji
|
||||
|
||||
#PROGRESS
|
||||
mozilla:modules:progress:public:export.mac :progress
|
||||
|
||||
#SOFTUPDATE
|
||||
mozilla:modules:softupdt:include:export.mac :softupdate
|
||||
|
||||
#NAV_JAVA
|
||||
mozilla:nav-java:stubs:macjri:export.mac :nav-java:macjri
|
||||
mozilla:nav-java:stubs:include:export.mac :nav-java
|
||||
|
||||
#SUN_JAVA
|
||||
mozilla:sun-java:stubs:include:export.mac :sun-java:include
|
||||
mozilla:sun-java:stubs:macjri:export.mac :sun-java:macjri
|
||||
@@ -1,373 +0,0 @@
|
||||
=head1 NAME
|
||||
|
||||
B<Moz> - routines for automating CodeWarrior builds, and some extra-curricular activities related to building Mozilla
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use Moz;
|
||||
|
||||
OpenErrorLog(":::BuildLog");
|
||||
StopForErrors();
|
||||
|
||||
$Moz::QUIET = 1;
|
||||
InstallFromManifest(":projects:MANIFEST", $dist_dir);
|
||||
|
||||
BuildProjectClean(":projects:SomeProject.mcp", "SomeTarget");
|
||||
MakeAlias(":projects:SomeProject.shlb", $dist_dir);
|
||||
|
||||
DontStopForErrors();
|
||||
|
||||
BuildProject(":projects:SomeOtherProject.mcp", "SomeTarget");
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
B<Moz> comprises the routines needed to slap CodeWarrior around, force it to build a sequence of projects, report the results, and a few other things.
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
|
||||
|
||||
package Moz;
|
||||
require Exporter;
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(BuildProject BuildProjectClean OpenErrorLog MakeAlias StopForErrors DontStopForErrors InstallFromManifest);
|
||||
@EXPORT_OK = qw(CloseErrorLog UseCodeWarriorLib QUIET);
|
||||
|
||||
use Cwd;
|
||||
use File::Path;
|
||||
use ExtUtils::Manifest 'maniread';
|
||||
|
||||
sub current_directory()
|
||||
{
|
||||
my $current_directory = cwd();
|
||||
chop($current_directory) if ( $current_directory =~ m/:$/ );
|
||||
return $current_directory;
|
||||
}
|
||||
|
||||
sub full_path_to($)
|
||||
{
|
||||
my ($path) = @_;
|
||||
if ( $path =~ m/^[^:]+$/ )
|
||||
{
|
||||
$path = ":" . $path;
|
||||
}
|
||||
|
||||
if ( $path =~ m/^:/ )
|
||||
{
|
||||
$path = current_directory() . $path;
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
=head2 Setup
|
||||
|
||||
Pretty much, everything is taken care of for you.
|
||||
However, B<Moz> does use a little compiled AppleScript library (the file CodeWarriorLib) for some of its communcication with CodeWarrior.
|
||||
If this library isn't in the same directory as "Moz.pm", then you need to tell B<Moz> where to find it.
|
||||
Call C<UseCodeWarriorLib($path_to_CodeWarriorLib)>.
|
||||
This routine is not exported by default, nor are you likely to need it.
|
||||
|
||||
=cut
|
||||
|
||||
sub UseCodeWarriorLib($)
|
||||
{
|
||||
($CodeWarriorLib) = @_;
|
||||
$CodeWarriorLib = full_path_to($CodeWarriorLib);
|
||||
}
|
||||
|
||||
sub activate_CodeWarrior()
|
||||
{
|
||||
MacPerl::DoAppleScript(<<END_OF_APPLESCRIPT);
|
||||
tell (load script file "$CodeWarriorLib") to ActivateCodeWarrior()
|
||||
END_OF_APPLESCRIPT
|
||||
}
|
||||
|
||||
BEGIN
|
||||
{
|
||||
UseCodeWarriorLib(":CodeWarriorLib");
|
||||
activate_CodeWarrior();
|
||||
}
|
||||
|
||||
$logging = 0;
|
||||
$recent_errors_file = "";
|
||||
$stop_on_1st_error = 1;
|
||||
$QUIET = 0;
|
||||
|
||||
|
||||
|
||||
=head2 Logging all the errors and warnings - C<OpenErrorLog($log_file)>, C<CloseErrorLog()>
|
||||
|
||||
The warnings and errors generated in the course of building projects can be logged to a file.
|
||||
Tinderbox uses this facility to show why a remote build failed.
|
||||
|
||||
Logging is off by default.
|
||||
Start logging at any point in your build process with C<OpenErrorLog($log_file)>.
|
||||
Stop with C<CloseErrorLog()>.
|
||||
You never need to close the log explicitly, unless you want to just log a couple of projects in the middle of a big list.
|
||||
C<CloseErrorLog()> is not exported by default.
|
||||
|
||||
=cut
|
||||
|
||||
sub CloseErrorLog()
|
||||
{
|
||||
if ( $logging )
|
||||
{
|
||||
close(ERROR_LOG);
|
||||
$logging = 0;
|
||||
StopForErrors() if $stop_on_1st_error;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
sub OpenErrorLog($)
|
||||
{
|
||||
my ($log_file) = @_;
|
||||
|
||||
CloseErrorLog();
|
||||
if ( $log_file )
|
||||
{
|
||||
$log_file = full_path_to($log_file);
|
||||
|
||||
open(ERROR_LOG, ">$log_file");
|
||||
|
||||
$log_file =~ m/.+:(.+)/;
|
||||
$recent_errors_file = full_path_to("$1.part");
|
||||
$logging = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
=head2 Stopping before it's too late - C<StopForErrors()>, C<DontStopForErrors()>
|
||||
|
||||
When building a long list of projects, you decide whether to continue building subsequent projects when one fails.
|
||||
By default, your build script will C<die> after the first project that generates an error while building.
|
||||
Change this behavior with C<DontStopForErrors()>.
|
||||
Re-enable it with C<StopForErrors()>.
|
||||
|
||||
=cut
|
||||
|
||||
sub StopForErrors()
|
||||
{
|
||||
$stop_on_1st_error = 1;
|
||||
|
||||
# Can't stop for errors unless we notice them.
|
||||
# Can't notice them unless we are logging.
|
||||
# If the user didn't explicitly request logging, log to a temporary file.
|
||||
|
||||
if ( ! $recent_errors_file )
|
||||
{
|
||||
OpenErrorLog("${TMPDIR}BuildResults");
|
||||
}
|
||||
}
|
||||
|
||||
sub DontStopForErrors()
|
||||
{
|
||||
$stop_on_1st_error = 0;
|
||||
}
|
||||
|
||||
sub log_message($)
|
||||
{
|
||||
if ( $logging )
|
||||
{
|
||||
my ($message) = @_;
|
||||
print ERROR_LOG $message;
|
||||
}
|
||||
}
|
||||
|
||||
sub log_message_with_time($)
|
||||
{
|
||||
if ( $logging )
|
||||
{
|
||||
my ($message) = @_;
|
||||
my $time_stamp = localtime();
|
||||
log_message("$message ($time_stamp)\n");
|
||||
}
|
||||
}
|
||||
|
||||
sub log_recent_errors($)
|
||||
{
|
||||
my ($project_name) = @_;
|
||||
my $found_errors = 0;
|
||||
|
||||
if ( $logging )
|
||||
{
|
||||
open(RECENT_ERRORS, "<$recent_errors_file");
|
||||
|
||||
while( <RECENT_ERRORS> )
|
||||
{
|
||||
if ( /^Error/ || /^CouldnÕt find project file/ )
|
||||
{
|
||||
$found_errors = 1;
|
||||
}
|
||||
print ERROR_LOG $_;
|
||||
}
|
||||
|
||||
close(RECENT_ERRORS);
|
||||
unlink("$recent_errors_file");
|
||||
}
|
||||
|
||||
if ( $stop_on_1st_error && $found_errors )
|
||||
{
|
||||
print ERROR_LOG "### Build failed.\n";
|
||||
die "### Errors encountered building \"$project_name\".\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub build_project($$$)
|
||||
{
|
||||
my ($project_path, $target_name, $clean_build) = @_;
|
||||
$project_path = full_path_to($project_path);
|
||||
|
||||
$project_path =~ m/.+:(.+)/;
|
||||
my $project_name = $1;
|
||||
|
||||
log_message_with_time("### Building \"$project_path\"");
|
||||
|
||||
# Check that the given project exists
|
||||
if (! -e $project_path)
|
||||
{
|
||||
print ERROR_LOG "### Build failed.\n";
|
||||
die "### Can't find project file \"$project_path\".\n";
|
||||
}
|
||||
|
||||
print "Building \"$project_path\"\n";
|
||||
|
||||
$had_errors =
|
||||
MacPerl::DoAppleScript(<<END_OF_APPLESCRIPT);
|
||||
tell (load script file "$CodeWarriorLib") to BuildProject("$project_path", "$project_name", "$target_name", "$recent_errors_file", $clean_build)
|
||||
END_OF_APPLESCRIPT
|
||||
|
||||
# Append any errors to the globally accumulated log file
|
||||
if ( $had_errors )
|
||||
{
|
||||
log_recent_errors($project_path);
|
||||
}
|
||||
}
|
||||
|
||||
=head2 Getting CodeWarrior to build projects - C<BuildProject($project, $opt_target)>, C<BuildProjectClean($project, $opt_target)>
|
||||
|
||||
C<BuildProject()> and C<BuildProjectClean()> are identical, except that the latter first removes object code.
|
||||
In both, CodeWarrior opens the project if it wasn't already open; builds the given (or else current) target; and finally closes
|
||||
the project, if it wasn't already open.
|
||||
|
||||
=cut
|
||||
|
||||
sub BuildProject($;$)
|
||||
{
|
||||
my ($project_path, $target_name) = @_;
|
||||
build_project($project_path, $target_name, "false");
|
||||
}
|
||||
|
||||
sub BuildProjectClean($;$)
|
||||
{
|
||||
my ($project_path, $target_name) = @_;
|
||||
build_project($project_path, $target_name, "true");
|
||||
}
|
||||
|
||||
|
||||
=head2 Miscellaneous
|
||||
|
||||
C<MakeAlias($old_file, $new_file)> functions like C<symlink()>, except with better argument defaulting and more explicit error messages.
|
||||
|
||||
=cut
|
||||
|
||||
sub MakeAlias($$)
|
||||
{
|
||||
my ($old_file, $new_file) = @_;
|
||||
|
||||
# if the directory to hold $new_file doesn't exist, create it
|
||||
if ( ($new_file =~ m/(.+:)/) && !-d $1 )
|
||||
{
|
||||
mkpath($1);
|
||||
}
|
||||
|
||||
# if a leaf name wasn't specified for $new_file, use the leaf from $old_file
|
||||
if ( ($new_file =~ m/:$/) && ($old_file =~ m/.+:(.+)/) )
|
||||
{
|
||||
$new_file .= $1;
|
||||
}
|
||||
|
||||
my $message = "Can't create a Finder alias (at \"$new_file\")\n for \"$old_file\";";
|
||||
# die "$message symlink doesn't work on directories.\n" if -d $old_file;
|
||||
die "$message because \"$old_file\" doesn't exist.\n" unless -e $old_file;
|
||||
#check if the alias is already pointing to the right direction
|
||||
my ($aliasto) = readlink($new_file);
|
||||
my ($full_old_file) = ( $old_file =~ m/^:/ ) ? cwd() . $old_file : $old_file;
|
||||
unless ($aliasto && ($aliasto eq $full_old_file))
|
||||
{
|
||||
unlink $new_file;
|
||||
# print "symlink(\"$old_file\", \"$new_file\");\n";
|
||||
symlink($old_file, $new_file) || die "$message symlink returned an unexpected error.\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
=pod
|
||||
|
||||
C<InstallFromManifest()>
|
||||
|
||||
=cut
|
||||
|
||||
sub InstallFromManifest($;$)
|
||||
{
|
||||
my ($manifest_file, $dest_dir) = @_;
|
||||
|
||||
$dest_dir ||= ":";
|
||||
|
||||
$manifest_file =~ m/(.+):/;
|
||||
my $source_dir = $1;
|
||||
|
||||
chop($dest_dir) if $dest_dir =~ m/:$/;
|
||||
|
||||
print "Doing manifest on \"$manifest_file\"\n" unless $QUIET;
|
||||
|
||||
my $read = maniread(full_path_to($manifest_file));
|
||||
foreach $file (keys %$read)
|
||||
{
|
||||
next unless $file;
|
||||
|
||||
$subdir = ":";
|
||||
if ( $file =~ /:.+:/ )
|
||||
{
|
||||
$subdir = $&;
|
||||
}
|
||||
|
||||
$file = ":$file" unless $file =~ m/^:/;
|
||||
MakeAlias("$source_dir$file", "$dest_dir$subdir");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
||||
=head1 AUTHORS
|
||||
|
||||
Scott Collins <scc@netscape.com>, Simon Fraser <sfraser@netscape.com>
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
BuildMozillaDebug.pl (et al), BuildList.pm, CodeWarriorLib (an AppleScript library)
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
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.
|
||||
|
||||
=cut
|
||||
@@ -1,388 +0,0 @@
|
||||
#!perl -w
|
||||
package NGLayoutBuildList;
|
||||
|
||||
require 5.004;
|
||||
require Exporter;
|
||||
|
||||
use strict;
|
||||
use vars qw( @ISA @EXPORT );
|
||||
|
||||
# perl includes
|
||||
use Mac::StandardFile;
|
||||
use Mac::Processes;
|
||||
use Cwd;
|
||||
use File::Path;
|
||||
|
||||
# homegrown
|
||||
use Moz;
|
||||
use MacCVS;
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw( Checkout BuildDist BuildProjects BuildCommonProjects BuildLayoutProjects);
|
||||
|
||||
# NGLayoutBuildList builds the nglayout project
|
||||
# it is configured by setting the following variables in the caller:
|
||||
# Usage:
|
||||
# caller variables that affect behaviour:
|
||||
# DEBUG : 1 if we are building a debug version
|
||||
# 3-part build process: checkout, dist, and build_projects
|
||||
# Hack alert:
|
||||
# NGLayout defines are located in :mozilla:config:mac:NGLayoutConfigInclude.h
|
||||
# An alias "MacConfigInclude.h" to this file is created inside dist:config
|
||||
# Note that the name of alias is different than the name of the file. This
|
||||
# is to trick CW into including NGLayout defines
|
||||
|
||||
#
|
||||
# Utility routines
|
||||
#
|
||||
|
||||
# pickWithMemoryFile stores the information about the user pick inside
|
||||
# the file $session_storage
|
||||
sub _pickWithMemoryFile($)
|
||||
{
|
||||
my ($sessionStorage) = @_;
|
||||
my $cvsfile;
|
||||
|
||||
if (( -e $sessionStorage) &&
|
||||
open( SESSIONFILE, $sessionStorage ))
|
||||
{
|
||||
# Read in the path if available
|
||||
$cvsfile = <SESSIONFILE>;
|
||||
chomp $cvsfile;
|
||||
close SESSIONFILE;
|
||||
if ( ! -e $cvsfile )
|
||||
{
|
||||
print STDERR "$cvsfile has disappeared\n";
|
||||
undef $cvsfile;
|
||||
}
|
||||
}
|
||||
unless (defined ($cvsfile))
|
||||
{
|
||||
print "Choose a CVS session file in file dialog box:\n"; # no way to display a prompt?
|
||||
# make sure that MacPerl is a front process
|
||||
while (GetFrontProcess () != GetCurrentProcess())
|
||||
{
|
||||
SetFrontProcess( GetCurrentProcess() );
|
||||
}
|
||||
# prompt user for the file name, and store it
|
||||
my $macFile = StandardGetFile( 0, "McvD");
|
||||
if ( $macFile->sfGood() )
|
||||
{
|
||||
$cvsfile = $macFile->sfFile();
|
||||
# save the choice if we can
|
||||
if ( open (SESSIONFILE, ">" . $sessionStorage))
|
||||
{
|
||||
printf SESSIONFILE $cvsfile, "\n";
|
||||
close SESSIONFILE;
|
||||
}
|
||||
else
|
||||
{
|
||||
print STDERR "Could not open storage file\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
return $cvsfile;
|
||||
}
|
||||
|
||||
# assert that we are in the correct directory for the build
|
||||
sub _assertRightDirectory()
|
||||
{
|
||||
unless (-e ":mozilla")
|
||||
{
|
||||
my($dir) = cwd();
|
||||
print STDERR "NGLayoutBuildList called from incorrect directory: $dir";
|
||||
}
|
||||
}
|
||||
|
||||
sub _getDistDirectory()
|
||||
{
|
||||
return $main::DEBUG ? ":mozilla:dist:viewer_debug:" : ":mozilla:dist:viewer:";
|
||||
}
|
||||
|
||||
#
|
||||
# MAIN ROUTINES
|
||||
#
|
||||
sub Checkout()
|
||||
{
|
||||
_assertRightDirectory();
|
||||
my($cvsfile) = _pickWithMemoryFile("::nglayout.cvsloc");
|
||||
my($session) = MacCVS->new( $cvsfile );
|
||||
unless (defined($session)) { die "Checkout aborted. Cannot create session file: $session" }
|
||||
|
||||
if ($main::pull{lizard})
|
||||
{
|
||||
$session->checkout("mozilla/LICENSE") || die "checkout failure";
|
||||
$session->checkout("mozilla/LEGAL") || die "checkout failure";
|
||||
$session->checkout("mozilla/config") || die "checkout failure";
|
||||
$session->checkout("mozilla/lib/liblayer") || die "checkout failure";
|
||||
$session->checkout("mozilla/modules/zlib") || die "checkout failure";
|
||||
$session->checkout("mozilla/modules/libutil") || die "checkout failure";
|
||||
$session->checkout("mozilla/nsprpub") || die "checkout failure";
|
||||
$session->checkout("mozilla/sun-java") || die "checkout failure";
|
||||
$session->checkout("mozilla/nav-java") || die "checkout failure";
|
||||
$session->checkout("mozilla/js") || die "checkout failure";
|
||||
$session->checkout("mozilla/modules/security/freenav") || die "checkout failure";
|
||||
$session->checkout("mozilla/modules/libpref") || die "checkout failure";
|
||||
$session->checkout("mozilla/lib/libparse") || die "checkout failure";
|
||||
$session->checkout("mozilla/lib/layout") || die "checkout failure";
|
||||
$session->checkout("mozilla/lib/libstyle") || die "checkout failure";
|
||||
$session->checkout("mozilla/lib/libpwcac") || die "checkout failure";
|
||||
}
|
||||
if ($main::pull{xpcom})
|
||||
{
|
||||
$session->checkout("mozilla/modules/libreg ") || die "checkout failure";
|
||||
$session->checkout("mozilla/xpcom") || die "checkout failure";
|
||||
}
|
||||
if ($main::pull{imglib})
|
||||
{
|
||||
my($IMGLIB_BRANCH) = "MODULAR_IMGLIB_BRANCH";
|
||||
|
||||
$session->checkout("mozilla/jpeg ", $IMGLIB_BRANCH) || die "checkout failure";
|
||||
$session->checkout("mozilla/modules/libutil", $IMGLIB_BRANCH) || die "checkout failure";
|
||||
$session->checkout("mozilla/modules/libimg", $IMGLIB_BRANCH) || die "checkout failure";
|
||||
}
|
||||
if ($main::pull{netlib})
|
||||
{
|
||||
$session->checkout("mozilla/lib/xp ") || die "checkout failure";
|
||||
$session->checkout("mozilla/network") || die "checkout failure";
|
||||
$session->checkout("mozilla/include") || die "checkout failure";
|
||||
}
|
||||
if ($main::pull{nglayout})
|
||||
{
|
||||
$session->checkout("mozilla/base ") || die "checkout failure";
|
||||
$session->checkout("mozilla/dom") || die "checkout failure";
|
||||
$session->checkout("mozilla/gfx") || die "checkout failure";
|
||||
$session->checkout("mozilla/htmlparser") || die "checkout failure";
|
||||
$session->checkout("mozilla/layout") || die "checkout failure";
|
||||
$session->checkout("mozilla/view") || die "checkout failure";
|
||||
$session->checkout("mozilla/webshell") || die "checkout failure";
|
||||
$session->checkout("mozilla/widget") || die "checkout failure";
|
||||
}
|
||||
if ($main::pull{mac})
|
||||
{
|
||||
$session->checkout("mozilla/build/mac ") || die "checkout failure";
|
||||
$session->checkout("mozilla/cmd/macfe") || die "checkout failure";
|
||||
$session->checkout("mozilla/lib/mac/MacMemoryAllocator") || die "checkout failure";
|
||||
$session->checkout("mozilla/lib/mac/NSStdLib") || die "checkout failure";
|
||||
$session->checkout("mozilla/lib/mac/MoreFiles") || die "checkout failure";
|
||||
$session->checkout("mozilla/lib/mac/NSRuntime") || die "checkout failure";
|
||||
$session->checkout("mozilla/lib/mac/Misc") || die "checkout failure";
|
||||
}
|
||||
}
|
||||
|
||||
# builds the dist directory
|
||||
sub BuildDist()
|
||||
{
|
||||
unless ( $main::build{dist} ) { return;}
|
||||
_assertRightDirectory();
|
||||
|
||||
# we really do not need all these paths, but many client projects include them
|
||||
mkpath([ ":mozilla:dist:", ":mozilla:dist:client:", ":mozilla:dist:client_debug:", ":mozilla:dist:client_stubs:" ]);
|
||||
mkpath([ ":mozilla:dist:viewer:", ":mozilla:dist:viewer_debug:" ]);
|
||||
|
||||
my($distdirectory) = ":mozilla:dist";
|
||||
|
||||
my($distlist) = [
|
||||
#MAC_COMMON
|
||||
[":mozilla:build:mac:MANIFEST", "$distdirectory:mac:common:"],
|
||||
[":mozilla:lib:mac:NSStdLib:include:MANIFEST", "$distdirectory:mac:common:"],
|
||||
[":mozilla:lib:mac:MacMemoryAllocator:include:MANIFEST", "$distdirectory:mac:common:"],
|
||||
[":mozilla:lib:mac:Misc:MANIFEST", "$distdirectory:mac:common:"],
|
||||
[":mozilla:lib:mac:MoreFiles:MANIFEST", "$distdirectory:mac:common:morefiles:"],
|
||||
#INCLUDE
|
||||
[":mozilla:config:mac:MANIFEST", "$distdirectory:config:"],
|
||||
[":mozilla:include:MANIFEST", "$distdirectory:include:"],
|
||||
[":mozilla:cmd:macfe:pch:MANIFEST", "$distdirectory:include:"],
|
||||
#NSPR
|
||||
[":mozilla:nsprpub:pr:include:MANIFEST", "$distdirectory:nspr:"],
|
||||
[":mozilla:nsprpub:pr:src:md:mac:MANIFEST", "$distdirectory:nspr:mac:"],
|
||||
[":mozilla:nsprpub:lib:ds:MANIFEST", "$distdirectory:nspr:"],
|
||||
[":mozilla:nsprpub:lib:libc:include:MANIFEST", "$distdirectory:nspr:"],
|
||||
[":mozilla:nsprpub:lib:msgc:include:MANIFEST", "$distdirectory:nspr:"],
|
||||
#JPEG
|
||||
[":mozilla:jpeg:MANIFEST", "$distdirectory:jpeg:"],
|
||||
#LIBREG
|
||||
[":mozilla:modules:libreg:include:MANIFEST", "$distdirectory:libreg:"],
|
||||
#XPCOM
|
||||
[":mozilla:xpcom:src:MANIFEST", "$distdirectory:xpcom:"],
|
||||
#ZLIB
|
||||
[":mozilla:modules:zlib:src:MANIFEST", "$distdirectory:zlib:"],
|
||||
#LIBUTIL
|
||||
[":mozilla:modules:libutil:public:MANIFEST", "$distdirectory:libutil:"],
|
||||
#SUN_JAVA
|
||||
[":mozilla:sun-java:stubs:include:MANIFEST", "$distdirectory:sun-java:"],
|
||||
[":mozilla:sun-java:stubs:macjri:MANIFEST", "$distdirectory:sun-java:"],
|
||||
#NAV_JAVA
|
||||
[":mozilla:nav-java:stubs:include:MANIFEST", "$distdirectory:nav-java:"],
|
||||
[":mozilla:nav-java:stubs:macjri:MANIFEST", "$distdirectory:nav-java:"],
|
||||
#JS
|
||||
[":mozilla:js:src:MANIFEST", "$distdirectory:js:"],
|
||||
#SECURITY_freenav
|
||||
[":mozilla:modules:security:freenav:MANIFEST", "$distdirectory:security:"],
|
||||
#LIBPREF
|
||||
[":mozilla:modules:libpref:public:MANIFEST", "$distdirectory:libpref:"],
|
||||
#LIBIMAGE
|
||||
[":mozilla:modules:libimg:png:MANIFEST", "$distdirectory:libimg:"],
|
||||
[":mozilla:modules:libimg:src:MANIFEST", "$distdirectory:libimg:"],
|
||||
[":mozilla:modules:libimg:public:MANIFEST", "$distdirectory:libimg:"],
|
||||
#PARSE
|
||||
[":mozilla:lib:libparse:MANIFEST", "$distdirectory:libparse:"],
|
||||
#OLD LAYOUT
|
||||
[":mozilla:lib:layout:MANIFEST", "$distdirectory:layout:"],
|
||||
#STYLE
|
||||
[":mozilla:lib:libstyle:MANIFEST", "$distdirectory:libstyle:"],
|
||||
#LAYERS
|
||||
[":mozilla:lib:liblayer:include:MANIFEST", "$distdirectory:layers:"],
|
||||
#NETWORK
|
||||
[":mozilla:network:cache:MANIFEST", "$distdirectory:network:"],
|
||||
[":mozilla:network:client:MANIFEST", "$distdirectory:network:"],
|
||||
[":mozilla:network:cnvts:MANIFEST", "$distdirectory:network:"],
|
||||
[":mozilla:network:cstream:MANIFEST", "$distdirectory:network:"],
|
||||
[":mozilla:network:main:MANIFEST", "$distdirectory:network:"],
|
||||
[":mozilla:network:mimetype:MANIFEST", "$distdirectory:network:"],
|
||||
[":mozilla:network:util:MANIFEST", "$distdirectory:network:"],
|
||||
[":mozilla:network:protocol:about:MANIFEST", "$distdirectory:network:"],
|
||||
[":mozilla:network:protocol:certld:MANIFEST", "$distdirectory:network:"],
|
||||
[":mozilla:network:protocol:dataurl:MANIFEST", "$distdirectory:network:"],
|
||||
[":mozilla:network:protocol:file:MANIFEST", "$distdirectory:network:"],
|
||||
[":mozilla:network:protocol:ftp:MANIFEST", "$distdirectory:network:"],
|
||||
[":mozilla:network:protocol:gopher:MANIFEST", "$distdirectory:network:"],
|
||||
[":mozilla:network:protocol:http:MANIFEST", "$distdirectory:network:"],
|
||||
[":mozilla:network:protocol:js:MANIFEST", "$distdirectory:network:"],
|
||||
[":mozilla:network:protocol:mailbox:MANIFEST", "$distdirectory:network:"],
|
||||
[":mozilla:network:protocol:marimba:MANIFEST", "$distdirectory:network:"],
|
||||
[":mozilla:network:protocol:nntp:MANIFEST", "$distdirectory:network:"],
|
||||
[":mozilla:network:protocol:pop3:MANIFEST", "$distdirectory:network:"],
|
||||
[":mozilla:network:protocol:remote:MANIFEST", "$distdirectory:network:"],
|
||||
[":mozilla:network:protocol:smtp:MANIFEST", "$distdirectory:network:"],
|
||||
[":mozilla:network:module:MANIFEST","$distdirectory:network:module"],
|
||||
#BASE
|
||||
[":mozilla:base:src:MANIFEST", "$distdirectory:base:"],
|
||||
[":mozilla:base:public:MANIFEST", "$distdirectory:base:"],
|
||||
#WEBSHELL
|
||||
[":mozilla:webshell:public:MANIFEST", "$distdirectory:webshell:"],
|
||||
#LAYOUT
|
||||
[":mozilla:layout:base:public:MANIFEST", "$distdirectory:layout:"],
|
||||
[":mozilla:layout:html:style:public:MANIFEST", "$distdirectory:layout:"],
|
||||
[":mozilla:layout:html:base:src:MANIFEST", "$distdirectory:layout:"],
|
||||
[":mozilla:layout:html:document:public:MANIFEST", "$distdirectory:layout:"],
|
||||
#WIDGET
|
||||
[":mozilla:widget:public:MANIFEST", "$distdirectory:widget:"],
|
||||
#GFX
|
||||
[":mozilla:gfx:src:MANIFEST", "$distdirectory:gfx:"],
|
||||
#VIEW
|
||||
[":mozilla:view:public:MANIFEST", "$distdirectory:view:"],
|
||||
#DOM
|
||||
[":mozilla:dom:public:MANIFEST", "$distdirectory:dom:"],
|
||||
[":mozilla:dom:public:coreDom:MANIFEST", "$distdirectory:dom:"],
|
||||
[":mozilla:dom:public:coreEvents:MANIFEST", "$distdirectory:dom:"],
|
||||
[":mozilla:dom:public:events:MANIFEST", "$distdirectory:dom:"],
|
||||
#HTMLPARSER
|
||||
[":mozilla:htmlparser:src:MANIFEST", "$distdirectory:htmlparser:"],
|
||||
|
||||
];
|
||||
foreach $a (@$distlist)
|
||||
{
|
||||
InstallFromManifest( $a->[0], $a->[1]);
|
||||
}
|
||||
|
||||
# To get out defines in all the project, dummy alias NGLayoutConfigInclude.h into MacConfigInclude.h
|
||||
MakeAlias(":mozilla:config:mac:NGLayoutConfigInclude.h", ":mozilla:dist:config:MacConfigInclude.h");
|
||||
}
|
||||
|
||||
# builds all projects
|
||||
# different targets controlled by $main::build
|
||||
sub BuildCommonProjects()
|
||||
{
|
||||
unless( $main::build{common} ) { return; }
|
||||
_assertRightDirectory();
|
||||
|
||||
# $D becomes a suffix to target names for selecting either the debug or non-debug target of a project
|
||||
my($D) = $main::DEBUG ? "Debug" : "";
|
||||
my($dist_dir) = _getDistDirectory();
|
||||
|
||||
# clean projects
|
||||
|
||||
Moz::BuildProjectClean(":mozilla:lib:mac:NSStdLib:NSStdLib.mcp", "Stubs");
|
||||
Moz::BuildProjectClean(":mozilla:lib:mac:NSRuntime:NSRuntime.mcp", "Stubs");
|
||||
Moz::BuildProjectClean(":mozilla:lib:mac:MacMemoryAllocator:MemAllocator.mcp", "Stubs");
|
||||
|
||||
# shared
|
||||
|
||||
Moz::BuildProject(":mozilla:lib:mac:NSRuntime:NSRuntime.mcp");
|
||||
MakeAlias(":mozilla:lib:mac:NSRuntime:NSRuntime$D.shlb", "$dist_dir");
|
||||
$main::DEBUG ? MakeAlias(":mozilla:lib:mac:NSRuntime:NSRuntime$D.shlb.xSYM", "$dist_dir") : 0;
|
||||
|
||||
Moz::BuildProject(":mozilla:lib:mac:MoreFiles:build:MoreFilesPPC.mcp", "MoreFiles$D.shlb");
|
||||
MakeAlias(":mozilla:lib:mac:MoreFiles:build:MoreFiles$D.shlb", "$dist_dir");
|
||||
$main::DEBUG ? MakeAlias(":mozilla:lib:mac:MoreFiles:build:MoreFiles$D.shlb.xSYM", "$dist_dir") : 0;
|
||||
|
||||
BuildProject(":mozilla:nsprpub:macbuild:NSPR20PPC.mcp", "NSPR20$D.shlb");
|
||||
MakeAlias(":mozilla:nsprpub:macbuild:NSPR20$D.shlb", "$dist_dir");
|
||||
$main::DEBUG ? MakeAlias(":mozilla:nsprpub:macbuild:NSPR20$D.shlb.xSYM", "$dist_dir") : 0;
|
||||
|
||||
BuildProject(":mozilla:lib:mac:MacMemoryAllocator:MemAllocator.mcp", "MemAllocator$D.shlb");
|
||||
MakeAlias(":mozilla:lib:mac:MacMemoryAllocator:MemAllocator$D.shlb", "$dist_dir");
|
||||
$main::DEBUG ? MakeAlias(":mozilla:lib:mac:MacMemoryAllocator:MemAllocator$D.shlb.xSYM", "$dist_dir") : 0;
|
||||
|
||||
BuildProject(":mozilla:lib:mac:NSStdLib:NSStdLib.mcp", "NSStdLib$D.shlb");
|
||||
MakeAlias(":mozilla:lib:mac:NSStdLib:NSStdLib$D.shlb", "$dist_dir");
|
||||
$main::DEBUG ? MakeAlias(":mozilla:lib:mac:NSStdLib:NSStdLib$D.shlb.xSYM", "$dist_dir") : 0;
|
||||
|
||||
BuildProject(":mozilla:xpcom:macbuild:xpcomPPC.mcp", "xpcom$D.shlb");
|
||||
MakeAlias(":mozilla:xpcom:macbuild:xpcom$D.shlb", "$dist_dir");
|
||||
$main::DEBUG ? MakeAlias(":mozilla:xpcom:macbuild:xpcom$D.shlb.xSYM", "$dist_dir") : 0;
|
||||
|
||||
BuildProject(":mozilla:jpeg:macbuild:JPEG.mcp", "JPEG$D.shlb");
|
||||
MakeAlias(":mozilla:jpeg:macbuild:JPEG$D.shlb", "$dist_dir");
|
||||
$main::DEBUG ? MakeAlias(":mozilla:jpeg:macbuild:JPEG$D.shlb.xSYM", "$dist_dir") : 0;
|
||||
|
||||
BuildProject(":mozilla:js:macbuild:JavaScriptPPC.mcp", "JavaScriptNoJSJ$D.shlb");
|
||||
MakeAlias(":mozilla:js:macbuild:JavaScript$D.shlb", "$dist_dir");
|
||||
$main::DEBUG ? MakeAlias(":mozilla:js:macbuild:JavaScript$D.shlb.xSYM", "$dist_dir") : 0;
|
||||
|
||||
BuildProject(":mozilla:modules:zlib:macbuild:zlib.mcp", "zlib$D.shlb");
|
||||
MakeAlias(":mozilla:modules:zlib:macbuild:zlib$D.shlb", "$dist_dir");
|
||||
$main::DEBUG ? MakeAlias(":mozilla:modules:zlib:macbuild:zlib$D.shlb.xSYM", "$dist_dir") : 0;
|
||||
|
||||
# static
|
||||
|
||||
BuildProject(":mozilla:modules:security:freenav:macbuild:NoSecurity.mcp", "Security.o");
|
||||
|
||||
BuildProject(":mozilla:modules:libimg:macbuild:png.mcp", "png$D.o");
|
||||
|
||||
BuildProject(":mozilla:modules:libimg:macbuild:libimg.mcp", "libimg$D.o");
|
||||
|
||||
BuildProject(":mozilla:network:macbuild:network.mcp", "networkModular$D.o");
|
||||
|
||||
}
|
||||
|
||||
sub BuildLayoutProjects()
|
||||
{
|
||||
unless( $main::build{nglayout} ) { return; }
|
||||
_assertRightDirectory();
|
||||
|
||||
# $D becomes a suffix to target names for selecting either the debug or non-debug target of a project
|
||||
my($D) = $main::DEBUG ? "Debug" : "";
|
||||
my($dist_dir) = _getDistDirectory();
|
||||
|
||||
BuildProject(":mozilla:base:macbuild:base.mcp", "base$D.o");
|
||||
|
||||
BuildProject(":mozilla:htmlparser:macbuild:htmlparser.mcp", "htmlparser$D.o");
|
||||
|
||||
BuildProject(":mozilla:dom:macbuild:dom.mcp", "dom$D.o");
|
||||
|
||||
BuildProject(":mozilla:gfx:macbuild:gfx.mcp", "gfx$D.o");
|
||||
|
||||
BuildProject(":mozilla:layout:macbuild:layout.mcp", "layout$D.o");
|
||||
|
||||
BuildProject(":mozilla:webshell:macbuild:webshell.mcp", "webshell$D.o");
|
||||
|
||||
BuildProject(":mozilla:webshell:tests:viewer:mac:viewer.mcp", "viewer$D");
|
||||
}
|
||||
|
||||
sub BuildProjects()
|
||||
{
|
||||
BuildCommonProjects();
|
||||
BuildLayoutProjects();
|
||||
}
|
||||
@@ -16,8 +16,6 @@
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#error "DonÕt use me!"
|
||||
|
||||
#define OLDROUTINELOCATIONS 0
|
||||
#define XP_MAC 1
|
||||
#ifndef NSPR20
|
||||
@@ -29,9 +27,6 @@
|
||||
#define NETSCAPE 1
|
||||
#define OTUNIXERRORS 1 /* We want OpenTransport error codes */
|
||||
|
||||
#define OJI 1
|
||||
#define MOCHA 1
|
||||
|
||||
/*
|
||||
This compiles in heap dumping utilities and other good stuff
|
||||
for developers -- maybe we only want it in for a special SDK
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
#!perl
|
||||
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
use Moz;
|
||||
use BuildList;
|
||||
|
||||
$DEBUG = 1;
|
||||
|
||||
# One of them should be 1. This will come from a config file at some stage.
|
||||
# In the meanwhile, it should match mozilla/config/mac/MacConfig.h
|
||||
$MOZ_LITE = 0;
|
||||
$MOZ_MEDIUM = 1;
|
||||
$MOZ_DARK = 0;
|
||||
|
||||
Moz::OpenErrorLog("::::Mozilla.BuildLog");
|
||||
#Moz::StopForErrors();
|
||||
|
||||
chdir("::::");
|
||||
|
||||
# Make and popuplate the dist directory
|
||||
DistMozilla();
|
||||
|
||||
# Now build the projects
|
||||
BuildMozilla();
|
||||
@@ -1,5 +0,0 @@
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
IDE_Options.h
|
||||
@@ -1,26 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
The only job of this file is for make dependencies:
|
||||
include files here that you want to cause MakeDist
|
||||
to happen again when they change.
|
||||
*/
|
||||
|
||||
|
||||
#include "MacExportListPublic"
|
||||
@@ -1,76 +0,0 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# This is the controlling script for a set of scripts that copy public
|
||||
# header files in one or more source trees into a single, "dist" directory.
|
||||
#
|
||||
# It relies on the two accompanying scripts, ÒCopyList.scriptÓ and
|
||||
# ÒCopyExports.scriptÓ, which must be in the same directory.
|
||||
#
|
||||
#
|
||||
# Known bugs:
|
||||
# Header files are always copied if the export.mac file contains
|
||||
# non-local paths.
|
||||
# Spurious output is produced even when verbose is off.
|
||||
#
|
||||
|
||||
set echo 0
|
||||
|
||||
Evaluate % = ("{{SourceFile}}" =~ /(Å:)¨0Å/)
|
||||
Directory "{{¨0}}"
|
||||
|
||||
set mozillaDir "{¨0}"
|
||||
if `evaluate "{mozillaDir}" =~ /(Å:)¨1[Â:]+:[Â:]+:/`
|
||||
set -e mozillaDir "{¨1}"
|
||||
else
|
||||
echo "Failed to find mozilla directory. Exitting"
|
||||
exit 1;
|
||||
end if
|
||||
|
||||
# Sanity check for mozilla
|
||||
|
||||
if !`exists -d "{mozillaDir}"`
|
||||
echo "Failed to find mozilla directory. Exitting"
|
||||
exit 1;
|
||||
end if
|
||||
|
||||
# Calculate the root directory by stripping off the leaf name.
|
||||
|
||||
(Evaluate "{mozillaDir}" =~ /(Å:)¨1([Â:]+)¨2:/)
|
||||
Set -e SourceRootDir "{¨1}"
|
||||
Set -e DestRootDir "{mozillaDir}dist:"
|
||||
|
||||
# Ensure the build and stubs folders exist
|
||||
|
||||
if !`exists -d "{mozillaDir}dist"`
|
||||
newfolder "{mozillaDir}dist"
|
||||
end if
|
||||
if !`exists -d "{mozillaDir}dist:client"`
|
||||
newfolder "{mozillaDir}dist:client"
|
||||
end if
|
||||
if !`exists -d "{mozillaDir}dist:client_debug"`
|
||||
newfolder "{mozillaDir}dist:client_debug"
|
||||
end if
|
||||
if !`exists -d "{mozillaDir}dist:client_stubs"`
|
||||
newfolder "{mozillaDir}dist:client_stubs"
|
||||
end if
|
||||
|
||||
# Now do the grunt work of copying headers. This can take some time
|
||||
|
||||
"{SourceRootDir}mozilla:build:mac:CopyExports.script" "mozilla:build:mac:MacExportListPublic"
|
||||
|
||||
|
||||
@@ -24,13 +24,22 @@ MOZ_TOP=mozilla
|
||||
!endif
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#// Defines specific to MOZ_NGLAYOUT
|
||||
#// Defines specific to MOZ_RAPTOR
|
||||
#//------------------------------------------------------------------------
|
||||
!if defined(MOZ_NGLAYOUT)
|
||||
NGLAYOUT_MAKEFILE=nglayout.mak
|
||||
NGLAYOUT_ENV_VARS=STANDALONE_IMAGE_LIB=1 MODULAR_NETLIB=1 NGLAYOUT_BUILD_PREFIX=1
|
||||
MOZNGLAYOUT_BRANCH=RAPTOR_INTEGRATION0_BRANCH
|
||||
!if defined(MOZ_RAPTOR)
|
||||
RAPTOR_MAKEFILE=raptor.mak
|
||||
|
||||
CVSCO = cvs -q co -P
|
||||
|
||||
# Branch tags we use
|
||||
NETLIB_BRANCH = MODULAR_NETLIB_BRANCH
|
||||
MOZRAPTOR_BRANCH = RAPTOR_INTEGRATION0_BRANCH
|
||||
|
||||
# CVS commands to pull the appropriate branch versions
|
||||
CVSCO_NETLIB = $(CVSCO) -r $(NETLIB_BRANCH)
|
||||
CVSCO_CONFIG = $(CVSCO) -r $(MOZRAPTOR_BRANCH)
|
||||
|
||||
MOZ_BRANCH=$(MOZRAPTOR_BRANCH)
|
||||
!endif
|
||||
|
||||
|
||||
@@ -79,64 +88,45 @@ pull_clobber_build_all:: pull_all \
|
||||
clobber_build_all:: clobber_all \
|
||||
build_all
|
||||
|
||||
!if defined(MOZ_NGLAYOUT)
|
||||
# The MOZ_NGLAYOUT pull is complicated, be very careful choosing which files are on
|
||||
# the tip and which are on the branches.
|
||||
pull_all:: pull_client_source_product pull_nglayout pull_netlib repull_ngl_integration pull_imglib repull_include
|
||||
!if defined(MOZ_RAPTOR)
|
||||
pull_all:: pull_client_source_product pull_raptor pull_netlib
|
||||
!else
|
||||
pull_all:: pull_client_source_product
|
||||
!endif
|
||||
|
||||
!if defined(MOZ_NGLAYOUT)
|
||||
pull_nglayout:
|
||||
!if defined(MOZ_RAPTOR)
|
||||
pull_raptor:
|
||||
@cd $(MOZ_SRC)
|
||||
$(CVSCO) $(MOZ_TOP)/$(NGLAYOUT_MAKEFILE)
|
||||
$(CVSCO) $(MOZ_TOP)/raptor.mak
|
||||
@cd $(MOZ_SRC)/$(MOZ_TOP)
|
||||
$(NMAKE) -f $(NGLAYOUT_MAKEFILE) pull_nglayout $(NGLAYOUT_ENV_VARS)
|
||||
$(NMAKE) -f $(RAPTOR_MAKEFILE) pull_xpcom pull_imglib pull_raptor
|
||||
|
||||
pull_netlib:
|
||||
@cd $(MOZ_SRC)/$(MOZ_TOP)
|
||||
$(NMAKE) -f $(NGLAYOUT_MAKEFILE) pull_netlib $(NGLAYOUT_ENV_VARS)
|
||||
|
||||
# Here is where we pull everything on the layout integration branch
|
||||
repull_ngl_integration:
|
||||
@cd $(MOZ_SRC)
|
||||
$(CVSCO) -r $(MOZNGLAYOUT_BRANCH) $(MOZ_TOP)/include $(MOZ_TOP)/cmd $(MOZ_TOP)/lib $(MOZ_TOP)/modules
|
||||
@cd $(MOZ_SRC)/$(MOZ_TOP)
|
||||
|
||||
# Careful to put this after repull_ngl_integration, want modules/libutil and
|
||||
# modules/libimg to be on imglib branch
|
||||
pull_imglib:
|
||||
@cd $(MOZ_SRC)/$(MOZ_TOP)
|
||||
$(NMAKE) -f $(NGLAYOUT_MAKEFILE) pull_imglib $(NGLAYOUT_ENV_VARS)
|
||||
|
||||
# Want certain files in the include directory to be on the tip
|
||||
repull_include:
|
||||
@cd $(MOZ_SRC)
|
||||
$(CVSCO) -A $(MOZ_TOP)/include/net.h
|
||||
@cd $(MOZ_SRC)\.
|
||||
$(CVSCO_NETLIB) $(MOZ_TOP)/lib/xp
|
||||
$(CVSCO_NETLIB) $(MOZ_TOP)/lib/libnet
|
||||
$(CVSCO_NETLIB) $(MOZ_TOP)/include/net.h $(MOZ_TOP)/include/npapi.h
|
||||
!endif
|
||||
|
||||
|
||||
pull_client_source_product:
|
||||
@echo +++ client.mak: checking out the client with "$(CVS_BRANCH)"
|
||||
cd $(MOZ_SRC)\.
|
||||
-cvs -q co $(CVS_BRANCH) MozillaSourceWin
|
||||
|
||||
|
||||
!if defined(MOZ_NGLAYOUT)
|
||||
# Build NGLayout first.
|
||||
build_all: build_nglayout \
|
||||
!if defined(MOZ_RAPTOR)
|
||||
build_all: build_raptor \
|
||||
build_dist \
|
||||
build_client
|
||||
!else
|
||||
build_all: build_dist \
|
||||
build_all: build_dist \
|
||||
build_client
|
||||
!endif
|
||||
|
||||
!if defined(MOZ_NGLAYOUT)
|
||||
build_nglayout:
|
||||
!if defined(MOZ_RAPTOR)
|
||||
build_raptor:
|
||||
cd $(MOZ_SRC)\$(MOZ_TOP)
|
||||
$(NMAKE) -f $(NGLAYOUT_MAKEFILE) $(NGLAYOUT_ENV_VARS)
|
||||
$(NMAKE) -f $(RAPTOR_MAKEFILE) STANDALONE_IMAGE_LIB=1 RAPTOR=1
|
||||
!endif
|
||||
|
||||
build_dist:
|
||||
@@ -158,8 +148,8 @@ build_client:
|
||||
#
|
||||
# remove all source files from the tree and print a report of what was missed
|
||||
#
|
||||
!if defined(MOZ_NGLAYOUT)
|
||||
clobber_all:: clobber_moz clobber_nglayout
|
||||
!if defined(MOZ_RAPTOR)
|
||||
clobber_all:: clobber_moz clobber_raptor
|
||||
!else
|
||||
clobber_all:: clobber_moz
|
||||
!endif
|
||||
@@ -174,10 +164,10 @@ clobber_moz:
|
||||
$(NMAKE) -f nsldap.mak clobber_all
|
||||
!endif
|
||||
|
||||
!if defined(MOZ_NGLAYOUT)
|
||||
clobber_nglayout:
|
||||
!if defined(MOZ_RAPTOR)
|
||||
clobber_raptor:
|
||||
cd $(MOZ_SRC)\$(MOZ_TOP)
|
||||
$(NMAKE) -f $(NGLAYOUT_MAKEFILE) clobber $(NGLAYOUT_ENV_VARS)
|
||||
$(NMAKE) -f $(RAPTOR_MAKEFILE) STANDALONE_IMAGE_LIB=1 RAPTOR=1 clobber
|
||||
!endif
|
||||
|
||||
depend:
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<HEAD>
|
||||
<TITLE>Account Setup</TITLE>
|
||||
<SCRIPT LANGUAGE="JavaScript" ARCHIVE="asw.jar" SRC="2step.js"></SCRIPT>
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="2step.js"></SCRIPT>
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="sheet.js"></LINK>
|
||||
</HEAD>
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME="tagtext" LEFT=420 TOP=0 VISIBILITY=SHOW>
|
||||
<LAYER NAME = "tagtext" LEFT = 420 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="images/tag.gif">
|
||||
<B CLASS="previewtag">ACCOUNT SETUP</B>
|
||||
@@ -39,19 +40,10 @@
|
||||
|
||||
<!-- The layer below contains the headline and text of this screen -->
|
||||
|
||||
<P CLASS="title"><B>Connect to
|
||||
<SCRIPT LANGUAGE="JavaScript" ID="2step101">insertISPName();</SCRIPT>
|
||||
</B></P>
|
||||
|
||||
<P>Account Setup will now connect you to
|
||||
<SCRIPT LANGUAGE="JavaScript" ID="2step102">insertISPName();</SCRIPT>
|
||||
so that you can create an account with this ISP. (Note: It may take a minute for your modem to connect to this ISP.)</P>
|
||||
<P>After you have connected to
|
||||
<SCRIPT LANGUAGE="JavaScript" ID="2step103">insertISPName();</SCRIPT>
|
||||
you will be asked to supply account and billing information, such as your desired electronic mail name and password, and credit card information.</P>
|
||||
|
||||
<P CLASS="title"><B>Download</B></P>
|
||||
<P>Connect to Internet Service Provider for account creation</P>
|
||||
<CENTER>
|
||||
<SCRIPT LANGUAGE="JavaScript" ID="2step104">
|
||||
<SCRIPT LANGUAGE = "JavaScript" ID="2step101">
|
||||
generatePopNumberList();
|
||||
</SCRIPT>
|
||||
</CENTER>
|
||||
|
||||
@@ -17,21 +17,19 @@
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
var globals = parent.parent.globals;
|
||||
var controls = parent.controls;
|
||||
|
||||
function go( msg )
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
|
||||
// * skip if we're in edit mode
|
||||
if ( globals.document.vars.editMode.value != "yes" )
|
||||
if ( parent.parent.globals.document.vars.editMode.value != "yes" )
|
||||
{
|
||||
if ( document.forms && document.forms[ 0 ] && document.forms[ 0 ].popList )
|
||||
globals.document.setupPlugin.CreateConfigIAS(
|
||||
globals.selectedISP, document.forms[ 0 ].popList.selectedIndex );
|
||||
parent.parent.globals.document.setupPlugin.CreateConfigIAS(
|
||||
parent.parent.globals.selectedISP, document.forms[ 0 ].popList.selectedIndex );
|
||||
else
|
||||
globals.document.setupPlugin.CreateConfigIAS( globals.selectedISP, -1 );
|
||||
parent.parent.globals.document.setupPlugin.CreateConfigIAS(
|
||||
parent.parent.globals.selectedISP, -1 );
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -46,37 +44,27 @@ function checkData()
|
||||
return true;
|
||||
}
|
||||
|
||||
function saveData()
|
||||
{
|
||||
}
|
||||
|
||||
function insertISPName()
|
||||
{
|
||||
document.write( globals.getSelectedISPName() );
|
||||
}
|
||||
|
||||
function loadData()
|
||||
{
|
||||
//parent.twostepfooter.document.writeln( "<BODY BACKGROUND='images/bg.gif' BGCOLOR='cccccc'>" );
|
||||
//parent.twostepfooter.document.writeln( "<P>If you have trouble setting up your account call " );
|
||||
//parent.twostepfooter.document.writeln( globals.getSelectedISPName() );
|
||||
//parent.twostepfooter.document.writeln( "at (support number).</P>" );
|
||||
//parent.twostepfooter.document.close();
|
||||
if ( parent.controls.generateControls )
|
||||
parent.controls.generateControls();
|
||||
}
|
||||
|
||||
if ( controls.generateControls )
|
||||
controls.generateControls();
|
||||
function saveData()
|
||||
{
|
||||
}
|
||||
|
||||
function generatePopNumberList()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
|
||||
var list = globals.document.setupPlugin.GetISPPopList( globals.selectedISP );
|
||||
var list = parent.parent.globals.document.setupPlugin.GetISPPopList(
|
||||
parent.parent.globals.selectedISP );
|
||||
|
||||
globals.debug( "generating pop list" );
|
||||
parent.parent.globals.debug( "generating pop list" );
|
||||
if ( list && list.length > 0 )
|
||||
{
|
||||
globals.debug( "emitting table" );
|
||||
parent.parent.globals.debug( "emitting table" );
|
||||
document.writeln( "<TABLE CELLPADDING=2 CELLSPACING=0 ID='minspace'><TR><TD ALIGN=LEFT VALIGN=TOP HEIGHT=25><spacer type=vertical size=2><B>Pick a phone number from the following list to connect to:</B></TD><TD ALIGN=LEFT VALIGN=TOP><FORM><SELECT NAME='popList'>");
|
||||
for ( var x = 0; x < list.length; x++ )
|
||||
{
|
||||
|
||||
@@ -49,6 +49,7 @@ Choose "Edit | Preferences | Advanced" and enable JavaScript, then reload this p
|
||||
<LAYER NAME="controls" WIDTH=620 HEIGHT=55 TOP=0 LEFT=0>
|
||||
|
||||
<LAYER NAME="help" LEFT=4 TOP=0 WIDTH=200 VISIBILITY=HIDE>
|
||||
|
||||
<LAYER LEFT=4 TOP=6>
|
||||
<A HREF="about:blank" onClick="document.images['help'].src='images/hlp_down.gif';var flag=go('Help');document.images['help'].src='images/hlp_up.gif';return false"
|
||||
onMouseOver="document.images['help'].src='images/hlp_mo.gif'"
|
||||
@@ -62,6 +63,7 @@ Choose "Edit | Preferences | Advanced" and enable JavaScript, then reload this p
|
||||
</LAYER>
|
||||
|
||||
<LAYER NAME="exit" LEFT=50 TOP=0 WIDTH=200 VISIBILITY=HIDE>
|
||||
|
||||
<LAYER LEFT=4 TOP=6>
|
||||
<A HREF="about:blank" onClick="document.images['exit'].src='images/ext_down.gif';var flag=go('Exit');document.images['exit'].src='images/ext_up.gif';return false"
|
||||
onMouseOver="document.images['exit'].src='images/ext_mo.gif'"
|
||||
@@ -148,20 +150,7 @@ Choose "Edit | Preferences | Advanced" and enable JavaScript, then reload this p
|
||||
</LAYER>
|
||||
|
||||
<LAYER LEFT=8 TOP=43>
|
||||
<B CLASS="clayer">CONNECT TO NETSCAPE</B>
|
||||
</LAYER>
|
||||
</LAYER>
|
||||
|
||||
<LAYER NAME="connectisp" LEFT=310 TOP=0 WIDTH=200 VISIBILITY=HIDE>
|
||||
<LAYER LEFT=4 TOP=6>
|
||||
<A HREF="about:blank" onClick="document.images['connectisp'].src='images/cn_down.gif';var flag=go('Next');document.images['connectisp'].src='images/cn_up.gif';return false"
|
||||
onMouseOver="document.images['connectisp'].src='images/cn_mo.gif'"
|
||||
onMouseOut="document.images['connectisp'].src='images/cn_up.gif'" ID="clayer114">
|
||||
<IMG NAME="connectisp" SRC="images/cn_up.gif" BORDER=0 HEIGHT=32 WIDTH=32></A>
|
||||
</LAYER>
|
||||
|
||||
<LAYER LEFT=8 TOP=43>
|
||||
<B CLASS="clayer">CONNECT TO ISP</B>
|
||||
<B CLASS="clayer">CONNECT TO SERVER</B>
|
||||
</LAYER>
|
||||
</LAYER>
|
||||
|
||||
|
||||
@@ -75,22 +75,22 @@ function checkEditMode()
|
||||
|
||||
|
||||
|
||||
pages = new Array();
|
||||
pages=new Array();
|
||||
|
||||
pages[ 0 ] = new Array();
|
||||
pages[ 0 ][ 0 ] = new page( "main.htm",null,null);
|
||||
pages[ 0 ][ 1 ] = new method( "ipreview/inpvw1.htm", "parent.content.go( 'Internet Preview' )", true );
|
||||
pages[ 0 ][ 2 ] = new method( "preview/duepvw1.htm", "parent.content.go( 'Preview' )", true );
|
||||
pages[ 0 ][ 3 ] = new method( "intro/intro1.htm", "parent.controls.checkShowIntroFlag( '' )", true );
|
||||
pages[0]=new Array();
|
||||
pages[0][0]=new page("main.htm",null,null);
|
||||
pages[0][1]=new method("ipreview/inpvw1.htm","parent.content.go('Internet Preview')",true);
|
||||
pages[0][2]=new method("preview/duepvw1.htm","parent.content.go('Preview')",true);
|
||||
pages[0][3]=new method("intro/intro1.htm","parent.controls.checkShowIntroFlag('')",true);
|
||||
//pages[0][4]=new condition("intro/intro1.htm","Mode Selection","Show_Intro_Screens","yes");
|
||||
//pages[0][5]=new condition("needs1.htm","Mode Selection","ForceNew","yes");
|
||||
//pages[0][6]=new condition("useAcct.htm","Mode Selection","ForceExisting","yes");
|
||||
//pages[0][7]=new action("accounts.htm");
|
||||
|
||||
pages[ 1 ] = new Array();
|
||||
pages[ 1 ][ 0 ] = new page( "accounts.htm", null, null);
|
||||
pages[ 1 ][ 1 ] = new method( "needs1.htm", "parent.content.go( 'New Path' )", true );
|
||||
pages[ 1 ][ 2 ] = new method( "useAcct.htm", "parent.content.go( 'Existing Path' )", true );
|
||||
pages[1]=new Array();
|
||||
pages[1][0]=new page("accounts.htm",null,null);
|
||||
pages[1][1]=new method("needs1.htm","parent.content.go('New Path')",true);
|
||||
pages[1][2]=new method("useAcct.htm","parent.content.go('Existing Path')",true);
|
||||
|
||||
// New Account Path
|
||||
|
||||
@@ -102,25 +102,25 @@ pages[ 2 ][ 2 ] = new method( "newAcct.htm", "parent.content.go('')", true );
|
||||
pages[ 3 ] = new Array();
|
||||
pages[ 3 ][ 0 ] = new page( "newAcct.htm", "New Acct Mode", "AskPersonalInfo" );
|
||||
pages[ 3 ][ 1 ] = new condition( "billing.htm", "New Acct Mode", "AskPersonalInfo", "no" );
|
||||
pages[ 3 ][ 2 ] = new method( "billing.htm", "parent.content.go( '' )", true );
|
||||
pages[ 3 ][ 2 ] = new method( "billing.htm", "parent.content.go('')", true );
|
||||
|
||||
pages[ 4 ] = new Array();
|
||||
pages[ 4 ][ 0 ] = new page( "billing.htm", "New Acct Mode", "AskBillingInfo" );
|
||||
pages[ 4 ][ 1 ] = new condition( "modem1.htm", "New Acct Mode", "AskBillingInfo", "no" );
|
||||
pages[ 4 ][ 2 ] = new method( "modem1.htm", "parent.content.go( '' )", true );
|
||||
pages[ 4 ][ 2 ] = new method( "modem1.htm", "parent.content.go('')", true );
|
||||
|
||||
pages[ 5 ] = new Array();
|
||||
pages[ 5 ][ 0 ] = new page( "modem1.htm", null, null );
|
||||
pages[ 5 ][ 1 ] = new method( "dialinf1.htm", "parent.content.go( '' )", true );
|
||||
pages[ 5 ][ 1 ] = new method( "dialinf1.htm", "parent.content.go('')", true );
|
||||
|
||||
pages[ 6 ] = new Array();
|
||||
pages[ 6 ][ 0 ] = new page( "dialinf1.htm", null, null );
|
||||
pages[ 6 ][ 1 ] = new method( "dialinf2.htm", "parent.content.go( '' )", true );
|
||||
pages[ 6 ][ 1 ] = new method( "dialinf2.htm", "parent.content.go('')", true );
|
||||
|
||||
pages[ 7 ] = new Array();
|
||||
pages[ 7 ][ 0 ] = new page( "dialinf2.htm", null, null );
|
||||
pages[ 7 ][ 1 ] = new method( "download.htm", "parent.content.go( 'New Path' )", true );
|
||||
pages[ 7 ][ 2 ] = new method( "connect2.htm", "parent.content.go( 'Existing Path' )", true );
|
||||
pages[ 7 ][ 1 ] = new method( "download.htm", "parent.content.go('New Path')", true );
|
||||
pages[ 7 ][ 2 ] = new method( "connect2.htm", "parent.content.go('Existing Path')", true );
|
||||
|
||||
pages[ 53 ] = new Array();
|
||||
pages[ 53 ][ 0 ] = new page( "download.htm", null, null );
|
||||
@@ -203,24 +203,20 @@ pages[19][2]=new method("error.htm","parent.content.go('error.htm')",true);
|
||||
|
||||
// Final Screens
|
||||
|
||||
pages[ 20 ] = new Array();
|
||||
pages[ 20 ][ 0 ] = new page( "ok.htm", null, null );
|
||||
pages[20]=new Array();
|
||||
pages[20][0]=new page("ok.htm",null,null);
|
||||
|
||||
pages[ 21 ] = new Array();
|
||||
pages[ 21 ][ 0 ] = new page( "okreboot.htm", null, null );
|
||||
pages[21]=new Array();
|
||||
pages[21][0]=new page("okreboot.htm",null,null);
|
||||
|
||||
pages[ 22 ] = new Array();
|
||||
pages[ 22 ][ 0 ] = new page( "error.htm", null, null );
|
||||
pages[ 22 ][ 1 ] = new method( "register.htm", "parent.content.go( 'New Path' )", true );
|
||||
pages[ 22 ][ 2 ] = new method( "connect2.htm", "parent.content.go( 'Existing Path' )", true );
|
||||
pages[22]=new Array();
|
||||
pages[22][0]=new page("error.htm",null,null);
|
||||
pages[22][1]=new method("register.htm","parent.content.go('New Path')",true);
|
||||
pages[22][2]=new method("connect2.htm","parent.content.go('Existing Path')",true);
|
||||
|
||||
pages[ 23 ] = new Array();
|
||||
pages[ 23 ][ 0 ] = new page( "later.htm", null, null );
|
||||
pages[ 23 ][ 1 ] = new method( "later.htm", "parent.content.go( 'Done' )", true );
|
||||
|
||||
pages[ 59 ] = new Array();
|
||||
pages[ 59 ][ 0 ] = new page( "error2.htm", null, null );
|
||||
pages[ 59 ][ 1 ] = new method( "1step.htm", "parent.content.go( '' )", true );
|
||||
pages[23]=new Array();
|
||||
pages[23][0]=new page("later.htm",null,null);
|
||||
pages[23][1]=new method("later.htm","parent.content.go('Done')",true);
|
||||
|
||||
// Settings
|
||||
|
||||
@@ -666,8 +662,7 @@ function go( msg )
|
||||
{
|
||||
pageName = pageHistory.substring( x + 1, pageHistory.length );
|
||||
globals.document.vars.pageHistory.value = pageHistory.substring( 0, x + 1 );
|
||||
if ( ( pageName == "register.htm" ) || ( pageName == "error.htm" ) ||
|
||||
( pageName == "error2.htm" ) )
|
||||
if ( ( pageName == "register.htm" ) || ( pageName == "error.htm" ) )
|
||||
historyCleanup = true;
|
||||
}
|
||||
else
|
||||
@@ -770,21 +765,19 @@ function go( msg )
|
||||
longMsgFlag = false;
|
||||
else if ( formName.indexOf( "aboutbox.htm" ) >= 0 )
|
||||
longMsgFlag = false;
|
||||
else if ( formName.indexOf( "error.htm" ) >= 0 )
|
||||
else if (formName.indexOf( "error.htm" ) >= 0 )
|
||||
longMsgFlag = false;
|
||||
else if ( formName.indexOf( "error2.htm" ) >= 0 )
|
||||
else if (formName.indexOf( "intro/" ) >= 0 )
|
||||
longMsgFlag = false;
|
||||
else if ( formName.indexOf( "intro/" ) >= 0 )
|
||||
else if (formName.indexOf( "ipreview/" ) >= 0 )
|
||||
longMsgFlag = false;
|
||||
else if ( formName.indexOf( "ipreview/" ) >= 0 )
|
||||
longMsgFlag = false;
|
||||
else if ( formName.indexOf( "preview/" ) >= 0 )
|
||||
else if (formName.indexOf( "preview/" ) >= 0 )
|
||||
longMsgFlag = false;
|
||||
|
||||
if ( longMsgFlag == true )
|
||||
{
|
||||
if ( globals.document.vars.editMode.value.toLowerCase() != "yes" )
|
||||
confirmFlag = confirm( "You haven't finished setting up your account. Are you sure you want to quit Account Setup?" );
|
||||
confirmFlag = confirm( "Your haven't finished setting up your account. Are you sure you want to quit Account Setup?" );
|
||||
else // this is for the account setup editor
|
||||
confirmFlag = confirm( "Are you sure you want to quit the Account Setup Editor?" );
|
||||
}
|
||||
|
||||
@@ -127,7 +127,6 @@ function generateControls()
|
||||
var showBack = true;
|
||||
var showNext = true;
|
||||
var showConnectServer = false;
|
||||
var showConnectISP = false;
|
||||
var showConnectNow = false;
|
||||
var showDownload = false;
|
||||
var showConnectLater = false;
|
||||
@@ -258,11 +257,10 @@ function generateControls()
|
||||
if ( editMode == true )
|
||||
showBack = true;
|
||||
}
|
||||
//else if ( formName == "2stpwrap.htm" )
|
||||
else if ( formName == "2step.htm" )
|
||||
{
|
||||
showNext = false;
|
||||
showConnectISP = true;
|
||||
showConnectServer = true;
|
||||
if ( editMode == true )
|
||||
showScreenOptions = true;
|
||||
}
|
||||
@@ -400,10 +398,7 @@ function generateControls()
|
||||
editMode = false;
|
||||
}
|
||||
|
||||
if ( document && document.layers && document.layers[ "controls" ] &&
|
||||
document.layers[ "controls" ].document &&
|
||||
document.layers[ "controls" ].document.layers &&
|
||||
document.layers[ "controls" ].document.layers.length > 0 )
|
||||
if ( document && document.layers && document.layers[ "controls" ] && document.layers[ "controls" ].document && document.layers[ "controls" ].document.layers && document.layers[ "controls" ].document.layers.length > 0 )
|
||||
{
|
||||
document.layers[ "controls" ].layers[ "help" ].visibility = ( ( showHelp == true ) ? "show" : "hide" );
|
||||
document.layers[ "controls" ].layers[ "exit" ].visibility = ( ( showExit == true ) ? "show" : "hide" );
|
||||
@@ -412,7 +407,6 @@ function generateControls()
|
||||
document.layers[ "controls" ].layers[ "connectnow" ].visibility = ( ( showConnectNow == true ) ? "show" : "hide" );
|
||||
document.layers[ "controls" ].layers[ "download" ].visibility = ( ( showDownload == true ) ? "show" : "hide" );
|
||||
document.layers[ "controls" ].layers[ "connectserver" ].visibility = ( ( showConnectServer == true ) ? "show" : "hide" );
|
||||
document.layers[ "controls" ].layers[ "connectisp" ].visibility = ( ( showConnectISP == true ) ? "show" : "hide" );
|
||||
document.layers[ "controls" ].layers[ "connectagain" ].visibility = ( ( showAgain == true ) ? "show" : "hide" );
|
||||
document.layers[ "controls" ].layers[ "done" ].visibility = ( ( showDone == true) ? "show" : "hide" );
|
||||
document.layers[ "controls" ].layers[ "restart" ].visibility = ( ( showRestart == true ) ? "show" : "hide" );
|
||||
|
||||
@@ -33,12 +33,11 @@
|
||||
</LAYER>
|
||||
|
||||
<P CLASS="title"><B>Compare Internet Service Providers</B></P>
|
||||
<P>Select an Internet Service Provider (ISP) to get more information and begin
|
||||
account creation.</P>
|
||||
<P CLASS="comparesmall">
|
||||
<B CLASS="compare">Provider Highlights:</B>
|
||||
<IMG SRC="metadata/images/feature1.gif" HEIGHT=16 WIDTH=16><B>Free Account Time!</B>
|
||||
<IMG SRC="metadata/images/feature2.gif" HEIGHT=16 WIDTH=16>Phone Bill Billing
|
||||
<BR>
|
||||
<P CLASS="compare"><B>Provider Highlights: </B></P>
|
||||
<P CLASS="comparesmall">
|
||||
<IMG SRC="metadata/images/feature1.gif" HEIGHT=16 WIDTH=16><B>Free Account Time! </B>
|
||||
<IMG SRC="metadata/images/feature2.gif" HEIGHT=16 WIDTH=16>Phone Bill Billing
|
||||
<IMG SRC="metadata/images/feature3.gif" HEIGHT=16 WIDTH=16>Web Page Hosting
|
||||
</P>
|
||||
</BODY>
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Account Setup</TITLE>
|
||||
<SCRIPT LANGUAGE="JavaScript" ARCHIVE="asw.jar" SRC="compwrap.js"></SCRIPT>
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="compwrap.js"></SCRIPT>
|
||||
</HEAD>
|
||||
|
||||
<FRAMESET rows="140,*" BORDER=0 FRAMEBORDER="no">
|
||||
<FRAMESET rows="120,*" BORDER=0 FRAMEBORDER="no">
|
||||
<FRAME NAME="compareheader" SRC="cmprehd.htm" NORESIZE SCROLLING="no">
|
||||
<FRAME NAME="compare" SRC="compare.htm" NORESIZE>
|
||||
</FRAMESET>
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
function go( msg )
|
||||
{
|
||||
parent.parent.globals.debug( "compwrap go" );
|
||||
parent.parent.globals.debug( compare.ispRadio );
|
||||
|
||||
if ( compare.ispRadio != null && compare.ispRadio != "" )
|
||||
{
|
||||
parent.parent.globals.debug( compare.ispRadio );
|
||||
parent.parent.globals.selectedISP = compare.ispRadio;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -36,9 +36,7 @@
|
||||
<!-- The layer below contains the headline and text of this screen -->
|
||||
<FORM>
|
||||
<P CLASS="title"><B>Phone Number of Your Location</B></P>
|
||||
<P>Please enter the phone number of the line that you are currently using--
|
||||
the line that is now connected to your computer or modem. Account Setup will use this
|
||||
information to set up your connection software to access the Internet.</P>
|
||||
<P>Please enter the phone number of the line that you are using to connect--the line that is now connected to your computer or modem. Account Setup uses this information to set up your connection software to access the Internet.</P>
|
||||
<SPACER TYPE=HORIZONTAL SIZE=72>
|
||||
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
|
||||
<TR>
|
||||
@@ -69,8 +67,8 @@ information to set up your connection software to access the Internet.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<P>Optional: If an ISP is not available in your area, Account Setup will check up to 3
|
||||
additional area codes to find an Internet service provider you can access.</P>
|
||||
<P>Please enter optional alternate area codes that you can call from your location to access and Internet service
|
||||
provider.</P>
|
||||
<SPACER TYPE=HORIZONTAL SIZE=72>
|
||||
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
|
||||
<TR>
|
||||
|
||||
@@ -51,24 +51,22 @@
|
||||
|
||||
|
||||
|
||||
<P CLASS="title"><B>Connect to Netscape</B></P>
|
||||
<P CLASS="title"><B>Download</B></P>
|
||||
|
||||
<P>Account Setup will now connect you to the Netscape's Internet account server,
|
||||
to download information about available Internet Service Providers (ISPs)
|
||||
and their account plans. (Note: It may take as long as two minutes
|
||||
for the information to be retrieved.)</P>
|
||||
<P>Account Setup will now connect you to the Internet account server, to download information about available account plans.
|
||||
It may take as long as two minutes for the information to be retrieved.</P>
|
||||
|
||||
<P>When evaluating account plans, think about these questions:</P>
|
||||
|
||||
<UL>
|
||||
<LI>How much time do you think you'll spend on the Internet each month?</LI>
|
||||
<LI>What are the monthly or hourly rates?</LI>
|
||||
<LI>What services are offered?</LI>
|
||||
<LI>What technical support is offered?</LI>
|
||||
</UL>
|
||||
|
||||
|
||||
|
||||
<P ID="nospace">Make sure your modem is properly connected and turned on, then click "Connect to Netscape" to begin.</P>
|
||||
<P ID="nospace">Make sure your modem is properly connected and turned on, then click Download to begin.</P>
|
||||
|
||||
<CENTER>
|
||||
<SCRIPT LANGUAGE = "JavaScript" ID="connect101">
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
function go( msg )
|
||||
{
|
||||
// parent.parent.globals.debug( "download go" );
|
||||
parent.parent.globals.debug( "download go" );
|
||||
|
||||
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
|
||||
|
||||
@@ -17,56 +17,62 @@
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
function go( msg )
|
||||
|
||||
|
||||
function go(msg)
|
||||
{
|
||||
if ( parent.parent.globals.document.vars.editMode.value != "yes" )
|
||||
{
|
||||
if ( msg == parent.parent.globals.document.vars.path.value )
|
||||
if (parent.parent.globals.document.vars.editMode.value != "yes")
|
||||
{
|
||||
if (msg == parent.parent.globals.document.vars.path.value) {
|
||||
parent.parent.globals.document.vars.tryAgain.value = "yes";
|
||||
return checkData();
|
||||
return(checkData());
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( msg == parent.parent.globals.document.vars.path.value )
|
||||
alert( "Sorry, you cannot connect while in using the Account Setup Editor." );
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
if (msg == parent.parent.globals.document.vars.path.value)
|
||||
alert("Sorry, you cannot connect while in using the Account Setup Editor.");
|
||||
return(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function checkData()
|
||||
{
|
||||
return true;
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function showErrorLayer()
|
||||
{
|
||||
if ( document.layers[ "IAS Mode" ] && document.layers[ "NCI Mode" ] )
|
||||
{
|
||||
if ( parent.parent.globals.document.vars.path.value == "Existing Path" )
|
||||
{
|
||||
document.layers[ "IAS Mode" ].visibility = "hide";
|
||||
document.layers[ "NCI Mode" ].visibility = "show";
|
||||
if (document.layers["IAS Mode"] && document.layers["NCI Mode"]) {
|
||||
if (parent.parent.globals.document.vars.path.value == "Existing Path") {
|
||||
document.layers["IAS Mode"].visibility = "hide";
|
||||
document.layers["NCI Mode"].visibility = "show";
|
||||
}
|
||||
else {
|
||||
document.layers["IAS Mode"].visibility = "show";
|
||||
document.layers["NCI Mode"].visibility = "hide";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
document.layers[ "IAS Mode" ].visibility = "show";
|
||||
document.layers[ "NCI Mode" ].visibility = "hide";
|
||||
else {
|
||||
setTimeout("showErrorLayer()",1000);
|
||||
}
|
||||
}
|
||||
else
|
||||
setTimeout( "showErrorLayer()", 1000 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
function loadData()
|
||||
{
|
||||
setTimeout( "showErrorLayer()", 1000 );
|
||||
if ( parent.controls.generateControls )
|
||||
parent.controls.generateControls();
|
||||
setTimeout("showErrorLayer()",1000);
|
||||
if (parent.controls.generateControls) parent.controls.generateControls();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function saveData()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
<!-- -*- Mode: HTML; tab-width: 8; 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.
|
||||
-->
|
||||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
|
||||
<HTML>
|
||||
|
||||
|
||||
|
||||
<HEAD>
|
||||
<TITLE>Account Setup</TITLE>
|
||||
|
||||
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="error2.js">
|
||||
</SCRIPT>
|
||||
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="sheet.js">
|
||||
</LINK>
|
||||
|
||||
</HEAD>
|
||||
|
||||
|
||||
|
||||
<BODY BACKGROUND="images/bg.gif" BGCOLOR="cccccc" onLoad="loadData()" ID="error2100">
|
||||
|
||||
|
||||
<!-- The layer below contains the Account Setup identifier. -->
|
||||
|
||||
<LAYER NAME = "tagtext" LEFT = 420 TOP = 0 VISIBILITY = SHOW>
|
||||
|
||||
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
|
||||
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="images/tag.gif">
|
||||
<B CLASS="previewtag">ACCOUNT SETUP</B>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
|
||||
|
||||
<!-- The layer below contains the headline of this screen -->
|
||||
|
||||
|
||||
<P CLASS="title"><B>Connection Error...</B></P>
|
||||
|
||||
|
||||
|
||||
<!-- The layer below contains the text displayed for errors encountered while the user
|
||||
is in IAS mode -->
|
||||
|
||||
<LAYER NAME="IAS Mode" VISIBILITY=HIDE>
|
||||
<SPACER TYPE=HORIZONTAL SIZE=72>
|
||||
<TABLE BORDER="0" CELLPADDING="6" CELLSPACING="0" WIDTH=470>
|
||||
<TR>
|
||||
<TD ALIGN=LEFT VALIGN=TOP BGCOLOR="FFFFFF">
|
||||
|
||||
<P ID="nomargins">Your connection to the Internet account server closed before you finished creating an account.</P>
|
||||
|
||||
<P ID="nomargins">If you exited the Internet account server before you were finished creating an account, you can reconnect to the server later by launching Account Setup from the Netscape Communicator folder.</P>
|
||||
|
||||
<P ID="nomargins">If Account Setup wasn't able to establish a connection with the Internet account server, make sure that your modem is installed properly, connected, and turned on. Also make sure that the telephone line you are using has an ordinary dial tone. When you're ready to try connecting again, click Connect Again.</P>
|
||||
|
||||
<P ID="nomargins">For more troubleshooting tips, click Help.</P>
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
|
||||
|
||||
|
||||
<!-- The layer below contains the text displayed for errors encountered while the user
|
||||
is in NCI mode -->
|
||||
|
||||
<LAYER NAME="NCI Mode" VISIBILITY=HIDE>
|
||||
<SPACER TYPE=HORIZONTAL SIZE=72>
|
||||
<TABLE BORDER="0" CELLPADDING="6" CELLSPACING="0" WIDTH=500>
|
||||
<TR>
|
||||
<TD ALIGN=LEFT VALIGN=TOP BGCOLOR="FFFFFF">
|
||||
|
||||
<P ID="nomargins">Account Setup wasn't able to establish a connection to your account. Make sure that your modem is installed properly, connected, and turned on. Also make sure that the telephone line you are using has an ordinary dial tone. When you're ready to try connecting again, click Connect Again.</P>
|
||||
|
||||
<P ID="nomargins">For more troubleshooting tips, click Help.</P>
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</LAYER>
|
||||
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -1,76 +0,0 @@
|
||||
/* -*- Mode: Java; tab-width: 4; 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.
|
||||
*/
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
function go( msg )
|
||||
{
|
||||
if ( parent.parent.globals.document.vars.editMode.value != "yes" )
|
||||
{
|
||||
if ( msg == parent.parent.globals.document.vars.path.value )
|
||||
{
|
||||
parent.parent.globals.document.vars.tryAgain.value = "yes";
|
||||
return checkData();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( msg == parent.parent.globals.document.vars.path.value )
|
||||
alert( "Sorry, you cannot connect while in using the Account Setup Editor." );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function checkData()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
function showErrorLayer()
|
||||
{
|
||||
if ( document.layers[ "IAS Mode" ] && document.layers[ "NCI Mode" ] )
|
||||
{
|
||||
if ( parent.parent.globals.document.vars.path.value == "Existing Path" )
|
||||
{
|
||||
document.layers[ "IAS Mode" ].visibility = "hide";
|
||||
document.layers[ "NCI Mode" ].visibility = "show";
|
||||
}
|
||||
else
|
||||
{
|
||||
document.layers[ "IAS Mode" ].visibility = "show";
|
||||
document.layers[ "NCI Mode" ].visibility = "hide";
|
||||
}
|
||||
}
|
||||
else
|
||||
setTimeout( "showErrorLayer()", 1000 );
|
||||
}
|
||||
|
||||
function loadData()
|
||||
{
|
||||
setTimeout( "showErrorLayer()", 1000 );
|
||||
if ( parent.controls.generateControls )
|
||||
parent.controls.generateControls();
|
||||
}
|
||||
|
||||
function saveData()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
@@ -32,7 +32,6 @@
|
||||
Debug Mode: <INPUT NAME="debugMode" TYPE="Text" VALUE="yes"><BR>
|
||||
Edit Mode: <INPUT NAME="editMode" TYPE="Text" VALUE="no"><BR>
|
||||
QA Mode: <INPUT NAME="qaMode" TYPE="Text" VALUE="no"><BR>
|
||||
1Step Mode: <INPUT NAME="oneStepMode" TYPE="Text" VALUE="no"><BR>
|
||||
International Mode: <INPUT NAME="intlMode" TYPE="Text"><BR>
|
||||
Startup File: <INPUT NAME="startupFile" TYPE="Text"><BR>
|
||||
Registration server: <INPUT NAME="regServer" TYPE="text"><BR>
|
||||
|
||||
@@ -164,14 +164,7 @@ function remove_message()
|
||||
window.status = "";
|
||||
}
|
||||
|
||||
function getSelectedISPName()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
|
||||
var ispDisplayName = document.setupPlugin.GetISPDisplayName( selectedISP );
|
||||
|
||||
return ispDisplayName;
|
||||
}
|
||||
|
||||
function checkPluginExists( name, generateOutputFlag )
|
||||
{
|
||||
@@ -366,34 +359,28 @@ function loadUserInput()
|
||||
document.vars.altAreaCode3.value = GetNameValuePair( userInputFile, theSection, "altAreaCode3" );
|
||||
|
||||
document.vars.cwData.value = GetNameValuePair(userInputFile,theSection,"cwData");
|
||||
if (document.vars.cwData.value != null && document.vars.cwData.value != "")
|
||||
{
|
||||
if (document.vars.cwData.value != null && document.vars.cwData.value != "") {
|
||||
// document.vars.prefix.cwOFF=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else {
|
||||
// document.vars.prefix.cwOFF=0;
|
||||
}
|
||||
}
|
||||
document.vars.prefixData.value = GetNameValuePair(userInputFile,theSection,"prefixData");
|
||||
if (document.vars.prefixData.value != null && document.vars.prefixData.value != "")
|
||||
{
|
||||
if (document.vars.prefixData.value != null && document.vars.prefixData.value != "") {
|
||||
// document.vars.prefix.checked=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else {
|
||||
// document.vars.prefix.checked=0;
|
||||
}
|
||||
}
|
||||
document.vars.dialMethod.value = GetNameValuePair(userInputFile,theSection,"dialMethod");
|
||||
|
||||
document.vars.providername.value = GetNameValuePair(userInputFile,theSection,"providername");
|
||||
if (intlMode=="yes")
|
||||
{
|
||||
if (intlMode=="yes") {
|
||||
document.vars.accountAreaCode.value="";
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else {
|
||||
document.vars.accountAreaCode.value = GetNameValuePair(userInputFile,theSection,"accountAreaCode");
|
||||
}
|
||||
}
|
||||
document.vars.accountPhoneNumber.value = GetNameValuePair(userInputFile,theSection,"accountPhoneNumber");
|
||||
|
||||
document.vars.accountName.value = GetNameValuePair(userInputFile,theSection,"accountName");
|
||||
@@ -488,13 +475,7 @@ function loadGlobalData()
|
||||
document.vars.path.value = "New Path";
|
||||
else if ( existingPathFlag == "yes" && newPathFlag != "yes" )
|
||||
document.vars.path.value = "Existing Path";
|
||||
|
||||
document.vars.oneStepMode.value = "";
|
||||
var oneStepModeFlag = parent.parent.globals.GetNameValuePair( acctSetupFile, "Mode Selection", "OneStepMode" );
|
||||
oneStepModeFlag = oneStepModeFlag.toLowerCase();
|
||||
if ( oneStepModeFlag == "yes" )
|
||||
document.vars.oneStepMode = "yes";
|
||||
|
||||
|
||||
if ( document.vars.debugMode.value.toLowerCase() != "yes" && ( document.vars.editMode.value.toLowerCase() != "yes" ) )
|
||||
if (checkPluginExists( "application/x-netscape-autoconfigure-dialer", false ) )
|
||||
document.setupPlugin.SetKiosk( true );
|
||||
@@ -562,30 +543,30 @@ function loadGlobalData()
|
||||
setRegisterMode( 1 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
function saveExternalEditor()
|
||||
{
|
||||
// Since we don't do a saveGlobalData in editMode, we need an alternate way to save the externalEditor
|
||||
// as a preference in ACCTSET.DAT. This is it.
|
||||
|
||||
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
|
||||
var userInputFile = document.setupPlugin.GetCurrentProfileDirectory();
|
||||
if ( userInputFile != null && userInputFile != "" )
|
||||
{
|
||||
if (userInputFile != null && userInputFile != "") {
|
||||
userInputFile = userInputFile + "ACCTSET.DAT";
|
||||
var theSection = "Account Setup User Input";
|
||||
SetNameValuePair( userInputFile, theSection, "externalEditor", document.vars.externalEditor.value );
|
||||
}
|
||||
var theSection="Account Setup User Input";
|
||||
SetNameValuePair(userInputFile,theSection,"externalEditor", document.vars.externalEditor.value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function saveGlobalData()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
|
||||
|
||||
if ( document.vars.editMode.value.toLowerCase() == "yes" )
|
||||
return;
|
||||
if (document.vars.editMode.value.toLowerCase() == "yes") return;
|
||||
|
||||
if ( document.setupPlugin == null )
|
||||
return;
|
||||
if (document.setupPlugin == null) return;
|
||||
/*
|
||||
if (document.vars.debugMode.value.toLowerCase() != "yes" && (document.vars.editMode.value.toLowerCase() != "yes")) {
|
||||
if (checkPluginExists("application/x-netscape-autoconfigure-dialer",false)) {
|
||||
@@ -600,25 +581,22 @@ function saveGlobalData()
|
||||
top.personalbar.visible=true; // was directory
|
||||
*/
|
||||
|
||||
if (document.vars.cookieWarning.value == "yes")
|
||||
{
|
||||
if (document.vars.cookieWarning.value == "yes") {
|
||||
navigator.preference("network.cookie.warnAboutCookies", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else {
|
||||
navigator.preference("network.cookie.warnAboutCookies", false);
|
||||
}
|
||||
}
|
||||
|
||||
if (document.vars.offlineMode.value != "undefined")
|
||||
{
|
||||
if (document.vars.offlineMode.value != "undefined") {
|
||||
navigator.preference("offline.startup_mode", document.vars.offlineMode.value);
|
||||
}
|
||||
|
||||
|
||||
// save user input (if any)
|
||||
|
||||
var userInputFile = document.setupPlugin.GetCurrentProfileDirectory();
|
||||
if (userInputFile != null && userInputFile != "")
|
||||
{
|
||||
if (userInputFile != null && userInputFile != "") {
|
||||
userInputFile = userInputFile + "ACCTSET.DAT";
|
||||
var theSection="Account Setup User Input";
|
||||
|
||||
@@ -664,9 +642,8 @@ function saveGlobalData()
|
||||
SetNameValuePair(userInputFile,theSection,"scriptEnabled", document.vars.scriptEnabled.value);
|
||||
SetNameValuePair(userInputFile,theSection,"scriptFile", document.vars.scriptFile.value);
|
||||
SetNameValuePair(userInputFile,theSection,"lckFilename", document.vars.lckFilename.value);
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else {
|
||||
SetNameValuePair(userInputFile,theSection,"cardnumber", "");
|
||||
SetNameValuePair(userInputFile,theSection,"path", "");
|
||||
SetNameValuePair(userInputFile,theSection,"pageHistory", "");
|
||||
@@ -677,7 +654,7 @@ function saveGlobalData()
|
||||
SetNameValuePair(userInputFile,theSection,"emailPasswordCheck", "");
|
||||
SetNameValuePair(userInputFile,theSection,"publishPassword", "");
|
||||
SetNameValuePair(userInputFile,theSection,"publishPasswordCheck", "");
|
||||
}
|
||||
}
|
||||
SetNameValuePair(userInputFile,theSection,"month", document.vars.month.value);
|
||||
SetNameValuePair(userInputFile,theSection,"year", document.vars.year.value);
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" HREF="hsheet.htm" TITLE="Account Setup">
|
||||
<TITLE>Account Setup Help</TITLE>
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" HREF="hsheet.htm" TITLE="Account Setup">
|
||||
</HEAD>
|
||||
|
||||
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" BACKGROUND="../images/bg.gif" LINK="#0000EE" VLINK="#551A8B" ALINK="#0000FF">
|
||||
@@ -111,26 +111,16 @@ Have</A></P>
|
||||
the Internet. When you first install Communicator, you can use Account Setup in one of these ways:</P>
|
||||
|
||||
<UL>
|
||||
<LI>If you're new to the Internet, you can use Account Setup to help you choose an Internet service provider, create an Internet account, and set up Communicator to access the account.</LI>
|
||||
|
||||
<LI>If you're new to the Internet, you can use Account Setup to help you create an Internet account and set up Communicator to access the account.</LI>
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
<LI>If you already have an Internet account, you can use Account Setup to help you quickly set up Communicator to access your account.</LI>
|
||||
</UL>
|
||||
|
||||
<P>Once you've set up Communicator to access your Internet account, you can use Account Setup in other ways:</P>
|
||||
<P>Once you've set up Communicator to access your Internet account, you can use Account Setup to create additional Internet accounts. To do this, first use the Communicator's Profile Manager to create a new user profile for the account.</P>
|
||||
|
||||
<UL>
|
||||
|
||||
<LI>You can use Account Setup to change your Internet service provider to another company.</LI>
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
<LI>You can use Account Setup to create additional Internet accounts with Internet service providers.</LI>
|
||||
|
||||
</UL>
|
||||
|
||||
<P>If you share your copy of Communicator with other users, or if you have more than one Internet account, read about using multiple user profiles in the "Introduction to Communicator" book.</P>
|
||||
<P>If you share your copy of Communicator with other users, or if you have more than one Internet account, read the document entitled "Working with Multiple User Profiles" in Communicator's Reference Library. The Reference Library is accessible from the Communicator folder or program group. The "Working with Multiple User Profiles" document provides full instructions on how to create multiple user profiles and associate them with specific Internet accounts.</P>
|
||||
|
||||
<P>To use Account Setup, follow through its screens and supply the information that Account
|
||||
Setup requests. Account Setup uses the information you provide to automatically configure Communicator to access your account. </P>
|
||||
@@ -168,21 +158,21 @@ Setup requests. Account Setup uses the information you provide to automatically
|
||||
|
||||
<P><B>Creating a New Internet Account</B></P>
|
||||
|
||||
<P>You can use Account Setup to quickly choose an Internet service provider and create a new Internet account. The process takes only a few minutes. All you need to do is follow through the Account Setup screens and enter the information that Account Setup asks you to provide. </P>
|
||||
|
||||
<P>After you've entered the information Account Setup needs, it uses your modem and phone line to temporarily connect you to Netscape's Internet Account Server, a special computer on the Internet. The Internet account server downloads information about a variety of leading Internet service providers and the account plans they offer. After Account Setup disconnects you from the Internet account server, you can then "shop" for an Internet account that meets your needs and create your new account so that you can use it right away.</P>
|
||||
<P>You can use Account Setup to quickly create a new Internet account. The process takes only a few minutes. All you need to do is follow through the Account Setup screens and enter the information that Account Setup asks you to provide. </P>
|
||||
|
||||
<P>When you are ready to choose an Internet Service Provider and create your new Internet account, Account Setup connects you to the service provider you choose so you can establish your new account. Once you've finished creating your account, you can connect to the Internet just by launching Communicator from the Netscape Communicator folder or program group.</P>
|
||||
<P>After you've entered the information Accoaunt Setup needs, it uses your modem and phone line to temporarily connect you to a computer on the Internet called the Internet account server. The Internet account server is specially designed to provide you with easy access to information about the account plans available to you. You can use the Internet account server to "shop" for an Internet account that meets your needs and then create your new account.</P>
|
||||
|
||||
<P>Before you begin using Account Setup, it's very important to make sure your modem is properly installed, connected to your computer and the phone jack, and turned on. Also, make sure that no other communications programs are using your modem when you use Account Setup.
|
||||
</P>
|
||||
<P>When you are finished using the Internet account server to create your new Internet account, Account Setup disconnects you from the server and configures your computer and Communicator to access the account. Once you've used Account Setup to create your account, you can connect to the Internet just by launching Communicator from the Netscape Communicator folder or program group.</P>
|
||||
|
||||
<P>Before you begin using Account Setup, it's very important to make sure your modem is properly installed, connected to your computer and the phone jack, and turned on. Also, make sure that no other communications programs are using your modem when you use Account Setup. The modem must be available to Account Setup.</P>
|
||||
|
||||
<P>To use Account Setup to create a new Internet account, follow these steps:</P>
|
||||
|
||||
<OL>
|
||||
<LI>If Account Setup isn't open already, launch it by double-clicking its icon in
|
||||
the Netscape Communicator folder or program group. If you just finished installing
|
||||
Communicator, Account Setup should already be open on your screen. In the Welcome
|
||||
Communicator, Account Setup should already be open on your screen. In the welcome
|
||||
screen, click the Start Account Setup button.</LI>
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
@@ -206,18 +196,20 @@ Setup requests. Account Setup uses the information you provide to automatically
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
<LI>When you reach the Download Now screen of Account Setup, click the Download Now button. This connects you to
|
||||
Netscape's Internet Account Server, downloads information about a variety
|
||||
of Internet service providers and the account plans they offer, and then disconnects you. </LI>
|
||||
<LI>When you reach the last screen of Account Setup, click the Connect Now button
|
||||
connect to the Internet account server, where you can learn about the
|
||||
account plans available and create an account.</LI>
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
<LI>Compare the account plans offered by different service providers. When you're ready to choose an ISP and create an account, click the Connect Now button. This connects you to the chosen service provider so you can establish your new account.</LI>
|
||||
<LI>After Account Setup connects, it loads the Internet Account Server screens in
|
||||
the Account Setup window. Follow the instructions in the Internet Account Server
|
||||
screens to create an account.</LI>
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
<LI>When your account has been successfully created, Account Setup disconnects you from
|
||||
the ISP and displays a "Congratulations!" screen. In this
|
||||
the Internet account server and displays a "Congratulations!" screen. In this
|
||||
screen, click the Save Account Information button if you want to save a record of your
|
||||
account information to a text file on your computer. This includes such information as
|
||||
your login, password, dial-up access number, provider domain name and DNS server
|
||||
@@ -286,7 +278,7 @@ all of following information:</P>
|
||||
</UL>
|
||||
|
||||
<P>Also, before you can create an Internet account, your modem must be installed
|
||||
properly, connected to your computer and phone line, and turned on. If you haven't installed your modem yet, click
|
||||
properly, connected, and turned on. If you haven't installed your modem yet, click
|
||||
Exit to leave Account Setup.</P>
|
||||
|
||||
<P>After you've installed your modem, connected it to your computer and phone line,
|
||||
@@ -324,7 +316,7 @@ icon in the Netscape Communicator folder or program group.</P>
|
||||
|
||||
<P><B>Arranging for Payment to Your Internet Service Provider</B></P>
|
||||
|
||||
<P>Internet accounts that you create using Account Setup are paid for by credit card. When Account Setup connects you to Netscape's Internet Account Server, you can arrange for payment by providing your credit card number. Then, when your account is created, your provider automatically bills you each month for your account.This mechanism enables you to create an Internet account and use it right away.</P>
|
||||
<P>Internet accounts that you create using Account Setup are paid for by credit card. When Account Setup connects you to your provider's Internet account server, you can arrange for payment by providing your credit card number. Then, when your account is created, your provider automatically bills you each month for your account.This mechanism enables you to create an Internet account and use it right away.</P>
|
||||
|
||||
<P>To ensure your privacy, Account Setup scrambles your credit card number before
|
||||
transmitting it to your provider. Your provider has a unique security key that allows
|
||||
@@ -366,7 +358,7 @@ Setup, you must install your modem according to the manufacturer's instructions,
|
||||
connect it properly to your computer and the phone jack, and turn its power switch
|
||||
on.</P>
|
||||
|
||||
<P>Then, when you are using Account Setup, you must specify your modem's manufacturer (for example Hayes, US Robotics, Global Village, and so on) and model (for example, Sportster 28.8). This information lets Account Setup configure your connection software properly.</P>
|
||||
<P>Then, when you are using Account Setup, you must specify your modem's manufacturer (for example Hayes, US Robotics, Global Village, and so on) and model (for example, Sportster 28.8, Teleport Gold, Powerport Gold, and so on). This information lets Account Setup configure your connection software properly."</P>
|
||||
|
||||
<P>To specify your modem in Account Setup, follow these steps:</P>
|
||||
|
||||
@@ -386,9 +378,10 @@ on.</P>
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
<LI>Click the Modem Setup button, below the pop-up menu. This opens the Modem Wizard, a tool that will help you specify your modem. Instructions for using the Modem Wizard are provided within that program.</LI>
|
||||
<LI>Click the Modem Setup button, below the pop-up menu. On Windows systems, this opens the Modem Wizard, a tool that will help you specify your modem. Instructions for using the Modem Wizard are provided within that program. On Macintosh systems, clicking Modem Setup opens the Modem Setup tool. Instructions for using Modem Setup are provided in the next Help topic.</LI>
|
||||
</OL>
|
||||
|
||||
<P>On Macintosh systems, an item called "Generic" appears in the pop-up modem menu. You should select this item only if you are unable to specify your modem using Modem Setup. The "Generic" setting enables you to connect to your Internet account, but possibly not at optimal speed. </P>
|
||||
|
||||
<TABLE BORDER="0">
|
||||
<TR>
|
||||
@@ -419,12 +412,13 @@ on.</P>
|
||||
|
||||
<P><B>Connecting to the Internet Account Server</B></P>
|
||||
|
||||
<P>When you reach the Download Now screen in Account Setup, click the Download Now button to temporarily connect to Netscape's Internet Account Server and download information about a variety of leading Internet service providers and the account plans they offer.</P>
|
||||
<P>When you reach the last screen of Account Setup, click the Connect Now button to
|
||||
connect to the Internet account server, where you can learn about the account plans available and then create an account.</P>
|
||||
|
||||
<P>When you click Download Now, Account Setup uses your modem, phone line, and connection software to establish a temporary connection with Netscape's Internet Account Server.
|
||||
For this reason, your modem must be installed, connected properly, and turned on before you connect. When the connection is established, Account Setup begins downloading the account plan information. This may take a few minutes. Account Setup then disconnects you from the Internet Account Server so you can compare account plans and choose the one that best meets your needs.</P>
|
||||
<P>When you click Connect Now, Account Setup uses your modem, phone line, and connection software to establish a temporary connection with the Internet account server.
|
||||
For this reason, your modem must be installed, connected properly, and turned on before you connect. When the connection is established, Account Setup displays the the Internet account server screens in the Account Setup window. </P>
|
||||
|
||||
<P>Follow the instructions in Account Setup to choose a service provider and create an account. Once you create your new account, you can begin using it right away.</P>
|
||||
<P>Follow the instructions on the Internet account server screens to create an account.</P>
|
||||
|
||||
|
||||
<TABLE BORDER="0">
|
||||
@@ -458,7 +452,7 @@ For this reason, your modem must be installed, connected properly, and turned on
|
||||
<P><B>Saving Your Account Information</B></P>
|
||||
|
||||
|
||||
<P>When you have successfully created a new
|
||||
<P>When are done using the Internet account server and have successfully created a new
|
||||
Internet account, Account Setup presents its final screen. This screen asks you whether
|
||||
you want to save a record of your account information--your login name, password,
|
||||
server addresses, and so on--to a text file. </P>
|
||||
@@ -481,7 +475,7 @@ You Already Have</B></P>
|
||||
|
||||
<P>If you already have an Internet account, you can use Account Setup to quickly
|
||||
set up Communicator and its connection software to access the account. All you need
|
||||
to do is go through the Account Setup screens and enter information that Account
|
||||
to do is follow through the Account Setup screens and enter information that Account
|
||||
Setup asks you to provide.</P>
|
||||
|
||||
<P>Before you begin, it's very important to make sure your modem is properly installed,
|
||||
@@ -538,7 +532,9 @@ modem must be available to Account Setup.</P>
|
||||
<LI>You can click Exit, which tells Account Setup to close without configuring your
|
||||
computer.</LI>
|
||||
</UL>
|
||||
<P>Once you've finished using Account Setup to configure your computer, you can connect to your account by launching Communicator from the Netscape Communicator folder or program group.</P>
|
||||
|
||||
<P>Once you've finished using Account Setup to configure your computer, you can access your account by launching Communicator from the Netscape Communicator folder or program group.</P>
|
||||
|
||||
</OL>
|
||||
|
||||
|
||||
@@ -626,7 +622,7 @@ some or all of the following information, depending on your provider:</P>
|
||||
or all of the above information. Account Setup asks only for the information not
|
||||
supplied by your provider.</P>
|
||||
|
||||
<P>You can probably find all the information that you need to provide in the forms given to you by your provider when you established your account. If you don't have the information you need, call your provider's technical support office.</P>
|
||||
<P>You can probably find all the information that you need to provide in the forms given to you by your provider when you started your account. If you don't have the information you need, call your provider's technical support office.</P>
|
||||
|
||||
<P>If you aren't sure about what to enter into an Account Setup screen, click the
|
||||
Help button.</P>
|
||||
@@ -677,7 +673,7 @@ Setup, you must install your modem according to the manufacturer's instructions,
|
||||
connect it properly to your computer and the phone jack, and turn its power switch
|
||||
on.</P>
|
||||
|
||||
<P>Then, when you are using Account Setup, you must specify your modem's manufacturer (for example Hayes, US Robotics, Global Village, and so on) and model (for example, Sportster 28.8). This information lets Account Setup configure your connection software properly.</P>
|
||||
<P>Then, when you are using Account Setup, you must specify your modem's manufacturer (for example Hayes, US Robotics, Global Village, and so on) and model (for example, Sportster 28.8, Teleport Gold, Powerport Gold, and so on). This information lets Account Setup configure your connection software properly."</P>
|
||||
|
||||
<P>To specify your modem in Account Setup, follow these steps:</P>
|
||||
|
||||
@@ -693,13 +689,14 @@ on.</P>
|
||||
<P>If your modem is not listed in the pop-up menu, follow these steps:</P>
|
||||
|
||||
<OL>
|
||||
<LI>Make sure that your modem is properly installed, connected, and turned on.</LI>
|
||||
<LI>Make sure that your modem is properly installed, connected, and turned on.
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
<LI>Click the Modem Setup button, below the pop-up menu. This opens the Modem Wizard, a tool that will help you specify your modem. Instructions for using the Modem Wizard are provided within that program.</LI>
|
||||
<LI>Click the Modem Setup button, below the pop-up menu. On Windows systems, this opens the Modem Wizard, a tool that will help you specify your modem. Instructions for using the Modem Wizard are provided within that program. On Macintosh systems, clicking Modem Setup opens the Modem Setup tool. Instructions for using Modem Setup are provided in the next Help topic.</LI>
|
||||
</OL>
|
||||
|
||||
<P>On Macintosh systems, an item called "Generic" appears in the pop-up modem menu. You should select this item only if you are unable to specify your modem using Modem Setup. The "Generic" setting enables you to connect to your Internet account, but possibly not at optimal speed. </P>
|
||||
|
||||
<TABLE BORDER="0">
|
||||
<TR>
|
||||
@@ -732,11 +729,9 @@ on.</P>
|
||||
|
||||
|
||||
<P>When you reach the last screen of Account Setup, click the Connect Now button to
|
||||
complete the setup process and connect to Netscape's Setup Site, where you can
|
||||
register your new software and learn about a variety of new products and plug-ins
|
||||
that are designed for use with Communicator.</P>
|
||||
complete the setup process and connect to your account.</P>
|
||||
|
||||
<P>When you click Connect Now, Account Setup configures your computer with the information you entered into the Account Setup screens, then opens your connection software and dials
|
||||
<P>When you click Connect Now, Account Setup opens your connection software and dials
|
||||
your modem to establish a connection. For this reason, your modem must be installed,
|
||||
connected properly, and turned on.</P>
|
||||
|
||||
@@ -755,7 +750,7 @@ connected properly, and turned on.</P>
|
||||
below for help isolating and resolving the problem.</P>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="#troubleshooting1">I'm having trouble connecting to the Internet Account Server</A></LI>
|
||||
<LI><A HREF="#troubleshooting1">I'm having trouble connecting to the Internet</A></LI>
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
@@ -772,7 +767,7 @@ below for help isolating and resolving the problem.</P>
|
||||
|
||||
<HR NOSHADE>
|
||||
|
||||
<P><B>I'm having trouble connecting to the Internet Account Server</B></P>
|
||||
<P><B>I'm having trouble connecting to the Internet</B></P>
|
||||
|
||||
<P>These tips can help you resolve minor problems:</P>
|
||||
|
||||
@@ -817,11 +812,11 @@ below for help isolating and resolving the problem.</P>
|
||||
|
||||
<UL>
|
||||
<LI>Verify that the power switch of your modem is on. You might even turn the modem off and then on again, just to make sure. </LI>
|
||||
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
<LI>Go to the "Your Modem" screen in Account Setup. Verify that the correct modem type is selected in the pop-up menu. If necessary, look in your modem's documentation to confirm its manufacturer and model name. If your modem is not listed properly in the pop-up menu, click the Modem Detect button to launch Modem Setup, where you can specify your modem manually. </LI>
|
||||
|
||||
Go to the "Your Modem" screen in Account Setup. Verify that the correct modem type is selected in the pop-up menu. If necessary, look in your modem's documentation to confirm its manufacturer and model name. If your modem is not listed properly in the pop-up menu, click the Modem Detect button to launch Modem Setup, where you can specify your modem manually. </LI>
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
<LI>Make sure that your modem is connected properly. Look in your modem's documentation for details. In general, for <B>external modems</B>, one cable goes from the modem to the telephone wall jack, another cable goes from the modem to the telephone itself, and a third cable goes from the modem to the back of your computer, usually into the modem port (the modem port is sometimes marked by a telephone icon). On some modems, a power cord reaches from the modem to the wall power socket. Make sure all cables and the power cord are plugged in firmly. </LI>
|
||||
@@ -832,7 +827,7 @@ below for help isolating and resolving the problem.</P>
|
||||
|
||||
<spacer type=vertical size=4>
|
||||
|
||||
<LI>If you have checked the other items in this list but are still having modem problems, try selecting the "Generic" item in the Modem Wizard, then use Account Setup again. If this does not help, there might be a problem with your modem itself (the modem isn't operating properly) or with your computer or phone line. Potential problems with phone lines are discussed in the next Help topic.</LI>
|
||||
<LI>If you have checked the other items in this list but are still having modem problems, try selecting the "Generic" item in the Modem Wizard (Windows) or Modem Setup (Macintosh), then use Account Setup again. If this does not help, there might be a problem with your modem itself (the modem isn't operating properly) or with your computer or phone line. Potential problems with phone lines are discussed in the next Help topic.</LI>
|
||||
</UL>
|
||||
|
||||
<TABLE BORDER="0">
|
||||
@@ -1256,7 +1251,7 @@ used as the first part of your email address as well (for example, loginname@pro
|
||||
<P>Computers on the Internet each have a unique (one-of-a-kind) address. An address
|
||||
consists of numbers separated by periods (for example, 123.233.234.244). Because
|
||||
addresses are unique, computers on the Internet can exchange information successfully,
|
||||
even if on opposite sides of the Earth.
|
||||
even if on opposite sides of the Earth. </P>
|
||||
|
||||
<P><A HREF="#glossary"><FONT SIZE="2">[GLOSSARY]</FONT></A><BR>
|
||||
<A HREF="#contents"><FONT SIZE="2">[CONTENTS]</FONT></A></P>
|
||||
@@ -1269,8 +1264,8 @@ even if on opposite sides of the Earth.
|
||||
|
||||
<P><B>Account Access Number</B></P>
|
||||
|
||||
<P>Your account access number is an ordinary phone number that your computer dials to connect
|
||||
to your Internet service provider's computer. </P>
|
||||
<P>Your account access number is the telephone number that your computer dials to connect
|
||||
to your account. </P>
|
||||
|
||||
<P><A HREF="#glossary"><FONT SIZE="2">[GLOSSARY]</FONT></A><BR>
|
||||
<A HREF="#contents"><FONT SIZE="2">[CONTENTS]</FONT></A></P>
|
||||
@@ -1299,11 +1294,13 @@ also be used to mean the computer hardware that houses the server software. </P>
|
||||
|
||||
<P><B>Internet Account Server</B></P>
|
||||
|
||||
<P>Netscape's Internet Account Server downloads information about Internet account plans offered by a variety of leading Internet service providers so you can choose the plan that suits you best.</P>
|
||||
<P>Your provider's Internet account server gives you a convenient way to get started on the Internet. It lets you read about the Internet account plans available and choose the plan that suits you best. Once you've selected an account plan, the Internet Account Server enables you to create an account with the Internet service provider that you chose.</P>
|
||||
|
||||
<P>The process of connecting to the Internet Account Server to download account plan information takes only a short time. Once you choose a service provider and establish an account with them, you can begin using your account right away.</P>
|
||||
<P>The process of using the Internet Account Server to create a new Internet account takes only a short time and, with most providers, you can begin using your account right away.</P>
|
||||
|
||||
<P>To create a new account, run Account Setup and move to the "Welcome to Account Setup" screen. Click the "I want to create a new Internet account" option. Follow through the Account Setup screens, supplying information where necessary. Then, in the "Download Now" screen, click Download Now to connect to the Internet Account Server. After the server finishes downloading account plan information, it disconnects you so that you can compare account plans and choose a service provider. When you're ready to create an account, click the "Connect Now" button and follow the instructions that appear.</P>
|
||||
<P>To use the Internet account server, run Account Setup and move to the "Welcome to Account Setup" screen. Click the "I want to create a new Internet account" option. Follow through the Account Setup screens, supplying information where necessary. Then, in the "Connect to Server" screen, click Connect Now to connect to the Internet account server. </P>
|
||||
|
||||
<P>To create an account, follow the instructions on the Internet account server screens. </P>
|
||||
|
||||
<P><A HREF="#glossary">[GLOSSARY]</A><BR>
|
||||
<A HREF="#contents">[CONTENTS]</A></P>
|
||||
@@ -1319,8 +1316,7 @@ also be used to mean the computer hardware that houses the server software. </P>
|
||||
|
||||
<P>Communicator also allows you to associate each profile with a specific Internet account and dialing location, so that users who have more than one Internet account or who connect to their account from several locations can conveniently switch to the proper account or location when Communicator starts up.</P>
|
||||
|
||||
<P>For more information on Communicator user profiles, see the "
|
||||
Introduction to Communicator" book.
|
||||
<P>For more information on Communicator user profiles, read the user profiles document in the Reference Library, accessible from the Netscape Communicator folder or program group.
|
||||
|
||||
|
||||
<P><A HREF="#glossary">[GLOSSARY]</A><BR>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
|
||||
<!-- -*- Mode: HTML; tab-width: 8; 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
|
||||
@@ -14,7 +14,7 @@
|
||||
Communications Corporation. Portions created by Netscape are
|
||||
Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
Reserved.
|
||||
*/
|
||||
-->
|
||||
//TAGS FOR ACCOUNT SETUP HELP
|
||||
|
||||
tags.BODY.fontFamily="PrimaSans BT, Helvetica,Arial";
|
||||
|
||||
|
Before Width: | Height: | Size: 306 B |
|
Before Width: | Height: | Size: 258 B |
|
Before Width: | Height: | Size: 345 B |
@@ -87,7 +87,13 @@ and Communicator detects exactly one configured user profile. -->
|
||||
|
||||
<LAYER NAME = "Profile_Configured" TOP="0" LEFT="0" VISIBILITY = HIDE>
|
||||
|
||||
<P CLASS="body">You are about to use Account Setup to replace the Internet account you selected with a new account. To continue, click Start Account Setup.</P>
|
||||
<P CLASS="body">You are about to use Account Setup to replace your Internet account with another account. While you can safely use Account Setup in this way, we recommend that you create a new user profile first, then use Account Setup. </P>
|
||||
|
||||
<P CLASS="bodysecondparagraph">
|
||||
<SPACER TYPE= HORIZONTAL SIZE=47>To continue, click Start Account Setup. To create a
|
||||
<BR><SPACER TYPE= HORIZONTAL SIZE=70>new profile, launch the User Profile Manager
|
||||
<BR><SPACER TYPE= HORIZONTAL SIZE=79>from the Netscape Communicator folder
|
||||
<BR><SPACER TYPE= HORIZONTAL SIZE=86>or program group.</P>
|
||||
|
||||
</LAYER>
|
||||
|
||||
@@ -97,10 +103,7 @@ and Communicator detects no existing Communicator user preferences or user profi
|
||||
|
||||
<LAYER NAME = "Profile_Manager_Entrance" TOP="0" LEFT="0" VISIBILITY = HIDE>
|
||||
|
||||
<P CLASS="body">Netscape Communicator is your one solution for getting all that the Internet has to offer. Once you've set up Communicator to access the Internet, you can use it to browse the World Wide Web, send and receive electronic mail, publish your own web pages, and more.</P>
|
||||
|
||||
<P CLASS="bodysecondparagraph">
|
||||
<SPACER TYPE= HORIZONTAL SIZE=55>To set up Communicator, click Start Account Setup.</P>
|
||||
<P CLASS="body">You are about to use Account Setup to create access to an Internet account and associate the account with your new user profile. To begin, click Start Account Setup.</P>
|
||||
|
||||
</LAYER>
|
||||
|
||||
|
||||
@@ -18,17 +18,9 @@
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
var ispRadio = null;
|
||||
//var out = java.lang.System.out;
|
||||
var out = java.lang.System.out;
|
||||
|
||||
//window.captureEvents( Event.MOUSEUP| Event.MOUSEDOWN| Event.MOUSEDRAG );
|
||||
function loadData()
|
||||
{
|
||||
radioValue = document.layers[ "allisp" ].layers[ "level1isp" ].
|
||||
layers[ "levelDisplay" ].layers[ 0 ].
|
||||
layers[ "moreInfoButton" ].document.
|
||||
forms[ 0 ].elements[ 0 ].value;
|
||||
radioClick( radioValue );
|
||||
}
|
||||
|
||||
function tabIndex( tab )
|
||||
{
|
||||
@@ -74,7 +66,7 @@ function syncTabs()
|
||||
|
||||
function toggleTab( tab )
|
||||
{
|
||||
// out.println( "toggleTab" );
|
||||
out.println( "toggleTab" );
|
||||
allisp = document.layers[ "allisp" ];
|
||||
|
||||
for ( i = tabIndex( tab ); i < allisp.layers.length; i++ )
|
||||
@@ -85,14 +77,14 @@ function toggleTab( tab )
|
||||
showLayer = controls.layers[ "show" ];
|
||||
hideLayer = controls.layers[ "hide" ];
|
||||
|
||||
// out.println( "pageY: " + levelLayer.pageY );
|
||||
out.println( "pageY: " + levelLayer.pageY );
|
||||
|
||||
if ( tab == levelLayer )
|
||||
{
|
||||
// toggleState == false is closed
|
||||
if ( levelLayer.toggleState == false )
|
||||
{
|
||||
// out.println( "OPENING" );
|
||||
out.println( "OPENING" );
|
||||
// open "tab"
|
||||
showLayer.visibility = "hide";
|
||||
hideLayer.visibility = "show";
|
||||
@@ -103,7 +95,7 @@ function toggleTab( tab )
|
||||
}
|
||||
else
|
||||
{
|
||||
// out.println( "CLOSING" );
|
||||
out.println( "CLOSING" );
|
||||
// close "tab"
|
||||
hideLayer.visibility = "hide";
|
||||
showLayer.visibility = "show";
|
||||
@@ -141,8 +133,6 @@ function toggle( tabName )
|
||||
|
||||
function radioClick( radioValue )
|
||||
{
|
||||
// out.println( "radioClick: " + radioValue );
|
||||
|
||||
if ( radioValue != ispRadio )
|
||||
{
|
||||
allisp = document.layers[ "allisp" ];
|
||||
@@ -157,7 +147,7 @@ function radioClick( radioValue )
|
||||
form = buttonlayer.document.forms[ 0 ];
|
||||
radio = form.elements[ 0 ];
|
||||
if ( radio.value == radioValue )
|
||||
radio.checked=true;
|
||||
radio.check == "1";
|
||||
else
|
||||
form.reset();
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="sheet.js"></LINK>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="FFFFFF" ONLOAD="loadData()">
|
||||
<BODY BGCOLOR="FFFFFF">
|
||||
|
||||
<!-- The layer below contains the headline and text of this screen -->
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
<ILAYER LEFT=0 NAME="level1isp">
|
||||
<LAYER NAME="control" HEIGHT=20>
|
||||
<LAYER LEFT=200 NAME="hide"><P CLASS="compare"></P></LAYER>
|
||||
<LAYER LEFT=200 NAME="hide"><P CLASS="compare">Level 1</P></LAYER>
|
||||
<LAYER LEFT=200 NAME="show"></LAYER>
|
||||
</LAYER>
|
||||
<LAYER TOP=20 NAME="levelDisplay">
|
||||
@@ -40,26 +40,10 @@
|
||||
|
||||
<ILAYER LEFT=0 NAME="level2isp">
|
||||
<LAYER NAME="control" HEIGHT=20>
|
||||
|
||||
<LAYER LEFT=200 NAME="hide">
|
||||
<A HREF="about:blank"
|
||||
onClick="document.images['hide'].src='metadata/images/preshide.gif'; toggle( 'level2isp' ); document.images['hide'].src='metadata/images/nomohide.gif'; return false;"
|
||||
onMouseOver="document.images['hide'].src='metadata/images/mohide.gif'"
|
||||
onMouseOut="document.images['hide'].src='metadata/images/nomohide.gif'">
|
||||
<IMG NAME="hide" SRC="metadata/images/nomohide.gif" BORDER=0 HEIGHT=19 WIDTH=187>
|
||||
</A>
|
||||
<LAYER LEFT=200 NAME="hide"><A HREF="about:blank" onClick="toggle( 'level2isp' ); return false;"><P CLASS="compare">Hide Level 2</P></A></LAYER>
|
||||
<LAYER LEFT=200 NAME="show"><A HREF="about:blank" onClick="toggle( 'level2isp' ); return false;"><P CLASS="compare">Show Level 2</P></A></LAYER>
|
||||
</LAYER>
|
||||
<LAYER LEFT=200 NAME="show">
|
||||
<A HREF="about:blank"
|
||||
onClick="document.images['show'].src='metadata/images/presshow.gif'; toggle( 'level2isp' ); document.images['show'].src='metadata/images/nomoshow.gif'; return false;"
|
||||
onMouseOver="document.images['show'].src='metadata/images/moshow.gif'"
|
||||
onMouseOut="document.images['show'].src='metadata/images/nomoshow.gif'">
|
||||
<IMG NAME="show" SRC="metadata/images/nomoshow.gif" BORDER=0 HEIGHT=19 WIDTH=187>
|
||||
</A>
|
||||
</LAYER>
|
||||
|
||||
</LAYER>
|
||||
|
||||
|
||||
<LAYER TOP=20 NAME="levelDisplay">
|
||||
###level2###
|
||||
</LAYER>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -23,17 +23,18 @@ function loadData()
|
||||
"/client_data/html/sales.html";
|
||||
|
||||
parent.moreinfo.location.replace( fileToLoad );
|
||||
|
||||
if ( parent.parent.controls.generateControls )
|
||||
parent.parent.controls.generateControls();
|
||||
}
|
||||
|
||||
function generateHeader()
|
||||
{
|
||||
// parent.parent.parent.globals.debug( "ispDisplayName" + ispDisplayName );
|
||||
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
|
||||
|
||||
document.writeln( "More Information about " +
|
||||
parent.parent.parent.globals.getSelectedISPName() );
|
||||
var ispDisplayName = parent.parent.parent.globals.document.setupPlugin.GetISPDisplayName(
|
||||
parent.parent.parent.globals.selectedISP );
|
||||
|
||||
parent.parent.parent.globals.debug( "ispDisplayName" + ispDisplayName );
|
||||
|
||||
document.writeln( "More Information about " + ispDisplayName );
|
||||
}
|
||||
|
||||
// end hiding contents from old browers -->
|
||||
|
||||
@@ -27,8 +27,8 @@ import java.lang.*;
|
||||
|
||||
public class CPGeneratorProgress extends ProgressApplet
|
||||
{
|
||||
final static String DOWNLOAD_STRING = "Downloading...";
|
||||
final static String UNJAR_STRING = "Uncompressing...";
|
||||
final static String DOWNLOAD_STRING = "Downloading:";
|
||||
final static String UNJAR_STRING = "Uncompressing:";
|
||||
final static String DONE_STRING = "Done...";
|
||||
final static String CONTACTING_SERVER = "Contacting registration server...";
|
||||
final static String SENDING = "Sending registration information...";
|
||||
@@ -37,8 +37,14 @@ public class CPGeneratorProgress extends ProgressApplet
|
||||
final static String ABORT = "There were problems with the server connection...";
|
||||
final static String DIALING_STRING = "Calling registration server...";
|
||||
|
||||
final static double PEG_DOWNLOAD = 0.90;
|
||||
|
||||
protected int getState()
|
||||
{
|
||||
if ( ServerDownload.getState() == ServerDownload.IDLE )
|
||||
return CPGenerator.getState();
|
||||
else
|
||||
return ServerDownload.getState();
|
||||
}
|
||||
|
||||
public void init()
|
||||
{
|
||||
super.init();
|
||||
@@ -55,14 +61,14 @@ public class CPGeneratorProgress extends ProgressApplet
|
||||
|
||||
int lastState = CPGenerator.DONE;
|
||||
int thisState = CPGenerator.DONE;
|
||||
//String lastString = "";
|
||||
//String thisString = "";
|
||||
String lastString = "";
|
||||
String thisString = "";
|
||||
|
||||
while ( CPGenerator.done == false )
|
||||
{
|
||||
//Trace.TRACE( "CPGenerator not done" );
|
||||
thisState = CPGenerator.getState();
|
||||
//thisString = new String( CPGenerator.currentFile );
|
||||
thisState = getState();
|
||||
thisString = new String( CPGenerator.currentFile );
|
||||
|
||||
if ( thisState != lastState )
|
||||
{
|
||||
@@ -70,80 +76,56 @@ public class CPGeneratorProgress extends ProgressApplet
|
||||
|
||||
switch ( thisState )
|
||||
{
|
||||
case CPGenerator.IDLE:
|
||||
buffer = "";
|
||||
case ServerDownload.DOWNLOADING:
|
||||
buffer = DOWNLOAD_STRING;
|
||||
break;
|
||||
|
||||
case CPGenerator.DOWNLOADING:
|
||||
buffer = DOWNLOAD_STRING;
|
||||
break;
|
||||
|
||||
case CPGenerator.UNJARRING:
|
||||
buffer = UNJAR_STRING;
|
||||
case ServerDownload.UNJARRING:
|
||||
buffer = UNJAR_STRING;
|
||||
break;
|
||||
|
||||
case CPGenerator.CONTACTING_SERVER:
|
||||
buffer = CONTACTING_SERVER;
|
||||
buffer = CONTACTING_SERVER;
|
||||
break;
|
||||
|
||||
case CPGenerator.SENDING:
|
||||
buffer = SENDING;
|
||||
buffer = SENDING;
|
||||
break;
|
||||
|
||||
case CPGenerator.WAITING:
|
||||
buffer = WAITING;
|
||||
buffer = WAITING;
|
||||
break;
|
||||
|
||||
case CPGenerator.RECEIVING_RESPONSE:
|
||||
buffer = RECEIVING_RESPONSE;
|
||||
buffer = RECEIVING_RESPONSE;
|
||||
break;
|
||||
|
||||
case CPGenerator.DONE:
|
||||
buffer = DONE_STRING;
|
||||
buffer = DONE_STRING;
|
||||
break;
|
||||
|
||||
case CPGenerator.ABORT:
|
||||
buffer = ABORT;
|
||||
buffer = ABORT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
status.setText( buffer );
|
||||
lastState = thisState;
|
||||
}
|
||||
|
||||
//if ( thisString.compareTo( lastString ) != 0 )
|
||||
//{
|
||||
// progress.setText( thisString );
|
||||
// lastString = thisString;
|
||||
//}
|
||||
if ( thisString.compareTo( lastString ) != 0 )
|
||||
{
|
||||
progress.setText( thisString );
|
||||
lastString = thisString;
|
||||
}
|
||||
|
||||
if ( ServerDownload.getBytesDownloaded() == 0 || CPGenerator.totalBytes == 0 )
|
||||
progressBar.setPercent( 0.0 );
|
||||
else
|
||||
{
|
||||
double percent;
|
||||
|
||||
if ( thisState == CPGenerator.DOWNLOADING )
|
||||
{
|
||||
percent = (double)ServerDownload.getBytesDownloaded() /
|
||||
(double)CPGenerator.totalBytes;
|
||||
|
||||
percent = percent * PEG_DOWNLOAD;
|
||||
}
|
||||
else
|
||||
{
|
||||
percent = (double)ServerDownload.getBytesUnjarred() /
|
||||
(double)CPGenerator.totalBytes;
|
||||
percent = ( 1.0 - PEG_DOWNLOAD ) * percent;
|
||||
percent = percent + PEG_DOWNLOAD;
|
||||
}
|
||||
|
||||
progressBar.setPercent( percent );
|
||||
}
|
||||
progressBar.setPercent( (double)ServerDownload.getBytesDownloaded() / (double)CPGenerator.totalBytes );
|
||||
|
||||
repaint();
|
||||
Thread.yield();
|
||||
//Thread.sleep( 50 );
|
||||
Thread.sleep( 50 );
|
||||
}
|
||||
|
||||
Trace.TRACE( "CPGenerator done" );
|
||||
@@ -152,8 +134,7 @@ public class CPGeneratorProgress extends ProgressApplet
|
||||
status.setText( DONE_STRING );
|
||||
|
||||
repaint();
|
||||
final int FOREVER = 100000;
|
||||
Thread.sleep( FOREVER );
|
||||
Thread.sleep( 1000 );
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -30,9 +30,6 @@ import netscape.security.*;
|
||||
|
||||
public class CPGenerator
|
||||
{
|
||||
public static final int IDLE = 1;
|
||||
public static final int DOWNLOADING = 2;
|
||||
public static final int UNJARRING = 3;
|
||||
public static final int SENDING = 4;
|
||||
public static final int RECEIVING_RESPONSE = 5;
|
||||
public static final int WAITING = 6;
|
||||
@@ -66,7 +63,7 @@ public class CPGenerator
|
||||
|
||||
//static CPGeneratorProgress progress = null;
|
||||
|
||||
// static final String regservMimeData = "http://seaspace.netscape.com:8080/programs/ias5/regserv/docs/reg.cgi";
|
||||
// static final String regservMimeData = "http://seaspace.netscape.com:8080/programs/ias5/regserv/docs/reg.cgi";
|
||||
|
||||
public static int getState()
|
||||
{
|
||||
@@ -607,8 +604,6 @@ public class CPGenerator
|
||||
|
||||
private static void downloadAndUnzipMetadata( String rootURL ) throws Throwable
|
||||
{
|
||||
state = DOWNLOADING;
|
||||
|
||||
String zipFileURL = rootURL + "metadata.jar";
|
||||
String localFileName = getLocalPath() + "metadata.jar";
|
||||
|
||||
@@ -618,8 +613,6 @@ public class CPGenerator
|
||||
|
||||
private static void downloadJarFiles( Vector ispList, String rootURL ) throws Throwable
|
||||
{
|
||||
state = DOWNLOADING;
|
||||
|
||||
// * download the ".jar" for each ISP
|
||||
for ( int i = 0; i < ispList.size(); i++ )
|
||||
{
|
||||
@@ -634,7 +627,7 @@ public class CPGenerator
|
||||
|
||||
String ispLocalFileName = getJarFilePath( ispData );
|
||||
|
||||
currentFile = new String( ispData.getName() );
|
||||
currentFile = new String( ispData.name );
|
||||
|
||||
Trace.TRACE( "downloading: " + zipFileURL );
|
||||
ServerDownload.downloadURL( zipFileURL, ispLocalFileName );
|
||||
@@ -643,8 +636,6 @@ public class CPGenerator
|
||||
|
||||
private static void decompressJarFiles( Vector ispList ) throws Throwable
|
||||
{
|
||||
state = UNJARRING;
|
||||
|
||||
// * decompress the ".jar" for each ISP
|
||||
for ( int i = 0; i < ispList.size(); i++ )
|
||||
{
|
||||
@@ -690,7 +681,7 @@ public class CPGenerator
|
||||
nvSet.setValue( ispDirectorySymbol, new String( ispData.language + "/" + ispData.name + "/client_data" ) );
|
||||
parseFeatureSet( nvSet, featureMappings );
|
||||
returnSets.addElement( nvSet );
|
||||
//nvSet.printNameValueSet();
|
||||
//nvSet.printNameValueSet();
|
||||
}
|
||||
return returnSets;
|
||||
}
|
||||
@@ -699,8 +690,7 @@ public class CPGenerator
|
||||
String sRootURL, String metadataMode, String reggieData[] )
|
||||
{
|
||||
done = false;
|
||||
state = IDLE;
|
||||
|
||||
|
||||
Trace.TRACE( "Hello" );
|
||||
|
||||
NameValueSet featureMappings = null;
|
||||
@@ -708,10 +698,6 @@ public class CPGenerator
|
||||
|
||||
localPath = new String( inLocalPath );
|
||||
|
||||
|
||||
ServerDownload.resetBytesDownloaded();
|
||||
ServerDownload.resetBytesUnjarred();
|
||||
|
||||
try
|
||||
{
|
||||
//if ( progress == null )
|
||||
@@ -727,7 +713,12 @@ public class CPGenerator
|
||||
if ( metadataMode.toLowerCase().compareTo( "no" ) != 0 )
|
||||
downloadAndUnzipMetadata( sRootURL );
|
||||
|
||||
ServerDownload.resetBytesDownloaded();
|
||||
|
||||
downloadJarFiles( ispList, sRootURL );
|
||||
|
||||
ServerDownload.resetBytesDownloaded();
|
||||
|
||||
decompressJarFiles( ispList );
|
||||
|
||||
//Trace.TRACE( "features.cfg settings: " );
|
||||
@@ -763,51 +754,55 @@ public class CPGenerator
|
||||
bufferedReader.close();
|
||||
|
||||
done = true;
|
||||
Thread.yield();
|
||||
result = true;
|
||||
state = IDLE;
|
||||
//System.in.read(); // prevent console window from going away
|
||||
}
|
||||
|
||||
catch ( MalformedURLException e )
|
||||
{
|
||||
done = true;
|
||||
result = false;
|
||||
Trace.TRACE( e.getMessage() );
|
||||
e.printStackTrace();
|
||||
}
|
||||
catch ( ConnectException e )
|
||||
{
|
||||
done = true;
|
||||
result = false;
|
||||
Trace.TRACE( e.getMessage() );
|
||||
e.printStackTrace();
|
||||
}
|
||||
catch ( UnknownHostException e )
|
||||
{
|
||||
done = true;
|
||||
result = false;
|
||||
Trace.TRACE( e.getMessage() );
|
||||
e.printStackTrace();
|
||||
}
|
||||
catch ( FileNotFoundException e )
|
||||
{
|
||||
done = true;
|
||||
result = false;
|
||||
Trace.TRACE( e.getMessage() );
|
||||
e.printStackTrace();
|
||||
}
|
||||
catch ( Exception e )
|
||||
{
|
||||
done = true;
|
||||
result = false;
|
||||
Trace.TRACE( e.getMessage() );
|
||||
e.printStackTrace();
|
||||
}
|
||||
catch ( Throwable e )
|
||||
{
|
||||
done = true;
|
||||
result = false;
|
||||
Trace.TRACE( "caught an exception" );
|
||||
Trace.TRACE( e.getMessage() );
|
||||
e.printStackTrace();
|
||||
}
|
||||
finally
|
||||
{
|
||||
done = true;
|
||||
state = IDLE;
|
||||
}
|
||||
|
||||
|
||||
Trace.TRACE( "returning result: " + result );
|
||||
done = false;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,25 +42,23 @@ class UnjarException extends Exception
|
||||
public class ServerDownload
|
||||
{
|
||||
public static final boolean SLEEP = false;
|
||||
public static final int IDLE = 0;
|
||||
public static final int DOWNLOADING = 1;
|
||||
public static final int UNJARRING = 2;
|
||||
|
||||
static int state = IDLE;
|
||||
static int bytesDownloaded = 0;
|
||||
static int bytesUnjarred = 0;
|
||||
|
||||
|
||||
public static int getState()
|
||||
{
|
||||
return state;
|
||||
}
|
||||
|
||||
public static int getBytesDownloaded()
|
||||
{
|
||||
return bytesDownloaded;
|
||||
}
|
||||
|
||||
public static int getBytesUnjarred()
|
||||
{
|
||||
return bytesUnjarred;
|
||||
}
|
||||
|
||||
public static void resetBytesUnjarred()
|
||||
{
|
||||
bytesUnjarred = 0;
|
||||
}
|
||||
|
||||
|
||||
public static void resetBytesDownloaded()
|
||||
{
|
||||
bytesDownloaded = 0;
|
||||
@@ -108,6 +106,8 @@ public class ServerDownload
|
||||
public static boolean unjarURL( String sURL, String sLocalFolder, boolean bDelTempFile )
|
||||
throws Exception
|
||||
{
|
||||
state = IDLE;
|
||||
|
||||
boolean bResult = false;
|
||||
|
||||
// * downloaded file name: append filename to provided local folder
|
||||
@@ -156,6 +156,8 @@ public class ServerDownload
|
||||
|
||||
//Trace.TRACE( "downloading " + sURL );
|
||||
|
||||
state = ServerDownload.DOWNLOADING;
|
||||
|
||||
urlSrc = new URL( sURL );
|
||||
|
||||
// This is a really gross fix to a stupid little problem:
|
||||
@@ -218,6 +220,7 @@ public class ServerDownload
|
||||
|
||||
bResult = true;
|
||||
|
||||
state = IDLE;
|
||||
return bResult;
|
||||
}
|
||||
|
||||
@@ -231,6 +234,8 @@ public class ServerDownload
|
||||
public static boolean unJarFile( String sCompFile, boolean bDeleteJarFile )
|
||||
throws Exception
|
||||
{
|
||||
state = UNJARRING;
|
||||
|
||||
boolean bResult = false;
|
||||
final int nBuffSize = 500;
|
||||
|
||||
@@ -279,7 +284,7 @@ public class ServerDownload
|
||||
fileout = new FileOutputStream( zEntryFile.getPath() );
|
||||
while ( ( nBytesRead = inflaterin.read( buffer, 0, nBuffSize ) ) != -1 )
|
||||
{
|
||||
bytesUnjarred += nBytesRead;
|
||||
bytesDownloaded += nBytesRead;
|
||||
fileout.write( buffer, 0, nBytesRead );
|
||||
|
||||
if ( SLEEP )
|
||||
@@ -309,6 +314,7 @@ public class ServerDownload
|
||||
inflaterin.close();
|
||||
}
|
||||
|
||||
state = IDLE;
|
||||
return bResult;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class SetupPlugin extends Plugin
|
||||
{
|
||||
static private Hashtable iniFileCache = new Hashtable();
|
||||
|
||||
static final public void debug( String s )
|
||||
final public void debug( String s )
|
||||
{
|
||||
System.out.println( s );
|
||||
}
|
||||
|
||||
@@ -22,21 +22,19 @@ import java.lang.*;
|
||||
|
||||
public class SuffixFilter implements FilenameFilter
|
||||
{
|
||||
String suffix;
|
||||
|
||||
public SuffixFilter( String inSuffix )
|
||||
{
|
||||
suffix = inSuffix.toUpperCase();
|
||||
}
|
||||
String suffix;
|
||||
|
||||
public boolean accept( File f, String s )
|
||||
{
|
||||
String sUpper = s.toUpperCase();
|
||||
public SuffixFilter( String inSuffix )
|
||||
{
|
||||
suffix = inSuffix;
|
||||
}
|
||||
|
||||
if ( sUpper.endsWith( suffix ) )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public boolean accept( File f, String s )
|
||||
{
|
||||
if ( s.endsWith( suffix ) )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -197,6 +197,5 @@ void SizeofRASNT40(); // ini WinNT RAS sizes
|
||||
#endif // WIN32
|
||||
|
||||
void SizeofRAS(); // init Win95 & Win3.1 RAS sizes
|
||||
void trace( const char* traceStatement, ... );
|
||||
|
||||
#endif // _INC_PLUGIN_H_
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include <npapi.h>
|
||||
#include "plugin.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
// resource include
|
||||
#ifdef WIN32 // **************************** WIN32 *****************************
|
||||
@@ -70,8 +70,6 @@ extern void DialerHangup();
|
||||
// keep a global execution environment
|
||||
JRIEnv* env;
|
||||
|
||||
const BOOL gEnableTrace = TRUE;
|
||||
|
||||
// Keeps track of OS version, either win95, winNT, or win16
|
||||
#ifdef WIN32
|
||||
int platformOS;
|
||||
@@ -90,6 +88,7 @@ HINSTANCE DLLinstance = NULL;
|
||||
JRIGlobalRef g_globalRefReg = NULL;
|
||||
|
||||
|
||||
|
||||
//********************************************************************************
|
||||
//
|
||||
// NPP_Initialize
|
||||
@@ -107,8 +106,7 @@ NPError NPP_Initialize(void)
|
||||
//register_java_lang_String(env); //Not necessary?
|
||||
}
|
||||
|
||||
trace( "initialized plug-in" );
|
||||
|
||||
|
||||
#ifdef WIN32 // ******************* WIN32 ***********************
|
||||
// gets the OS version
|
||||
// note: we need another way to check for win31
|
||||
@@ -629,35 +627,6 @@ native_netscape_npasw_SetupPlugin_SECURE_0005fCheckEnvironment(JRIEnv* env,
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
void trace( const char* traceStatement, ... )
|
||||
{
|
||||
static char buffer[ 10000 ];
|
||||
|
||||
int len = 0;
|
||||
va_list stack;
|
||||
|
||||
if ( !gEnableTrace )
|
||||
return;
|
||||
|
||||
if ( !env )
|
||||
return;
|
||||
|
||||
java_lang_Class* self = (java_lang_Class*)NPP_GetJavaClass();
|
||||
if ( !self )
|
||||
return;
|
||||
|
||||
va_start( stack, traceStatement );
|
||||
(void)vsprintf( buffer, traceStatement, stack );
|
||||
va_end( stack );
|
||||
len = strlen( buffer );
|
||||
|
||||
java_lang_String* traceString = JRI_NewStringPlatform( env, buffer,
|
||||
len, NULL, 0 );
|
||||
|
||||
netscape_npasw_SetupPlugin_debug( env, self, traceString );
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Native Methods:
|
||||
* These are the signatures of the native methods which you must implement.
|
||||
|
||||
@@ -167,14 +167,12 @@ CComposerAwareURLDragMixin :: ReceiveDragItem ( DragReference inDragRef, DragAtt
|
||||
ItemReference inItemRef, Rect & inItemBounds,
|
||||
SPoint32 & inMouseLoc )
|
||||
{
|
||||
try
|
||||
{
|
||||
try {
|
||||
FlavorType useFlavor;
|
||||
FindBestFlavor ( inDragRef, inItemRef, useFlavor );
|
||||
Size theDataSize = 0;
|
||||
|
||||
switch ( useFlavor )
|
||||
{
|
||||
switch ( useFlavor ) {
|
||||
|
||||
case emComposerNativeDrag:
|
||||
{
|
||||
@@ -202,11 +200,8 @@ CComposerAwareURLDragMixin :: ReceiveDragItem ( DragReference inDragRef, DragAtt
|
||||
|
||||
} // switch on best flavor
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
#ifdef DEBUG
|
||||
catch ( ... ) {
|
||||
DebugStr ( "\pCan't find the flavor we want; g" );
|
||||
#endif
|
||||
}
|
||||
|
||||
} // ReceiveDragItem
|
||||
@@ -465,34 +460,10 @@ Bool CEditView::SaveDocumentAs()
|
||||
if ( pLocalName )
|
||||
{
|
||||
int16 saveCsid = (GetContext())->GetWinCSID();
|
||||
char newName[32];
|
||||
strncpy( newName, (char *)&sfReply.sfFile.name[1], sfReply.sfFile.name[0] );
|
||||
newName[ sfReply.sfFile.name[0] ] = 0; /* null-terminate */
|
||||
|
||||
EDT_PageData *pagedata;
|
||||
pagedata = EDT_GetPageData( *GetContext() );
|
||||
if ( pagedata )
|
||||
{
|
||||
/* this code assumes that EDT_SetPageData is not going to free the title */
|
||||
if ( ( pagedata->pTitle == NULL )
|
||||
|| ( pagedata->pTitle && pagedata->pTitle[0] == 0 ) )
|
||||
{
|
||||
XP_FREEIF( pagedata->pTitle );
|
||||
pagedata->pTitle = newName;
|
||||
|
||||
if ( pagedata->pTitle )
|
||||
{
|
||||
EDT_SetPageData( *GetContext(), pagedata );
|
||||
/* set to NULL since we didn't malloc this data & don't want it freed in EDT_FreePageData */
|
||||
pagedata->pTitle = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
EDT_FreePageData( pagedata );
|
||||
}
|
||||
|
||||
if (hist_ent->title == NULL)
|
||||
{
|
||||
CStr31 newName( sfReply.sfFile.name );
|
||||
StrAllocCopy( ((MWContext *)*GetContext())->title, newName );
|
||||
SHIST_SetTitleOfCurrentDoc( *GetContext() );
|
||||
}
|
||||
|
||||
@@ -159,11 +159,7 @@ CEditorWindow* CEditorWindow::MakeEditWindow( MWContext* old_context, URL_Struct
|
||||
{
|
||||
url = SHIST_CreateURLStructFromHistoryEntry( old_context, entry );
|
||||
if ( url )
|
||||
{
|
||||
url->force_reload = NET_NORMAL_RELOAD;
|
||||
|
||||
XP_MEMSET( &url->savedData, 0, sizeof( SHIST_SavedData ) );
|
||||
}
|
||||
}
|
||||
// if we don't have a history entry, we're kind of screwed-->just load a blank page
|
||||
}
|
||||
@@ -309,6 +305,7 @@ void CEditorWindow::NoteDocTitleChanged( const char* inNewTitle )
|
||||
|
||||
CNSContext *theContext = GetWindowContext();
|
||||
|
||||
CStr255 title( inNewTitle );
|
||||
char *baseName = LO_GetBaseURL( theContext->operator MWContext*() ); // don't free this...
|
||||
// strip out username and password so user doesn't see them in window title
|
||||
char *location = NULL;
|
||||
@@ -347,20 +344,12 @@ void CEditorWindow::NoteDocTitleChanged( const char* inNewTitle )
|
||||
netscapeTitle += " ";
|
||||
netscapeTitle += subTitle;
|
||||
netscapeTitle += " - [";
|
||||
|
||||
// set up page title manually; rather than rely on XP string passed in
|
||||
EDT_PageData * pageData = EDT_GetPageData( theContext->operator MWContext*() );
|
||||
if ( pageData && pageData->pTitle && pageData->pTitle[0] )
|
||||
if ( inNewTitle && *inNewTitle )
|
||||
{
|
||||
netscapeTitle += pageData->pTitle;
|
||||
netscapeTitle += title;
|
||||
if (csBaseURL.Length())
|
||||
netscapeTitle += " : ";
|
||||
}
|
||||
|
||||
if ( pageData )
|
||||
EDT_FreePageData( pageData );
|
||||
|
||||
// add file path to end
|
||||
netscapeTitle += csBaseURL;
|
||||
netscapeTitle += "]";
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "edt.h"
|
||||
|
||||
CFormattingToolBar::CFormattingToolBar(LStream * inStream)
|
||||
: CAMSavvyBevelView(inStream)
|
||||
: CPatternBevelView(inStream)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CAMSavvyBevelView.h"
|
||||
#include "CPatternBevelView.h"
|
||||
#include <LListener.h>
|
||||
|
||||
class CEditView;
|
||||
@@ -26,7 +26,7 @@ class CEditView;
|
||||
|
||||
// used in Editor window and Mail Compose windows
|
||||
|
||||
class CFormattingToolBar : public CAMSavvyBevelView, public LListener
|
||||
class CFormattingToolBar : public CPatternBevelView, public LListener
|
||||
{
|
||||
public:
|
||||
enum {class_ID = 'FoTB'};
|
||||
|
||||
@@ -556,18 +556,7 @@ void CMacSpellChecker::GetSelection(int32 &selStart, int32 &selEnd)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
long localStart, localEnd;
|
||||
|
||||
mTextView->GetSelection( &localStart, &localEnd );
|
||||
// bug fix
|
||||
// only return the selection if it is not empty.
|
||||
if (localStart != localEnd)
|
||||
{
|
||||
selStart = localStart;
|
||||
selEnd = localEnd;
|
||||
}
|
||||
}
|
||||
mTextView->GetSelection( &selStart, &selEnd );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// You typically won't need to change anything in this file.
|
||||
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
|
||||
|
||||
#include "MacPrefix_debug.h"
|
||||
#include "Moz_DebugConfig.h"
|
||||
|
||||
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
|
||||
// ¥ When we split out the procompiled headers seperately, we will not
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
//
|
||||
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
|
||||
|
||||
#include "MacPrefix.h"
|
||||
#include "Moz_Config.h"
|
||||
|
||||
#ifdef powerc
|
||||
#pragma precompile_target "Composer_HeadersPPC"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
//
|
||||
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
|
||||
|
||||
#include "MacPrefix.h"
|
||||
#include "Moz_Config.h"
|
||||
|
||||
#ifdef powerc
|
||||
#pragma precompile_target "Composer_HeadersPPC++"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// You typically won't need to change anything in this file.
|
||||
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
|
||||
|
||||
#include "MacPrefix.h"
|
||||
#include "Moz_Config.h"
|
||||
|
||||
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
|
||||
// ¥ When we split out the procompiled headers seperately, we will not
|
||||
|
||||
@@ -22,8 +22,7 @@
|
||||
#include "CEditView.h"
|
||||
#include "edt.h"
|
||||
#include "pa_tags.h"
|
||||
#include "secnav.h"
|
||||
#include "rosetta.h"
|
||||
#include "secnav.h" // SECNAV_MungeString, SECNAV_UnMungeString (password munging calls for publishing)
|
||||
|
||||
// macfe
|
||||
#include "ulaunch.h" // StartDocInApp
|
||||
@@ -112,11 +111,9 @@ static Boolean GetExtraHTML( char *pExtra, char **newExtraHTML , int16 win_csid)
|
||||
XP_FREE( pCurrent );
|
||||
|
||||
theMessage = handler.DoDialog();
|
||||
|
||||
//case msg_help:
|
||||
// newWindow->Help();
|
||||
// break;
|
||||
|
||||
// case msg_Help:
|
||||
// newWindow->Help();
|
||||
// break;
|
||||
} while ( theMessage != msg_OK && theMessage != msg_Cancel );
|
||||
|
||||
if ( theMessage == msg_OK )
|
||||
@@ -207,70 +204,83 @@ void CEditorPrefContain::DrawSelf()
|
||||
|
||||
Boolean CEditDialog::Start(ResIDT inWindowID, MWContext * context, short initTabValue, Boolean insert)
|
||||
{
|
||||
CEditDialog *dlog = (CEditDialog *)URobustCreateWindow::CreateWindow( inWindowID, LCommander::GetTopCommander() );
|
||||
if ( dlog == NULL )
|
||||
return false;
|
||||
|
||||
UReanimator::LinkListenerToControls( dlog, dlog, inWindowID ); // the handler is listening; but we want a crack at the messages also...
|
||||
dlog->SetContext( context );
|
||||
dlog->SetInitTabValue( initTabValue );
|
||||
dlog->SetInWindowID( inWindowID );
|
||||
dlog->SetInsertFlag( insert );
|
||||
dlog->InitializeDialogControls();
|
||||
dlog->Show();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
CEditDialog* newWindow = NULL;
|
||||
LEditField* theEditField = NULL;
|
||||
|
||||
StBlockingDialogHandler handler(inWindowID, LCommander::GetTopCommander()); // inSuperCommander
|
||||
newWindow = (CEditDialog*)handler.GetDialog();
|
||||
ThrowIfNULL_(newWindow);
|
||||
|
||||
UReanimator::LinkListenerToControls( newWindow, newWindow, inWindowID ); // the handler is listening; but we want a crack at the messages also...
|
||||
|
||||
newWindow->SetContext(context);
|
||||
newWindow->SetInitTabValue(initTabValue);
|
||||
newWindow->SetInWindowID(inWindowID);
|
||||
newWindow->SetInsertFlag(insert);
|
||||
newWindow->InitializeDialogControls();
|
||||
newWindow->Show();
|
||||
|
||||
EDT_BeginBatchChanges(context);
|
||||
|
||||
while (TRUE) { // Loop FOREVER. We exit from the loop by returning from particular cases.
|
||||
|
||||
MessageT theMessage = handler.DoDialog();
|
||||
LCommander* theTarget = GetTarget();
|
||||
|
||||
switch (theMessage) {
|
||||
|
||||
case msg_Help:
|
||||
newWindow->Help();
|
||||
break;
|
||||
|
||||
case msg_Apply:
|
||||
if (theTarget == NULL || theTarget->SwitchTarget(newWindow))
|
||||
if (newWindow->CommitChanges(TRUE)) {
|
||||
|
||||
LStdControl* cancel = (LStdControl*)newWindow->FindPaneByID( 'CANC' );
|
||||
if (cancel) {
|
||||
StringHandle CloseHandle = GetString(CLOSE_STR_RESID);
|
||||
CStr255 Close = **( (CStr255**)CloseHandle ); // Lock it? I don't think so.
|
||||
cancel->SetDescriptor(Close);
|
||||
}
|
||||
}
|
||||
void CEditDialog::ListenToMessage( MessageT inMessage, void* ioParam )
|
||||
{
|
||||
switch ( inMessage )
|
||||
{
|
||||
case msg_Help:
|
||||
Help();
|
||||
break;
|
||||
|
||||
case msg_OK:
|
||||
if (theTarget == NULL || theTarget->SwitchTarget(newWindow))
|
||||
if (newWindow->CommitChanges(TRUE)) {
|
||||
EDT_EndBatchChanges(context);
|
||||
return TRUE; // Bye Bye!!
|
||||
}
|
||||
break;
|
||||
|
||||
case msg_Cancel: {
|
||||
EDT_EndBatchChanges(context);
|
||||
return FALSE; // Bye Bye!!
|
||||
case 'Xtra':
|
||||
char * newExtraHTML = NULL;
|
||||
INTL_CharSetInfo csi = LO_GetDocumentCharacterSetInfo( GetContext() );
|
||||
Boolean canceled = !GetExtraHTML( pExtra, &newExtraHTML ,INTL_GetCSIWinCSID(csi) );
|
||||
if (!canceled)
|
||||
{
|
||||
if ( pExtra )
|
||||
XP_FREE( pExtra );
|
||||
pExtra = newExtraHTML;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// this should never happen; hopefully, non-debug code makes this case go away
|
||||
XP_ASSERT( 0 );
|
||||
break;
|
||||
}
|
||||
|
||||
case msg_OK:
|
||||
case msg_Apply:
|
||||
LCommander* theTarget = GetTarget();
|
||||
if ( theTarget == NULL || theTarget->SwitchTarget(this) )
|
||||
{
|
||||
if ( CommitChanges( true ) )
|
||||
{
|
||||
if ( inMessage == msg_OK )
|
||||
{
|
||||
if ( mUndoInited )
|
||||
EDT_EndBatchChanges( fContext );
|
||||
|
||||
LDialogBox::ListenToMessage( cmd_Close, ioParam );
|
||||
return;
|
||||
}
|
||||
|
||||
LStdControl* cancel = (LStdControl*)FindPaneByID( 'CANC' );
|
||||
if (cancel)
|
||||
{
|
||||
StringHandle CloseHandle = GetString(CLOSE_STR_RESID);
|
||||
if ( CloseHandle )
|
||||
{
|
||||
SInt8 hstate = HGetState( (Handle)CloseHandle );
|
||||
HLock( (Handle)CloseHandle );
|
||||
cancel->SetDescriptor( *CloseHandle );
|
||||
HSetState( (Handle)CloseHandle, hstate );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case msg_Cancel:
|
||||
if ( mUndoInited )
|
||||
EDT_EndBatchChanges( fContext );
|
||||
|
||||
LDialogBox::ListenToMessage( cmd_Close, ioParam );
|
||||
break;
|
||||
|
||||
default:
|
||||
LDialogBox::ListenToMessage( inMessage, ioParam );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,7 +288,33 @@ Boolean CEditDialog::Start(ResIDT inWindowID, MWContext * context, short initTab
|
||||
Boolean CEditDialog::AllowSubRemoval( LCommander * /* inSub */ )
|
||||
{
|
||||
// don't allow removal
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// copied from StDialogHandler
|
||||
void CEditDialog::FindCommandStatus(
|
||||
CommandT /* inCommand */,
|
||||
Boolean &outEnabled,
|
||||
Boolean& /* outUsesMark */,
|
||||
Char16& /* outMark */,
|
||||
Str255 /* outName */)
|
||||
{
|
||||
// Don't enable any commands except cmd_About, which will keep
|
||||
// the Apple menu enabled. This function purposely does not
|
||||
// call the inherited FindCommandStatus, thereby suppressing
|
||||
// commands that are handled by SuperCommanders. Only those
|
||||
// commands enabled by SubCommanders will be active.
|
||||
//
|
||||
// This is usually what you want for a moveable modal dialog.
|
||||
// Commands such as "New", "Open" and "Quit" that are handled
|
||||
// by the Applcation are disabled, but items within the dialog
|
||||
// can enable commands. For example, an EditField would enable
|
||||
// items in the "Edit" menu.
|
||||
|
||||
outEnabled = false;
|
||||
// actually we don't want to enable "about" either as it might open
|
||||
// a browser window or ??? which would be very bad
|
||||
}
|
||||
|
||||
|
||||
@@ -542,7 +578,7 @@ void CUnknownTag::ListenToMessage( MessageT inMessage, void* ioParam )
|
||||
break;
|
||||
|
||||
default:
|
||||
LDialogBox::ListenToMessage( inMessage, ioParam );
|
||||
CEditDialog::ListenToMessage( inMessage, ioParam );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -894,16 +930,7 @@ Boolean CPublish::CommitChanges( Boolean /* isAllPanes */ )
|
||||
if ( titleField )
|
||||
pageData->pTitle = titleField->GetLongDescriptor();
|
||||
|
||||
if ( pageData->pTitle && pageData->pTitle[0] == 0 )
|
||||
{
|
||||
XP_FREE( pageData->pTitle );
|
||||
pageData->pTitle = NULL;
|
||||
}
|
||||
if ( pageData->pTitle == NULL )
|
||||
pageData->pTitle = strdup( " " );
|
||||
|
||||
EDT_SetPageData( fContext, pageData );
|
||||
|
||||
EDT_FreePageData( pageData );
|
||||
}
|
||||
|
||||
@@ -974,7 +1001,7 @@ Boolean CPublish::CommitChanges( Boolean /* isAllPanes */ )
|
||||
if (fSavePassword->GetValue())
|
||||
{
|
||||
char *result;
|
||||
result = HG99875(pass);
|
||||
result = SECNAV_MungeString(pass);
|
||||
if ( result && (strcmp( result, pass ) == 0) )
|
||||
{
|
||||
// munging didn't do anything so we'll write out ""
|
||||
@@ -1107,7 +1134,7 @@ void CPublish::ListenToMessage( MessageT inMessage, void* ioParam )
|
||||
|
||||
if (NET_ParseUploadURL(text, &location, &user, &pass)) {
|
||||
if (pass && *pass) {
|
||||
char *newpass = HG99876(pass);
|
||||
char *newpass = SECNAV_UnMungeString(pass);
|
||||
XP_FREE(pass);
|
||||
pass = newpass;
|
||||
}
|
||||
@@ -1139,7 +1166,7 @@ void CPublish::ListenToMessage( MessageT inMessage, void* ioParam )
|
||||
|
||||
if (NET_ParseUploadURL(BrowseLoc, &location, &user, &pass)) {
|
||||
if (pass && *pass) {
|
||||
char *newpass = HG99876(pass);
|
||||
char *newpass = SECNAV_UnMungeString(pass);
|
||||
XP_FREE(pass);
|
||||
pass = newpass;
|
||||
}
|
||||
@@ -1165,7 +1192,7 @@ void CPublish::ListenToMessage( MessageT inMessage, void* ioParam )
|
||||
break;
|
||||
|
||||
default:
|
||||
LDialogBox::ListenToMessage( inMessage, ioParam );
|
||||
CEditDialog::ListenToMessage( inMessage, ioParam );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1999,7 +2026,7 @@ void CTableInsertDialog::ListenToMessage( MessageT inMessage, void* ioParam )
|
||||
break;
|
||||
|
||||
default:
|
||||
LDialogBox::ListenToMessage( inMessage, ioParam );
|
||||
CEditDialog::ListenToMessage( inMessage, ioParam );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2008,9 +2035,6 @@ void CTableInsertDialog::ListenToMessage( MessageT inMessage, void* ioParam )
|
||||
void CEDTableContain::FinishCreateSelf()
|
||||
{
|
||||
// Find Controls
|
||||
fNumRowsEditText = (LGAEditField*)this->FindPaneByID( 'rows' );
|
||||
fNumColsEditText = (LGAEditField*)this->FindPaneByID( 'cols' );
|
||||
|
||||
fBorderCheckBox = (LControl*)FindPaneByID( 'BrdW' );
|
||||
fBorderCheckBox->SetValueMessage( 'BrdW' );
|
||||
|
||||
@@ -2094,12 +2118,8 @@ void CEDTableContain::PrefsFromControls()
|
||||
EDT_TableData *fData = EDT_GetTableData(fContext);
|
||||
if (fData == NULL)
|
||||
return;
|
||||
|
||||
|
||||
LO_Color backgroundColor;
|
||||
|
||||
fData->iRows = fNumRowsEditText->GetValue();
|
||||
fData->iColumns = fNumColsEditText->GetValue();
|
||||
|
||||
GetTableDataFromControls( fData, fBorderCheckBox, fBorderWidthEditText,
|
||||
fCellSpacingEditText, fCellPaddingEditText,
|
||||
fCustomWidth, fWidthPopup, fWidthEditText,
|
||||
@@ -2193,12 +2213,6 @@ void CEDTableContain::ControlsFromPref()
|
||||
EDT_TableData* fData = EDT_GetTableData(fContext);
|
||||
if (fData == NULL)
|
||||
return;
|
||||
|
||||
fNumColsEditText->SetValue( fData->iColumns );
|
||||
fNumColsEditText->Enable();
|
||||
|
||||
fNumRowsEditText->SetValue( fData->iRows );
|
||||
fNumRowsEditText->Enable();
|
||||
|
||||
switch (fData->align)
|
||||
{
|
||||
@@ -2264,24 +2278,6 @@ void CEDTableContain::ControlsFromPref()
|
||||
|
||||
Boolean CEDTableContain::AllFieldsOK()
|
||||
{
|
||||
EDT_TableData* fData = EDT_GetTableData(fContext);
|
||||
if (fData == NULL)
|
||||
return FALSE;
|
||||
|
||||
int upperBoundRows = fData->iRows > 100 ? fData->iRows : 100; // just in case iRows is over 100
|
||||
if (!IsEditFieldWithinLimits(fNumRowsEditText, fData->iRows, upperBoundRows)) {
|
||||
SwitchTarget( fNumRowsEditText );
|
||||
fNumRowsEditText->SelectAll();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int upperBoundCols = fData->iColumns > 100 ? fData->iColumns : 100;
|
||||
if (!IsEditFieldWithinLimits(fNumColsEditText, fData->iColumns, upperBoundCols)) {
|
||||
SwitchTarget( fNumColsEditText );
|
||||
fNumColsEditText->SelectAll();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( fBorderCheckBox->GetValue() )
|
||||
{
|
||||
if (!IsEditFieldWithinLimits(fBorderWidthEditText, 0, 10000)) {
|
||||
@@ -2482,17 +2478,12 @@ void CEDTableCellContain::PrefsFromControls()
|
||||
if (cellData == NULL)
|
||||
return;
|
||||
|
||||
if ( fRowSpanEditText->IsEnabled() ) /* assume CF_ROWSPAN bit already set properly */
|
||||
if ( fRowSpanEditText->IsEnabled() )
|
||||
cellData->iRowSpan = fRowSpanEditText->GetValue();
|
||||
if ( fColSpanEditText->IsEnabled() ) /* assume CF_COLSPAN bit already set properly */
|
||||
if ( fColSpanEditText->IsEnabled() )
|
||||
cellData->iColSpan = fColSpanEditText->GetValue();
|
||||
|
||||
int curValue;
|
||||
|
||||
curValue = fHorizontalAlignment->GetValue();
|
||||
if ( !(cellData->mask & CF_ALIGN ) && curValue != 4 )
|
||||
cellData->mask |= CF_ALIGN;
|
||||
switch ( curValue )
|
||||
switch ( fHorizontalAlignment->GetValue() )
|
||||
{
|
||||
default:
|
||||
case 1: cellData->align = ED_ALIGN_LEFT; break;
|
||||
@@ -2501,96 +2492,59 @@ void CEDTableCellContain::PrefsFromControls()
|
||||
case 4: break; // mixed state; don't reset
|
||||
}
|
||||
|
||||
curValue = fVerticalAlignment->GetValue();
|
||||
if ( !(cellData->mask & CF_VALIGN ) && curValue != 5 )
|
||||
cellData->mask |= CF_VALIGN;
|
||||
switch ( curValue )
|
||||
switch ( fVerticalAlignment->GetValue() )
|
||||
{
|
||||
default:
|
||||
case 1: cellData->valign = ED_ALIGN_ABSTOP; break;
|
||||
case 2: cellData->valign = ED_ALIGN_ABSCENTER; break;
|
||||
case 3: cellData->valign = ED_ALIGN_BASELINE; break;
|
||||
case 4: cellData->valign = ED_ALIGN_ABSBOTTOM; break;
|
||||
case 1: cellData->valign = ED_ALIGN_ABSTOP;
|
||||
case 2: cellData->valign = ED_ALIGN_ABSCENTER;
|
||||
case 3: cellData->valign = ED_ALIGN_BASELINE;
|
||||
case 4: cellData->valign = ED_ALIGN_ABSBOTTOM;
|
||||
case 5: break; // mixed state; don't reset
|
||||
}
|
||||
|
||||
curValue = fHeaderStyle->GetValue();
|
||||
if ( curValue != 2 )
|
||||
{
|
||||
if ( !(cellData->mask & CF_HEADER ) )
|
||||
cellData->mask |= CF_HEADER;
|
||||
cellData->bHeader = curValue;
|
||||
}
|
||||
|
||||
curValue = fWrapText->GetValue();
|
||||
if ( curValue != 2 )
|
||||
{
|
||||
if ( !(cellData->mask & CF_NOWRAP ) )
|
||||
cellData->mask |= CF_NOWRAP;
|
||||
cellData->bNoWrap = curValue;
|
||||
}
|
||||
|
||||
curValue = fCustomWidth->GetValue();
|
||||
if ( !(cellData->mask & CF_WIDTH ) && curValue != 2 )
|
||||
cellData->mask |= CF_WIDTH;
|
||||
if ( curValue == 1 )
|
||||
cellData->bHeader = fHeaderStyle->GetValue();
|
||||
cellData->bNoWrap = fWrapText->GetValue();
|
||||
|
||||
if ( fCustomWidth->GetValue() )
|
||||
{
|
||||
cellData->bWidthDefined = TRUE;
|
||||
cellData->bWidthPercent = fWidthPopup->GetValue() == kPercentOfWindowItem;
|
||||
cellData->iWidth = fWidthEditText->GetValue();
|
||||
}
|
||||
else if ( curValue == 0 )
|
||||
else
|
||||
cellData->bWidthDefined = FALSE;
|
||||
|
||||
curValue = fCustomHeight->GetValue();
|
||||
if ( !(cellData->mask & CF_HEIGHT ) && curValue != 2 )
|
||||
cellData->mask |= CF_HEIGHT;
|
||||
if ( curValue == 1 )
|
||||
if (fCustomHeight->GetValue())
|
||||
{
|
||||
cellData->bHeightDefined = TRUE;
|
||||
cellData->bHeightPercent = fHeightPopup->GetValue() == kPercentOfWindowItem;
|
||||
cellData->iHeight = fHeightEditText->GetValue();
|
||||
}
|
||||
else if ( curValue == 0 )
|
||||
else
|
||||
cellData->bHeightDefined = FALSE;
|
||||
|
||||
XP_FREEIF( cellData->pColorBackground ); // we'll replace it with our own if we use it at all.
|
||||
cellData->pColorBackground = NULL;
|
||||
|
||||
LO_Color pColor;
|
||||
curValue = fCustomColor->GetValue();
|
||||
if ( curValue != 2 && !(cellData->mask & CF_BACK_COLOR ) )
|
||||
cellData->mask |= CF_BACK_COLOR;
|
||||
if ( curValue == 1 )
|
||||
if ( fCustomColor->GetValue() )
|
||||
{
|
||||
pColor = UGraphics::MakeLOColor(fColorCustomColor->GetColor());
|
||||
cellData->pColorBackground = &pColor;
|
||||
}
|
||||
else if ( curValue == 0 )
|
||||
else
|
||||
cellData->pColorBackground = NULL;
|
||||
|
||||
XP_FREEIF( cellData->pBackgroundImage );
|
||||
cellData->pBackgroundImage = NULL;
|
||||
|
||||
curValue = mUseImage->GetValue();
|
||||
if ( !(cellData->mask & CF_BACK_IMAGE ) && curValue != 2 )
|
||||
cellData->mask |= CF_BACK_IMAGE;
|
||||
if ( curValue == 1 )
|
||||
if ( mUseImage->GetValue() )
|
||||
cellData->pBackgroundImage = mImageFileName->GetLongDescriptor();
|
||||
|
||||
curValue = mLeaveImage->GetValue();
|
||||
if ( curValue != 2 )
|
||||
{
|
||||
if ( !(cellData->mask & CF_BACK_NOSAVE ) )
|
||||
cellData->mask |= CF_BACK_NOSAVE;
|
||||
cellData->bBackgroundNoSave = curValue;
|
||||
}
|
||||
cellData->bBackgroundNoSave = mLeaveImage->GetValue();
|
||||
|
||||
LView* extrahtmlbutton = (LView *)FindPaneByID( 'Xtra' );
|
||||
XP_ASSERT( extrahtmlbutton != NULL );
|
||||
if ( !(cellData->mask & CF_EXTRA_HTML ) )
|
||||
XP_ASSERT( 1 );
|
||||
if ( extrahtmlbutton && extrahtmlbutton->IsEnabled() )
|
||||
if ( extrahtmlbutton->IsEnabled() )
|
||||
{
|
||||
XP_FREEIF( cellData->pExtra );
|
||||
cellData->pExtra = pExtra;
|
||||
@@ -2606,6 +2560,32 @@ void CEDTableCellContain::PrefsFromControls()
|
||||
EDT_FreeTableCellData( cellData );
|
||||
}
|
||||
|
||||
#if FIRST_PASS_AT_MASK
|
||||
typedef enum {
|
||||
ED_ALIGN_LEFT_MASK = 0x0001,
|
||||
ED_ALIGN_CENTER_MASK = 0x0002,
|
||||
ED_ALIGN_RIGHT_MASK = 0x0004,
|
||||
ED_ALIGN_ABSTOP_MASK = 0x0010,
|
||||
ED_ALIGN_ABSCENTER_MASK = 0x0020,
|
||||
ED_ALIGN_BASELINE_MASK = 0x0040,
|
||||
ED_ALIGN_ABSBOTTOM_MASK = 0x0080
|
||||
} ED_AlignmentMask;
|
||||
|
||||
/* ED_AlignmentMask: add the values which are set */
|
||||
/* Boolean: true means all agree; false means selection has different values */
|
||||
struct _EDT_TableCellMask {
|
||||
ED_AlignmentMask bHalign;
|
||||
ED_AlignmentMask bValign;
|
||||
Boolean bColAndRowSpan;
|
||||
Boolean bHeader;
|
||||
Boolean bNoWrap;
|
||||
Boolean bWidth;
|
||||
Boolean bHeight;
|
||||
Boolean bColor;
|
||||
Boolean bBackgroundImage;
|
||||
Boolean bExtraHTML;
|
||||
};
|
||||
#endif
|
||||
|
||||
// Initialize from preferences
|
||||
void CEDTableCellContain::ControlsFromPref()
|
||||
@@ -2614,10 +2594,21 @@ void CEDTableCellContain::ControlsFromPref()
|
||||
if (cellData == NULL)
|
||||
return;
|
||||
|
||||
#if FIRST_PASS_AT_MASK
|
||||
_EDT_TableCellMask cellDataMask;
|
||||
cellDataMask.bHalign = ED_ALIGN_LEFT_MASK;
|
||||
cellDataMask.bValign = ED_ALIGN_BASELINE_MASK;
|
||||
cellDataMask.bColAndRowSpan = true;
|
||||
cellDataMask.bHeader = cellDataMask.bNoWrap = true;
|
||||
cellDataMask.bWidth = cellDataMask.bHeight = true;
|
||||
cellDataMask.bColor = cellDataMask.bBackgroundImage = true;
|
||||
cellDataMask.bExtraHTML = true;
|
||||
#endif
|
||||
|
||||
// set popup menus depending if nested in another table or just in window
|
||||
short resID;
|
||||
CStr255 title;
|
||||
StringHandle titleH;
|
||||
|
||||
if (EDT_IsInsertPointInNestedTable(fContext))
|
||||
resID = EDITOR_PERCENT_PARENT_CELL;
|
||||
else
|
||||
@@ -2628,7 +2619,7 @@ void CEDTableCellContain::ControlsFromPref()
|
||||
{
|
||||
SInt8 hstate = HGetState( (Handle)titleH );
|
||||
HLock( (Handle)titleH );
|
||||
CStr255 title = *titleH;
|
||||
title = *titleH;
|
||||
HSetState( (Handle)titleH, hstate );
|
||||
|
||||
MenuHandle menuh = ((LGAPopup *)fWidthPopup)->GetMacMenuH();
|
||||
@@ -2646,57 +2637,56 @@ void CEDTableCellContain::ControlsFromPref()
|
||||
}
|
||||
}
|
||||
|
||||
/* col span */
|
||||
if ( (cellData->mask & CF_COLSPAN) )
|
||||
{
|
||||
fColSpanEditText->SetValue( cellData->iColSpan );
|
||||
fColSpanEditText->Enable();
|
||||
}
|
||||
else
|
||||
fColSpanEditText->Disable();
|
||||
|
||||
/* row span */
|
||||
if ( (cellData->mask & CF_ROWSPAN) )
|
||||
/* col and row span */
|
||||
#if FIRST_PASS_AT_MASK
|
||||
if ( cellDataMask.bColAndRowSpan )
|
||||
#endif
|
||||
{
|
||||
fRowSpanEditText->SetValue( cellData->iRowSpan );
|
||||
fRowSpanEditText->Enable();
|
||||
fColSpanEditText->SetValue( cellData->iColSpan );
|
||||
}
|
||||
#if FIRST_PASS_AT_MASK
|
||||
else
|
||||
{
|
||||
fRowSpanEditText->Disable();
|
||||
fColSpanEditText->Disable();
|
||||
// should disable the rest of this too...
|
||||
}
|
||||
#endif
|
||||
|
||||
/* horizontal alignment */
|
||||
if ( (cellData->mask & CF_ALIGN) )
|
||||
switch ( cellData->align )
|
||||
{
|
||||
switch ( cellData->align )
|
||||
{
|
||||
case ED_ALIGN_DEFAULT:
|
||||
case ED_ALIGN_LEFT: fHorizontalAlignment->SetValue( 1 ); break;
|
||||
case ED_ALIGN_ABSCENTER: fHorizontalAlignment->SetValue( 2 ); break;
|
||||
case ED_ALIGN_RIGHT: fHorizontalAlignment->SetValue( 3 ); break;
|
||||
}
|
||||
case ED_ALIGN_LEFT: fHorizontalAlignment->SetValue( 1 ); break;
|
||||
case ED_ALIGN_ABSCENTER: fHorizontalAlignment->SetValue( 2 ); break;
|
||||
case ED_ALIGN_RIGHT: fHorizontalAlignment->SetValue( 3 ); break;
|
||||
default: /* mixed */ fHorizontalAlignment->SetValue( 4 ); break;
|
||||
}
|
||||
else
|
||||
fHorizontalAlignment->SetValue( 4 );
|
||||
|
||||
/* vertical alignment */
|
||||
if ( (cellData->mask & CF_VALIGN) )
|
||||
switch ( cellData->valign )
|
||||
{
|
||||
switch ( cellData->valign )
|
||||
{
|
||||
case ED_ALIGN_ABSTOP: fVerticalAlignment->SetValue( 1 ); break;
|
||||
case ED_ALIGN_ABSCENTER: fVerticalAlignment->SetValue( 2 ); break;
|
||||
case ED_ALIGN_BASELINE: fVerticalAlignment->SetValue( 3 ); break;
|
||||
case ED_ALIGN_ABSBOTTOM: fVerticalAlignment->SetValue( 4 ); break;
|
||||
}
|
||||
case ED_ALIGN_ABSTOP: fVerticalAlignment->SetValue( 1 ); break;
|
||||
case ED_ALIGN_ABSCENTER: fVerticalAlignment->SetValue( 2 ); break;
|
||||
case ED_ALIGN_BASELINE: fVerticalAlignment->SetValue( 3 ); break;
|
||||
case ED_ALIGN_ABSBOTTOM: fVerticalAlignment->SetValue( 4 ); break;
|
||||
default: /* mixed */ fVerticalAlignment->SetValue( 5 ); break;
|
||||
}
|
||||
else
|
||||
fVerticalAlignment->SetValue( 5 );
|
||||
|
||||
/* text */
|
||||
fHeaderStyle->SetValue( (cellData->mask & CF_HEADER) ? cellData->bHeader : 2 );
|
||||
fWrapText->SetValue( (cellData->mask & CF_NOWRAP) ? cellData->bNoWrap : 2 );
|
||||
#if FIRST_PASS_AT_MASK
|
||||
fHeaderStyle->SetValue( cellDataMask.bHeader ? cellData->bHeader : 2 );
|
||||
fWrapText->SetValue( cellDataMask.bNoWrap ? cellData->bNoWrap : 2 );
|
||||
#else
|
||||
fHeaderStyle->SetValue( cellData->bHeader );
|
||||
fWrapText->SetValue( cellData->bNoWrap );
|
||||
#endif
|
||||
|
||||
fCustomWidth->SetValue( (cellData->mask & CF_WIDTH) ? cellData->bWidthDefined : 2 );
|
||||
#if FIRST_PASS_AT_MASK
|
||||
fCustomWidth->SetValue( cellDataMask.bWidth ? cellData->bWidthDefined : 2 );
|
||||
#else
|
||||
fCustomWidth->SetValue( cellData->bWidthDefined );
|
||||
#endif
|
||||
if ( cellData->bWidthDefined )
|
||||
{
|
||||
fWidthEditText->SetValue( cellData->iWidth );
|
||||
@@ -2708,7 +2698,11 @@ void CEDTableCellContain::ControlsFromPref()
|
||||
fWidthPopup->SetValue( kPercentOfWindowItem );
|
||||
}
|
||||
|
||||
fCustomHeight->SetValue( (cellData->mask & CF_HEIGHT) ? cellData->bHeightDefined : 2 );
|
||||
#if FIRST_PASS_AT_MASK
|
||||
fCustomHeight->SetValue( cellDataMask.bHeight ? cellData->bHeightDefined : 2 );
|
||||
#else
|
||||
fCustomHeight->SetValue( cellData->bHeightDefined );
|
||||
#endif
|
||||
if ( cellData->bHeightDefined )
|
||||
{
|
||||
fHeightEditText->SetValue(cellData->iHeight);
|
||||
@@ -2720,7 +2714,7 @@ void CEDTableCellContain::ControlsFromPref()
|
||||
fHeightPopup->SetValue( kPercentOfWindowItem );
|
||||
}
|
||||
|
||||
fCustomColor->SetValue( (cellData->mask & CF_BACK_COLOR) ? cellData->pColorBackground != NULL : 2 );
|
||||
fCustomColor->SetValue( cellData->pColorBackground != NULL );
|
||||
RGBColor rgb;
|
||||
if ( cellData->pColorBackground )
|
||||
rgb = UGraphics::MakeRGBColor( *cellData->pColorBackground );
|
||||
@@ -2728,24 +2722,32 @@ void CEDTableCellContain::ControlsFromPref()
|
||||
rgb = UGraphics::MakeRGBColor( 0xFF, 0xFF, 0xFF ); // something pretty... (or, better yet, get the default color - yeah, right!)
|
||||
fColorCustomColor->SetColor( rgb );
|
||||
|
||||
mImageFileName->SetLongDescriptor( cellData->pBackgroundImage ? cellData->pBackgroundImage : "" );
|
||||
mUseImage->SetValue( (cellData->mask & CF_BACK_IMAGE) ? cellData->pBackgroundImage != NULL : 2 );
|
||||
mLeaveImage->SetValue( (cellData->mask & CF_BACK_NOSAVE) ? cellData->bBackgroundNoSave : 2 );
|
||||
if ( cellData->pBackgroundImage )
|
||||
{
|
||||
mImageFileName->SetLongDescriptor( cellData->pBackgroundImage );
|
||||
// turn on after we set the descriptor so we don't handle as click when msg is broadcast
|
||||
TurnOn( mUseImage );
|
||||
}
|
||||
mLeaveImage->SetValue( cellData->bBackgroundNoSave );
|
||||
|
||||
LView* extrahtmlbutton = (LView *)FindPaneByID( 'Xtra' );
|
||||
XP_ASSERT( extrahtmlbutton != NULL );
|
||||
if ( (cellData->mask & CF_EXTRA_HTML) )
|
||||
#if FIRST_PASS_AT_MASK
|
||||
if ( cellDataMask.bExtraHTML )
|
||||
#endif
|
||||
{
|
||||
extrahtmlbutton->Enable();
|
||||
pExtra = cellData->pExtra;
|
||||
cellData->pExtra = NULL; // don't let backend free!
|
||||
}
|
||||
#if FIRST_PASS_AT_MASK
|
||||
else
|
||||
{
|
||||
/* don't agree; disable for now */
|
||||
extrahtmlbutton->Disable();
|
||||
pExtra = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
EDT_FreeTableCellData(cellData);
|
||||
AdjustEnable();
|
||||
@@ -2810,47 +2812,30 @@ void CEDTableCellContain::ListenToMessage( MessageT inMessage, void* /* ioParam
|
||||
{
|
||||
switch ( inMessage )
|
||||
{
|
||||
case 'TsPU': /* popup menu item was changed */
|
||||
case 'PREV':
|
||||
case 'NEXT':
|
||||
/* AllFieldsOK?, Cancel->Close, Apply */
|
||||
// CEditDialog::ListenToMessage( msg_Apply, NULL );
|
||||
|
||||
/* approprate selection */
|
||||
ED_HitType moveType = ED_HIT_SEL_CELL;
|
||||
LGAPopup * tableSelectionPopup = (LGAPopup*)FindPaneByID( 'TsPU' );
|
||||
if ( tableSelectionPopup )
|
||||
{
|
||||
switch ( tableSelectionPopup->GetValue() )
|
||||
{
|
||||
case 1: /* cell */
|
||||
moveType = ED_HIT_SEL_CELL;
|
||||
break;
|
||||
|
||||
case 2: /* row */
|
||||
moveType = ED_HIT_SEL_ROW;
|
||||
break;
|
||||
|
||||
case 3: /* column */
|
||||
moveType = ED_HIT_SEL_COL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ED_MoveSelType moveDirection;
|
||||
if (inMessage == 'PREV')
|
||||
moveDirection = ED_MOVE_PREV;
|
||||
else if (inMessage == 'NEXT')
|
||||
moveDirection = ED_MOVE_NEXT;
|
||||
else if (inMessage == 'TsPU')
|
||||
moveDirection = ED_MOVE_NONE;
|
||||
|
||||
EDT_ChangeTableSelection( fContext, moveType, moveDirection, NULL );
|
||||
/* select next */
|
||||
/* HACK ALERT!!!!!!! For now, let's just tab to the next cell */
|
||||
EDT_TabKey( fContext, true, false );
|
||||
|
||||
/* fill in new data */
|
||||
ControlsFromPref();
|
||||
break;
|
||||
|
||||
case 'PREV':
|
||||
/* AllFieldsOK */
|
||||
/* Apply */
|
||||
|
||||
/* select next */
|
||||
/* HACK ALERT!!!!!!! For now, let's just tab to the previous cell */
|
||||
EDT_TabKey( fContext, false, false );
|
||||
|
||||
/* fill in new data */
|
||||
SysBeep(0);
|
||||
break;
|
||||
|
||||
case 'cwth':
|
||||
case 'chgt':
|
||||
case 'cclr':
|
||||
|
||||
@@ -76,6 +76,9 @@ public:
|
||||
static Boolean Start(ResIDT inWindowID, MWContext * context = NULL, short initTabValue = 0, Boolean insert = FALSE);
|
||||
|
||||
Boolean AllowSubRemoval( LCommander *inSub );
|
||||
void FindCommandStatus( CommandT inCommand, Boolean &outEnabled,
|
||||
Boolean&, Char16&, Str255);
|
||||
virtual void ListenToMessage( MessageT inMessage, void* ioParam );
|
||||
|
||||
virtual void InitializeDialogControls() = NULL;
|
||||
|
||||
@@ -757,9 +760,6 @@ public:
|
||||
virtual Boolean AllFieldsOK();
|
||||
|
||||
protected:
|
||||
LGAEditField* fNumRowsEditText;
|
||||
LGAEditField* fNumColsEditText;
|
||||
|
||||
LControl* fBorderCheckBox;
|
||||
LGAEditField* fBorderWidthEditText;
|
||||
LGAEditField* fCellSpacingEditText;
|
||||
|
||||
@@ -1,247 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "rosetta.h"
|
||||
#include "CABContainerDialogs.h"
|
||||
#include "ABcom.h"
|
||||
#ifdef MOZ_NEWADDR
|
||||
#include "xp_mcom.h"
|
||||
#include "msgnet.h"
|
||||
#include "prefapi.h"
|
||||
#include "dirprefs.h"
|
||||
|
||||
#include "CValidEditField.h"
|
||||
|
||||
#include "RandomFrontEndCrap.h"
|
||||
|
||||
#include "pascalString.h"
|
||||
|
||||
|
||||
#include "CTSMEditField.h"
|
||||
#include "LGAPushButton.h"
|
||||
#include "LGACheckbox.h"
|
||||
#include "LGADialogBox.h"
|
||||
#include "UmodalDialogs.h"
|
||||
#include "PP_Messages.h"
|
||||
#include "macgui.h"
|
||||
|
||||
CLDAPPropertyDialogManager::CLDAPPropertyDialogManager( DIR_Server* server, MSG_Pane* inPane )
|
||||
{
|
||||
StDialogHandler dialogHandler( eLDAPServerPropertiesDialogResID, NULL );
|
||||
LGADialogBox* dialog = dynamic_cast<LGADialogBox*>( dialogHandler.GetDialog() ) ;
|
||||
Assert_( dialog );
|
||||
Setup( dialog, server );
|
||||
|
||||
if( dialog )
|
||||
{
|
||||
dialog->Show();
|
||||
MessageT theMessage = msg_Nothing;
|
||||
while ( (theMessage != msg_Cancel) && (theMessage != msg_OK) )
|
||||
{
|
||||
theMessage = dialogHandler.DoDialog();
|
||||
switch( theMessage )
|
||||
{
|
||||
case cmd_HelpButton: // help button
|
||||
// ShowHelp(mHelpTopic);
|
||||
break;
|
||||
|
||||
// toggle the port numbers in the port field
|
||||
case eGarbledBox:
|
||||
Int32 value = eLDAPStandardPort;
|
||||
if (mGarbledBox->GetValue())
|
||||
value = eLDAPGarbledPort;
|
||||
mPortNumber->SetValue(eLDAPGarbledPort);
|
||||
break;
|
||||
|
||||
case eUpdateButton:
|
||||
UpdateDirServerToUI ();
|
||||
// The Net_ReplicationDirectory call requires that this flag be set
|
||||
DIR_ForceFlag( mServer, DIR_REPLICATION_ENABLED, true );
|
||||
NET_ReplicateDirectory( NULL, mServer );
|
||||
break;
|
||||
case msg_OK:
|
||||
|
||||
if( !UpdateDirServerToUI() )
|
||||
theMessage = msg_Nothing;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( theMessage == msg_OK )
|
||||
{
|
||||
// I think I am supposed to go context digging for the pane?
|
||||
AB_UpdateDIRServerForContainerPane( inPane, mServer );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Boolean CLDAPPropertyDialogManager::UpdateDirServerToUI()
|
||||
{
|
||||
// first check to make sure that the two validated edit fields are ok. If not,
|
||||
// then break out of here and don't accept the OK, forcing the user to
|
||||
// fix them.
|
||||
Boolean rtnValue = true;
|
||||
if ( !MaxHitsValidationFunc(mPortNumber) || !PortNumberValidationFunc(mMaxHits) )
|
||||
rtnValue = false;
|
||||
|
||||
XP_FREEIF(mServer->searchBase);
|
||||
XP_FREEIF(mServer->serverName);
|
||||
XP_FREEIF(mServer->description);
|
||||
|
||||
CStr255 pBuffer;
|
||||
mDescription->GetDescriptor(pBuffer);
|
||||
mServer->description = XP_STRDUP(CStr255( pBuffer ) );
|
||||
mLdapServer->GetDescriptor(pBuffer);
|
||||
mServer->serverName = XP_STRDUP(CStr255( pBuffer ));
|
||||
mSearchRoot->GetDescriptor(pBuffer);
|
||||
mServer->searchBase = XP_STRDUP(CStr255( pBuffer ));
|
||||
|
||||
DIR_ForceFlag( mServer, DIR_REPLICATION_ENABLED, mDownloadCheckBox->GetValue( ) );
|
||||
mServer->port = mPortNumber->GetValue();
|
||||
mServer->maxHits = mMaxHits->GetValue();
|
||||
|
||||
HG51388
|
||||
mServer->savePassword = mSavePasswordBox->GetValue()? true: false;
|
||||
DIR_SetServerFileName(mServer, mServer->serverName);
|
||||
return rtnValue;
|
||||
}
|
||||
|
||||
|
||||
void CLDAPPropertyDialogManager::Setup( LGADialogBox* inDialog , DIR_Server *inServer )
|
||||
{
|
||||
mServer = inServer;
|
||||
|
||||
mDescription = (CTSMEditField *) inDialog->FindPaneByID(eDescriptionEditField);
|
||||
XP_ASSERT(mDescription);
|
||||
mLdapServer = (LEditField *) inDialog->FindPaneByID(eLDAPServerEditField);
|
||||
XP_ASSERT(mLdapServer);
|
||||
mSearchRoot = (LEditField *) inDialog->FindPaneByID(eSearchRootEditField);
|
||||
XP_ASSERT(mSearchRoot);
|
||||
mPortNumber = (CValidEditField *) inDialog->FindPaneByID(ePortNumberEditField);
|
||||
XP_ASSERT(mPortNumber);
|
||||
mMaxHits = (CValidEditField *) inDialog->FindPaneByID(eMaxHitsEditField);
|
||||
XP_ASSERT(mMaxHits);
|
||||
mGarbledBox = (LGACheckbox *) inDialog->FindPaneByID(eGarbledBox);
|
||||
XP_ASSERT(mGarbledBox);
|
||||
mSavePasswordBox = dynamic_cast<LGACheckbox *>(inDialog->FindPaneByID ( eSaveLDAPServerPasswordBox) );
|
||||
Assert_( mSavePasswordBox );
|
||||
mDownloadCheckBox = dynamic_cast<LGACheckbox* >( inDialog->FindPaneByID ( eDownloadCheckBox ) );
|
||||
Assert_( mDownloadCheckBox );
|
||||
|
||||
UReanimator::LinkListenerToControls( inDialog, inDialog, eLDAPServerPropertiesDialogResID );
|
||||
|
||||
mPortNumber->SetValidationFunction(PortNumberValidationFunc);
|
||||
mMaxHits->SetValidationFunction(MaxHitsValidationFunc);
|
||||
|
||||
mDescription->SetDescriptor(CStr255( mServer->description) );
|
||||
mLdapServer->SetDescriptor(CStr255 (mServer->serverName ));
|
||||
mSearchRoot->SetDescriptor(CStr255( mServer->searchBase ));
|
||||
mDownloadCheckBox->SetValue( DIR_TestFlag( mServer, DIR_REPLICATION_ENABLED ) );
|
||||
mPortNumber->SetValue(mServer->port);
|
||||
mMaxHits->SetValue(mServer->maxHits);
|
||||
|
||||
HG51389
|
||||
mSavePasswordBox->SetValue(mServer->savePassword ? 1: 0);
|
||||
|
||||
// If the directories are locked, disable everything but cancel so the user can't make any changes. This
|
||||
// allows them to view the information but not edit it.
|
||||
XP_Bool serversLocked = PREF_PrefIsLocked("ldap_1.number_of_directories");
|
||||
if ( serversLocked )
|
||||
{
|
||||
inDialog->Disable();
|
||||
LGAPushButton *canelButton = (LGAPushButton *)(inDialog->FindPaneByID('CnBt') );
|
||||
XP_ASSERT(canelButton);
|
||||
canelButton->Enable();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Boolean CLDAPPropertyDialogManager::PortNumberValidationFunc(CValidEditField *portNumber)
|
||||
// Makes sure the port number field of the dialog is between 0 and 32767, but sets
|
||||
// a reasonable default if the field is left blank.
|
||||
{
|
||||
Boolean result;
|
||||
Str255 currentValue;
|
||||
portNumber->GetDescriptor(currentValue);
|
||||
if (!currentValue[0])
|
||||
{
|
||||
portNumber->SetValue(eLDAPStandardPort);
|
||||
HG51387
|
||||
portNumber->SelectAll();
|
||||
result = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = ConstrainEditField(portNumber, 0, 32767);
|
||||
}
|
||||
if (!result)
|
||||
{
|
||||
StPrepareForDialog prepare;
|
||||
::StopAlert(1068, NULL);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Boolean CLDAPPropertyDialogManager::MaxHitsValidationFunc(CValidEditField *maxHits)
|
||||
// Makes sure the max hits field of the dialog is between 1 and 65535.
|
||||
{
|
||||
Boolean result;
|
||||
result = ConstrainEditField(maxHits, 1, 65535);
|
||||
if (!result)
|
||||
{
|
||||
// If it was constrained to 1 then make it 100 instead.
|
||||
if (1 == maxHits->GetValue() )
|
||||
{
|
||||
maxHits->SetValue(100);
|
||||
maxHits->SelectAll();
|
||||
}
|
||||
StPrepareForDialog prepare;
|
||||
::StopAlert(1069, NULL);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#pragma mark --CPABPropertyDialogManager--
|
||||
CPABPropertyDialogManager::CPABPropertyDialogManager( DIR_Server *inServer, MSG_Pane* inPane )
|
||||
{
|
||||
StDialogHandler dialogHandler( ePABPropertyWindowID, NULL );
|
||||
LGADialogBox* dialog = dynamic_cast<LGADialogBox*>( dialogHandler.GetDialog() ) ;
|
||||
Assert_( dialog );
|
||||
|
||||
LGAEditField* nameField = dynamic_cast<LGAEditField*>( dialog->FindPaneByID( eNamePaneID ) );
|
||||
nameField->SetDescriptor( CStr255 ( inServer->description ) );
|
||||
|
||||
MessageT theMessage = msg_Nothing;
|
||||
while ( (theMessage != msg_Cancel) && (theMessage != msg_OK) )
|
||||
{
|
||||
theMessage = dialogHandler.DoDialog();
|
||||
}
|
||||
|
||||
if ( theMessage == msg_OK )
|
||||
{
|
||||
XP_FREEIF( inServer->description );
|
||||
CStr255 pBuffer;
|
||||
nameField->GetDescriptor(pBuffer);
|
||||
inServer->description = XP_STRDUP(CStr255( pBuffer ) );
|
||||
AB_UpdateDIRServerForContainerPane( inPane, inServer );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,95 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
typedef struct MSG_Pane MSG_Pane;
|
||||
typedef struct DIR_Server DIR_Server;
|
||||
class CValidEditField;
|
||||
class LEditField;
|
||||
class LGACheckbox;
|
||||
class LGADialogBox;
|
||||
class CTSMEditField;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ CLDAPPropertyDialogManager
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
class CLDAPPropertyDialogManager
|
||||
{
|
||||
public:
|
||||
CLDAPPropertyDialogManager( DIR_Server* ioServer, MSG_Pane* inPane );
|
||||
private:
|
||||
Boolean UpdateDirServerToUI();
|
||||
void Setup( LGADialogBox* inDialog , DIR_Server *inServer );
|
||||
|
||||
|
||||
public:
|
||||
// PUBLIC CONSTANTS
|
||||
enum {
|
||||
class_ID = 'LDSP',
|
||||
eLDAPServerPropertiesDialogResID = 12002,
|
||||
cmd_HelpButton = 3
|
||||
};
|
||||
|
||||
// Port ID's
|
||||
enum {
|
||||
eLDAPStandardPort = 389,
|
||||
eLDAPGarbledPort = 636
|
||||
};
|
||||
|
||||
// Pane ID's for dialog
|
||||
enum {
|
||||
eDescriptionEditField = 10,
|
||||
eLDAPServerEditField,
|
||||
eSearchRootEditField,
|
||||
ePortNumberEditField,
|
||||
eMaxHitsEditField,
|
||||
eGarbledBox = 20,
|
||||
eSaveLDAPServerPasswordBox = 21,
|
||||
eUpdateButton = 22,
|
||||
eDownloadCheckBox = 23
|
||||
};
|
||||
|
||||
static Boolean MaxHitsValidationFunc(CValidEditField *maxHits) ;
|
||||
static Boolean PortNumberValidationFunc(CValidEditField *portNumber) ;
|
||||
private:
|
||||
const char* mHelpTopic; // help string for NetHelp
|
||||
DIR_Server* mServer; // the LDAP server
|
||||
|
||||
CTSMEditField* mDescription; // Items in dialog
|
||||
LEditField* mLdapServer;
|
||||
LEditField* mSearchRoot;
|
||||
CValidEditField* mPortNumber;
|
||||
CValidEditField* mMaxHits;
|
||||
LGACheckbox* mGarbledBox;
|
||||
LGACheckbox* mSavePasswordBox;
|
||||
LGACheckbox* mDownloadCheckBox;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ CPABPropertyDialogManager
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
class CPABPropertyDialogManager
|
||||
{
|
||||
enum { eNamePaneID = 'NmEd' };
|
||||
enum { ePABPropertyWindowID = 8995 };
|
||||
public:
|
||||
CPABPropertyDialogManager( DIR_Server *inServer, MSG_Pane* inPane );
|
||||
};
|
||||
@@ -1,327 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* 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) 1997 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
|
||||
// CAddressBookViews.h
|
||||
|
||||
#include "CMailFlexTable.h"
|
||||
|
||||
#include "PascalString.h"
|
||||
#include "abcom.h"
|
||||
#include "dirprefs.h"
|
||||
|
||||
class CSearchEditField;
|
||||
class LDividedView;
|
||||
class LGAPushButton;
|
||||
class CPatternProgressCaption;
|
||||
|
||||
// These should be replaced as there is a JS pref
|
||||
enum { eDontCheckTypedown = 0xFFFFFFFF, eCheckTypedownInterval = 30 /* 1/2 sec */ , eNewTarget = 'NwTg'};
|
||||
|
||||
struct SAddressDelayedDragInfo;
|
||||
|
||||
#pragma mark CAddressBookPane
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ CAddressBookPane
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
class CAddressBookPane : public CMailFlexTable, public LPeriodical
|
||||
{
|
||||
private:
|
||||
typedef CMailFlexTable Inherited;
|
||||
|
||||
public:
|
||||
enum EColType
|
||||
{ // Sort column header ids
|
||||
eTableHeaderBase = 'col0'
|
||||
, eCol0 = eTableHeaderBase
|
||||
, eCol1
|
||||
, eCol2
|
||||
, eCol3
|
||||
, eCol4
|
||||
, eCol5
|
||||
, eCol6
|
||||
};
|
||||
|
||||
enum
|
||||
{ // Command sort
|
||||
cmd_SortAscending = 'Ascd'
|
||||
, cmd_SortDescending = 'Dscd'
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
eInvalidCachedRowIDType = 0x7FFFFFFF
|
||||
, eNewEntryID = 0x7FFFFFFF
|
||||
, eInvalidEntryID = 0
|
||||
};
|
||||
|
||||
enum
|
||||
{ // Icon resource IDs
|
||||
ics8_Person = 15260
|
||||
, ics8_List = 15263
|
||||
};
|
||||
|
||||
CAddressBookPane(LStream *inStream);
|
||||
|
||||
|
||||
UInt32 SortTypeFromColumnType(EColType inColType);
|
||||
AB_CommandType SortCommandFromColumnType(EColType inColType);
|
||||
|
||||
virtual Boolean ObeyCommand(CommandT inCommand, void *ioParam);
|
||||
virtual void FindCommandStatus(CommandT inCommand, Boolean &outEnabled,
|
||||
Boolean &outUsesMark, Char16 &outMark,
|
||||
Str255 outName);
|
||||
|
||||
virtual void DeleteSelection();
|
||||
virtual AB_ContainerInfo* GetContainer( TableIndexT /* inRow */ ) { return mContainer; }
|
||||
Boolean CurrentBookIsPersonalBook();
|
||||
virtual void PaneChanged( MSG_Pane *inPane, MSG_PANE_CHANGED_NOTIFY_CODE inNotifyCode, int32 value);
|
||||
virtual Boolean CellInitiatesDrag(const STableCell &/*inCell*/) const { return true; }
|
||||
virtual Boolean ItemIsAcceptable( DragReference inDragRef, ItemReference inItemRef );
|
||||
protected:
|
||||
virtual void GetCellDisplayData(const STableCell &inCell, ResIDT &ioIcon, CStr255 &ioDisplayString );
|
||||
virtual void DestroyMessagePane(MSG_Pane* inPane);
|
||||
virtual void SpendTime(const EventRecord &inMacEvent);
|
||||
virtual Boolean CellHasDropFlag(const STableCell &/*inCell*/, Boolean &/*outIsExpanded*/) const { return false; }
|
||||
virtual void DrawCellContents(const STableCell &inCell, const Rect &inLocalRect);
|
||||
|
||||
|
||||
|
||||
AB_AttribID GetAttribForColumn( TableIndexT col );
|
||||
virtual ResIDT GetIconID(TableIndexT inRow) const;
|
||||
void DrawCellText( const STableCell& inCell, const Rect& inLocalRect, AB_AttribID inAttrib );
|
||||
|
||||
|
||||
|
||||
virtual void OpenRow(TableIndexT inRow);
|
||||
void SetCellExpansion( const STableCell& inCell, Boolean inExpanded);
|
||||
|
||||
virtual Boolean RowCanAcceptDrop(
|
||||
DragReference inDragRef,
|
||||
TableIndexT inDropRow);
|
||||
virtual Boolean RowCanAcceptDropBetweenAbove(
|
||||
DragReference inDragRef,
|
||||
TableIndexT inDropRow);
|
||||
virtual void ReceiveDragItem(
|
||||
DragReference inDragRef,
|
||||
DragAttributes inDragAttrs,
|
||||
ItemReference inItemRef,
|
||||
Rect& inItemBounds);
|
||||
protected:
|
||||
AB_ContainerInfo* mContainer;
|
||||
AB_CommandType mColumnSortCommand[7];
|
||||
AB_AttribID mColumnAttribID[7];
|
||||
// Delayed drag info
|
||||
SAddressDelayedDragInfo *mDelayedDragInfo;
|
||||
};
|
||||
|
||||
#pragma mark CAddressBookTableView
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ CAddressBookTableView
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
class CAddressBookTableView : public CAddressBookPane
|
||||
{
|
||||
private:
|
||||
typedef CAddressBookPane Inherited;
|
||||
|
||||
public:
|
||||
enum { class_ID = 'AbTb' };
|
||||
enum { eTableEditField = 'TbEd' };
|
||||
|
||||
CAddressBookTableView(LStream *inStream) :
|
||||
CAddressBookPane(inStream),mIsLDAPSearching ( false ) {
|
||||
|
||||
};
|
||||
|
||||
virtual ~CAddressBookTableView();
|
||||
|
||||
Boolean LoadAddressBook( AB_ContainerInfo* inContainer, MWContext* inContext );
|
||||
void SetColumnHeaders();
|
||||
virtual void ChangeSort(const LTableHeader::SortChange *inSortChange);
|
||||
void UpdateToTypedownText(CStr255 inTypedownText);
|
||||
void ConferenceCall( );
|
||||
void SetLDAPSearching( Boolean inIsSearching ) { mIsLDAPSearching = inIsSearching; }
|
||||
char* GetFullAddress( TableIndexT inRow );
|
||||
Boolean IsLDAPSearching() const { return mIsLDAPSearching; }
|
||||
protected:
|
||||
|
||||
virtual void ChangeFinished(MSG_Pane *inPane, MSG_NOTIFY_CODE inChangeCode,
|
||||
TableIndexT inStartRow, SInt32 inRowCount);
|
||||
virtual void AddRowDataToDrag(TableIndexT inRow, DragReference inDragRef);
|
||||
virtual void EnableStopButton(Boolean inBusy);
|
||||
private:
|
||||
Boolean mIsLDAPSearching;
|
||||
};
|
||||
|
||||
|
||||
#pragma mark CMailingListTableView
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ CMailingListTableView
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
class CMailingListTableView : public CAddressBookPane
|
||||
{
|
||||
|
||||
private:
|
||||
typedef CAddressBookPane Inherited;
|
||||
|
||||
public:
|
||||
enum { class_ID = 'AlTb' };
|
||||
|
||||
enum { // Broadcast messages
|
||||
msg_EntriesAddedToList = 'EnAd' // this
|
||||
, msg_EntriesRemovedFromList ='EnRe'
|
||||
};
|
||||
|
||||
CMailingListTableView(LStream *inStream) :
|
||||
CAddressBookPane(inStream) {
|
||||
|
||||
};
|
||||
|
||||
virtual ~CMailingListTableView();
|
||||
void LoadMailingList( MSG_Pane* inPane );
|
||||
virtual AB_ContainerInfo* GetContainer( TableIndexT inRow );
|
||||
|
||||
protected:
|
||||
virtual void GetCellDisplayData(const STableCell &inCell, ResIDT& ioIcon, CStr255 &ioDisplayString );
|
||||
virtual void DestroyMessagePane(MSG_Pane* inPane);
|
||||
};
|
||||
|
||||
#pragma mark CAddressBookContainerView
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ CAddressBookContainerView
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
class CAddressBookContainerView : public CAddressBookPane
|
||||
{
|
||||
private:
|
||||
typedef CAddressBookPane Inherited;
|
||||
|
||||
public:
|
||||
enum { class_ID = 'AcTb' };
|
||||
|
||||
// Place holders while I wait for the final art work
|
||||
enum {
|
||||
ics8_LDAP = CAddressBookPane::ics8_Person ,
|
||||
ics8_List = CAddressBookPane::ics8_List ,
|
||||
ics8_PAB = CAddressBookPane::ics8_Person
|
||||
};
|
||||
|
||||
CAddressBookContainerView(LStream *inStream);
|
||||
virtual ~CAddressBookContainerView();
|
||||
|
||||
void Setup( MWContext* inContext);
|
||||
virtual AB_ContainerInfo* GetContainer( TableIndexT inRow );
|
||||
void SetIndexToSelectOnLoad( Int32 index){ mDirectoryRowToLoad = index; }
|
||||
protected:
|
||||
virtual Boolean CellHasDropFlag( const STableCell& inCell, Boolean& outIsExpanded) const;
|
||||
virtual UInt16 GetNestedLevel(TableIndexT inRow) const;
|
||||
virtual ResIDT GetIconID(TableIndexT inRow) const;
|
||||
|
||||
void DrawCellText( const STableCell& inCell, const Rect& inLocalRect );
|
||||
virtual void DrawCellContents( const STableCell& inCell, const Rect& inLocalRect );
|
||||
virtual void DrawIconsSelf( const STableCell& inCell, IconTransformType inTransformType, const Rect& inIconRect) const;
|
||||
private:
|
||||
MWContext* mContext;
|
||||
Int32 mDirectoryRowToLoad;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#pragma mark CAddressBookController
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ CAddressBookController
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
class CAddressBookController:public LView,
|
||||
public LListener, public LPeriodical, public LCommander
|
||||
{
|
||||
private:
|
||||
typedef LView Inherited;
|
||||
|
||||
public:
|
||||
enum { class_ID = 'AbCn' };
|
||||
enum {
|
||||
paneID_DirServers = 'DRSR' // CDirServersPopupMenu *, this
|
||||
, paneID_Search = 'SRCH' // MSG_Pane *, search button
|
||||
, paneID_Stop = 'STOP' // nil, stop button
|
||||
, paneID_AddressBookTable = 'Tabl' // Address book table
|
||||
, paneID_TypedownName = 'TYPE' // Typedown name search edit field in window
|
||||
, paneID_SearchEnclosure = 'SCHE' // Enclosure for search items
|
||||
, paneID_DividedView = 'A2Vw' // the divided view
|
||||
, paneID_ContainerView = 'AcTb',
|
||||
paneID_DirectoryName = 'DiCp' // Directory caption
|
||||
};
|
||||
|
||||
|
||||
CAddressBookController(LStream* inStream );
|
||||
~CAddressBookController();
|
||||
|
||||
virtual void ReadStatus(LStream *inStatusData);
|
||||
virtual void WriteStatus(LStream *outStatusData);
|
||||
CAddressBookTableView* GetAddressBookTable() const { return mAddressBookTable; }
|
||||
CAddressBookContainerView* GetAddressBookContainerView() const { return mABContainerView; }
|
||||
virtual Boolean HandleKeyPress(const EventRecord &inKeyEvent);
|
||||
virtual Boolean ObeyCommand(CommandT inCommand, void *ioParam);
|
||||
virtual void FindCommandStatus(CommandT inCommand, Boolean &outEnabled,
|
||||
Boolean &outUsesMark, Char16 &outMark,
|
||||
Str255 outName);
|
||||
protected:
|
||||
|
||||
virtual void FinishCreateSelf();
|
||||
virtual void ListenToMessage(MessageT inMessage, void *ioParam);
|
||||
|
||||
virtual void SpendTime(const EventRecord &inMacEvent);
|
||||
virtual void ActivateSelf() {
|
||||
StartRepeating();
|
||||
Inherited::ActivateSelf();
|
||||
}
|
||||
|
||||
virtual void DeactivateSelf() {
|
||||
StopRepeating();
|
||||
Inherited::DeactivateSelf();
|
||||
}
|
||||
public:
|
||||
|
||||
void SelectDirectoryServer( AB_ContainerInfo* inContainer );
|
||||
void SetContext( MWContext* inContext) { mContext = inContext; }
|
||||
|
||||
protected:
|
||||
void Search();
|
||||
void StopSearch( );
|
||||
|
||||
protected:
|
||||
MWContext* mContext;
|
||||
UInt32 mNextTypedownCheckTime;
|
||||
|
||||
CSearchEditField* mTypedownName;
|
||||
LDividedView* mDividedView;
|
||||
CAddressBookTableView* mAddressBookTable;
|
||||
CMailNewsContext* mAddressBookContext;
|
||||
|
||||
CAddressBookContainerView* mABContainerView;
|
||||
|
||||
LGAPushButton* mSearchButton;
|
||||
LGAPushButton* mStopButton;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -1,299 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* 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) 1997 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
// CAddressBookWindows.h
|
||||
|
||||
#pragma once
|
||||
#include "abcom.H"
|
||||
#ifdef MOZ_NEWADDR
|
||||
class CComposeAddressTableView;
|
||||
/*====================================================================================*/
|
||||
#pragma mark INCLUDE FILES
|
||||
/*====================================================================================*/
|
||||
|
||||
#include "CMailNewsWindow.h"
|
||||
#include "CMailNewsContext.h"
|
||||
#include "LGADialogBox.h"
|
||||
#include "MailNewsCallbacks.h"
|
||||
|
||||
|
||||
class CSearchEditField;
|
||||
class LBroadcasterEditField;
|
||||
class CNamePropertiesWindow;
|
||||
class CListPropertiesWindow;
|
||||
class CMailingListTableView;
|
||||
class CAddressBookController;
|
||||
#pragma mark -
|
||||
/*====================================================================================*/
|
||||
#pragma mark TYPEDEFS
|
||||
/*====================================================================================*/
|
||||
typedef struct DIR_Server DIR_Server;
|
||||
typedef struct _XP_List XP_List;
|
||||
typedef UInt32 ABID;
|
||||
|
||||
|
||||
|
||||
#pragma mark -
|
||||
/*====================================================================================*/
|
||||
#pragma mark CONSTANTS
|
||||
/*====================================================================================*/
|
||||
|
||||
// Save window status version
|
||||
|
||||
static const UInt16 cAddressSaveWindowStatusVersion = 0x0219;
|
||||
static const UInt16 cNamePropertiesSaveWindowStatusVersion = 0x0202;
|
||||
static const UInt16 cListPropertiesSaveWindowStatusVersion = 0x0202;
|
||||
|
||||
#pragma mark -
|
||||
|
||||
extern "C"
|
||||
{
|
||||
int MacFe_ShowModelessPropertySheetForAB2( MSG_Pane * pane, MWContext* inContext);
|
||||
int MacFE_ShowPropertySheetForDir(
|
||||
DIR_Server* server, MWContext* context, MSG_Pane * srcPane, XP_Bool newDirectory );
|
||||
}
|
||||
class CAddressBookWindow;
|
||||
|
||||
|
||||
class CAddressBookManager
|
||||
{
|
||||
public:
|
||||
|
||||
// Should be called when the application starts up
|
||||
static void OpenAddressBookManager(void);
|
||||
// Should be called when the application closes
|
||||
static void CloseAddressBookManager(void);
|
||||
|
||||
static void ImportLDIF(const FSSpec& inSpec);
|
||||
|
||||
static CAddressBookWindow* ShowAddressBookWindow(void);
|
||||
|
||||
static XP_List *GetDirServerList(void);
|
||||
static void SetDirServerList(XP_List *inList, Boolean inSavePrefs = true);
|
||||
static DIR_Server *GetPersonalBook(void);
|
||||
|
||||
static void FailAddressError(Int32 inError);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
static void RegisterAddressBookClasses(void);
|
||||
static int DirServerListChanged(const char*, void*)
|
||||
{
|
||||
CAddressBookManager::sDirServerListChanged = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Instance variables
|
||||
|
||||
static XP_List *sDirServerList;
|
||||
static Boolean sDirServerListChanged;
|
||||
|
||||
};
|
||||
|
||||
class CAddressBookWindow : public CMailNewsWindow
|
||||
{
|
||||
private:
|
||||
typedef CMailNewsWindow Inherited;
|
||||
|
||||
public:
|
||||
|
||||
enum { class_ID = 'AbWn', pane_ID = class_ID, res_ID = 8900 };
|
||||
|
||||
// IDs for panes in associated view, also messages that are broadcast to this object
|
||||
enum {
|
||||
paneID_DirServers = 'DRSR' // CDirServersPopupMenu *, this
|
||||
, paneID_Search = 'SRCH' // MSG_Pane *, search button
|
||||
, paneID_Stop = 'STOP' // nil, stop button
|
||||
, paneID_AddressBookTable = 'Tabl' // Address book table
|
||||
, paneID_TypedownName = 'TYPE' // Typedown name search edit field in window
|
||||
, paneID_SearchEnclosure = 'SCHE' // Enclosure for search items
|
||||
, paneID_AddressBookController = 'AbCn'
|
||||
};
|
||||
|
||||
// Stream creator method
|
||||
|
||||
CAddressBookWindow(LStream *inStream) :
|
||||
CMailNewsWindow(inStream, WindowType_Address),
|
||||
mAddressBookController(nil)
|
||||
{
|
||||
SetPaneID(pane_ID);
|
||||
SetRefreshAllWhenResized(false);
|
||||
}
|
||||
virtual ~CAddressBookWindow();
|
||||
|
||||
virtual ResIDT GetStatusResID() const { return res_ID; }
|
||||
|
||||
static MWContext *GetMailContext();
|
||||
virtual CNSContext* CreateContext() const;
|
||||
virtual CMailFlexTable* GetActiveTable();
|
||||
|
||||
CAddressBookController* GetAddressBookController() const { return mAddressBookController; }
|
||||
protected:
|
||||
|
||||
// Overriden methods
|
||||
|
||||
virtual void FinishCreateSelf();
|
||||
|
||||
// Utility methods
|
||||
|
||||
virtual void ReadWindowStatus(LStream *inStatusData);
|
||||
virtual void WriteWindowStatus(LStream *outStatusData);
|
||||
virtual UInt16 GetValidStatusVersion() const { return cAddressSaveWindowStatusVersion; }
|
||||
|
||||
protected:
|
||||
CAddressBookController *mAddressBookController;
|
||||
};
|
||||
|
||||
|
||||
class CAddressBookChildWindow : public LGADialogBox
|
||||
{
|
||||
private:
|
||||
typedef LGADialogBox Inherited;
|
||||
|
||||
public:
|
||||
CAddressBookChildWindow(LStream *inStream) :
|
||||
Inherited (inStream), mMSGPane( NULL )
|
||||
{
|
||||
SetRefreshAllWhenResized(false);
|
||||
}
|
||||
|
||||
virtual void UpdateBackendToUI() = 0L;
|
||||
virtual void UpdateUIToBackend( MSG_Pane* inPane ) = 0L;
|
||||
|
||||
protected:
|
||||
// Overriden methods
|
||||
virtual void ListenToMessage(MessageT inMessage, void *ioParam = nil);
|
||||
virtual void UpdateTitle()=0;
|
||||
// Instance variables
|
||||
MSG_Pane* mMSGPane;
|
||||
};
|
||||
|
||||
class CListPropertiesWindow : public CAddressBookChildWindow {
|
||||
|
||||
private:
|
||||
typedef CAddressBookChildWindow Inherited;
|
||||
|
||||
public:
|
||||
enum { class_ID = 'LpWn', pane_ID = class_ID, res_ID = 8940 };
|
||||
|
||||
// IDs for panes in associated view, also messages that are broadcast to this object
|
||||
enum {
|
||||
paneID_Name = 'NAME'
|
||||
, paneID_Nickname = 'NICK'
|
||||
, paneID_Description = 'DESC'
|
||||
, paneID_AddressBookListTable = 'Tabl' // Address book list table
|
||||
};
|
||||
|
||||
CListPropertiesWindow(LStream *inStream);
|
||||
virtual ~CListPropertiesWindow();
|
||||
|
||||
virtual void UpdateBackendToUI();
|
||||
virtual void UpdateUIToBackend( MSG_Pane* inPane );
|
||||
|
||||
protected:
|
||||
virtual void FinishCreateSelf();
|
||||
virtual void DrawSelf();
|
||||
virtual void UpdateTitle();
|
||||
|
||||
// Instance variables
|
||||
CMailingListTableView *mAddressBookListTable;
|
||||
CSearchEditField *mTitleField;
|
||||
};
|
||||
|
||||
class CMailWindowCallbackListener: public CMailCallbackListener
|
||||
{
|
||||
void CMailWindowCallBackListener( LWindow* inWindow )
|
||||
{
|
||||
mWindow = inWindow;
|
||||
}
|
||||
private:
|
||||
virtual void PaneChanged(
|
||||
MSG_Pane* inPane,
|
||||
MSG_PANE_CHANGED_NOTIFY_CODE inNotifyCode,
|
||||
int32 value);
|
||||
LWindow *mWindow;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ CNamePropertiesWindow
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
class CNamePropertiesWindow : public CAddressBookChildWindow
|
||||
{
|
||||
private:
|
||||
typedef CAddressBookChildWindow Inherited;
|
||||
|
||||
public:
|
||||
|
||||
enum { class_ID = 'NpWn', pane_ID = class_ID, res_ID = 8930 };
|
||||
|
||||
// IDs for panes in associated view, also messages that are broadcast to this object
|
||||
enum {
|
||||
paneID_GeneralView = 'GNVW' // General preferences view
|
||||
, paneID_FirstName = 'FNAM'
|
||||
, paneID_LastName = 'LNAM'
|
||||
, paneID_DisplayName = 'DNAM'
|
||||
, paneID_EMail = 'EMAL'
|
||||
, paneID_Nickname = 'NICK'
|
||||
, paneID_Notes = 'NOTE'
|
||||
, paneID_PrefersHTML = 'HTML'
|
||||
, paneID_ContactView = 'CNVW' // Contact preferences view
|
||||
, paneID_Company = 'COMP'
|
||||
, paneID_Title = 'TITL'
|
||||
, paneID_Department = 'DPRT'
|
||||
, paneID_Address = 'ADDR'
|
||||
, paneID_City = 'CITY'
|
||||
, paneID_State = 'STAT'
|
||||
, paneID_ZIP = 'ZIP '
|
||||
, paneID_Country = 'Coun'
|
||||
, paneID_WorkPhone = 'WPHO'
|
||||
, paneID_FaxPhone = 'FPHO'
|
||||
, paneID_PagerPhone = 'PPHO'
|
||||
, paneID_HomePhone = 'HPHO'
|
||||
, paneID_CelluarPhone = 'CPHO'
|
||||
, paneID_SecurityView = 'SCVW' // Security preferences view
|
||||
, paneID_CooltalkView = 'CLVW' // Cooltalk preferences view
|
||||
, paneID_ConferenceAddress = 'CAED'
|
||||
, paneID_ConferenceServer = 'CnPu'
|
||||
, paneID_None = 'NONE'
|
||||
};
|
||||
|
||||
enum { // Broadcast messages
|
||||
paneID_ConferencePopup ='CoPU' // conference pop up button
|
||||
};
|
||||
|
||||
CNamePropertiesWindow(LStream *inStream);
|
||||
virtual void UpdateBackendToUI();
|
||||
void UpdateUIToBackend( MSG_Pane *inPane );
|
||||
void SetConferenceText( );
|
||||
|
||||
protected:
|
||||
virtual void FinishCreateSelf();
|
||||
virtual void ListenToMessage(MessageT inMessage, void *ioParam = nil);
|
||||
virtual void UpdateTitle();
|
||||
|
||||
private:
|
||||
int32 GetPaneAndAttribID( TableIndexT index, PaneIDT& outPaneID, AB_AttribID &outAttrib );
|
||||
PaneIDT FindPaneForAttribute ( AB_AttribID inAttrib );
|
||||
protected:
|
||||
CMailWindowCallbackListener mCallBackListener;
|
||||
LBroadcasterEditField *mFirstNameField;
|
||||
LBroadcasterEditField *mLastNameField;
|
||||
};
|
||||
#endif // NEWADDR
|
||||
@@ -1,274 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* 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) 1997 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
// CAddressPickerWindow.cp
|
||||
|
||||
#include "CAddressPickerWindow.h"
|
||||
// #include "CAddressBookWindows.h"
|
||||
#ifdef MOZ_NEWADDR
|
||||
#include "SearchHelpers.h"
|
||||
#include "CAddressBookViews.h"
|
||||
#include "xp_Help.h"
|
||||
#include "UStdDialogs.h"
|
||||
#include "libi18n.h"
|
||||
#include "CProgressListener.h"
|
||||
#include "StBlockingDialogHandler.h"
|
||||
#include "CKeyStealingAttachment.h"
|
||||
|
||||
// Code in the tables depends on recieving key up events hence this class
|
||||
class StKeyUpDialogHandler : public StBlockingDialogHandler
|
||||
{
|
||||
public:
|
||||
StKeyUpDialogHandler(
|
||||
ResIDT inDialogResID,
|
||||
LCommander* inSuper): StBlockingDialogHandler( inDialogResID, inSuper) {};
|
||||
void EventKeyUp(const EventRecord &inMacEvent)
|
||||
{
|
||||
/* if it's a CKeyUpReceiver, send the key up. We used to send keyups to
|
||||
* targets if a browser view was on duty, which had two disadvantages: it required
|
||||
* any potential targets in a browser view to handle a key up, and sometimes
|
||||
* the commander chain would be incorrect so key ups were sent to a target in a
|
||||
* view that was not on duty.
|
||||
*/
|
||||
if (dynamic_cast<CKeyUpReceiver *>(sTarget))
|
||||
sTarget->ProcessKeyPress(inMacEvent);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ DoPickerDialog
|
||||
//------------------------------------------------------------------------------
|
||||
// Bring up and runs the picker dialog
|
||||
//
|
||||
void CAddressPickerWindow::DoPickerDialog( CComposeAddressTableView* initialTable )
|
||||
{
|
||||
StKeyUpDialogHandler handler ( 8990, nil );
|
||||
CAddressPickerWindow* dialog = dynamic_cast< CAddressPickerWindow* >( handler.GetDialog() );
|
||||
dialog->Setup( initialTable );
|
||||
dialog->Show();
|
||||
MessageT message;
|
||||
do
|
||||
{
|
||||
message = handler.DoDialog();
|
||||
} while ( message != eOkayButton && message != eCancelButton ) ;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ CAddressPickerWindow
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
CAddressPickerWindow::CAddressPickerWindow(LStream *inStream)
|
||||
: Inherited( inStream ), CSaveWindowStatus( this ), mInitialTable( nil ), mPickerAddresses(nil),
|
||||
mAddressBookController(nil), mProgressListener( nil ), mMailNewsContext ( nil ), mLastAction ( eToButton )
|
||||
{
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ ~CAddressPickerWindow
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
CAddressPickerWindow::~CAddressPickerWindow()
|
||||
{
|
||||
if (mMailNewsContext)
|
||||
mMailNewsContext->RemoveUser(this);
|
||||
delete mProgressListener;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ Setup
|
||||
//------------------------------------------------------------------------------
|
||||
// Copies takes in a CComposeAddressTableView and copies its data to the picker bucket
|
||||
// The passed in table will be updated if necessary when the window is closed
|
||||
//
|
||||
void CAddressPickerWindow::Setup( CComposeAddressTableView* initialTable )
|
||||
{
|
||||
// Copy the old table to the new one
|
||||
Assert_( initialTable );
|
||||
Assert_( mPickerAddresses );
|
||||
|
||||
TableIndexT numRows;
|
||||
mInitialTable = initialTable;
|
||||
initialTable->GetNumRows(numRows);
|
||||
STableCell cell;
|
||||
Uint32 size;
|
||||
char* address = NULL;
|
||||
for ( int32 i = 1; i <= numRows; i++ )
|
||||
{
|
||||
EAddressType type = initialTable->GetRowAddressType( i );
|
||||
cell.row = i;
|
||||
cell.col = 2;
|
||||
size = sizeof(address);
|
||||
initialTable->GetCellData(cell, &address, size);
|
||||
mPickerAddresses->InsertNewRow( type, address, false );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ FinishCreateSelf
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
void CAddressPickerWindow::FinishCreateSelf()
|
||||
{
|
||||
Inherited::FinishCreateSelf();
|
||||
|
||||
mAddressBookController =
|
||||
dynamic_cast< CAddressBookController* >(FindPaneByID( CAddressBookWindow::paneID_AddressBookController) ) ;
|
||||
CSaveWindowStatus::FinishCreateWindow();
|
||||
|
||||
// Context creation
|
||||
mMailNewsContext = new CMailNewsContext( MWContextAddressBook);
|
||||
if (!mProgressListener)
|
||||
mProgressListener = new CProgressListener(this, mMailNewsContext);
|
||||
ThrowIfNULL_(mProgressListener);
|
||||
// The progress listener should be "just a bit" lazy during network activity
|
||||
mProgressListener->SetLaziness(CProgressListener::lazy_NotAtAll);
|
||||
mMailNewsContext->AddListener(mProgressListener);
|
||||
mMailNewsContext->AddUser(this);
|
||||
|
||||
mMailNewsContext->SetWinCSID(INTL_DocToWinCharSetID(mMailNewsContext->GetDefaultCSID()));
|
||||
|
||||
// Have the AddressBook Controller listen to the context
|
||||
mMailNewsContext->AddListener(mAddressBookController);
|
||||
mAddressBookController->SetContext( *mMailNewsContext );
|
||||
mAddressBookController->GetAddressBookContainerView()->Setup( *mMailNewsContext );
|
||||
mAddressBookController->GetAddressBookTable()->SetNotifyOnSelectionChange( true );
|
||||
mAddressBookController->GetAddressBookTable()->StartBroadcasting();
|
||||
|
||||
mPickerAddresses = dynamic_cast< CComposeAddressTableView* >( FindPaneByID( 'Addr' ) );
|
||||
FailNILRes_( mPickerAddresses );
|
||||
|
||||
(mAddressBookController->GetAddressBookTable() )->AddListener( this );
|
||||
UReanimator::LinkListenerToControls(this, this,CAddressPickerWindow:: res_ID);
|
||||
|
||||
// Setup KeySnatcher for our fancy default button behavior
|
||||
CKeyStealingAttachment* keyStealer = new CKeyStealingAttachment(this);
|
||||
mAddressBookController->GetAddressBookTable()->AddAttachment(keyStealer);
|
||||
mAddressBookController->GetAddressBookContainerView()->AddAttachment(keyStealer );
|
||||
keyStealer->StealKey( char_Enter );
|
||||
keyStealer->StealKey( char_Return );
|
||||
|
||||
|
||||
// Adjust button state
|
||||
ListenToMessage ( CStandardFlexTable::msg_SelectionChanged, nil );
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ ListenToMessage
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
void CAddressPickerWindow::ListenToMessage(MessageT inMessage, void * /* ioParam */ )
|
||||
{
|
||||
switch( inMessage )
|
||||
{
|
||||
case eOkayButton:
|
||||
SaveStatusInfo();
|
||||
CComposeAddressTableStorage* oldTableStorage =dynamic_cast< CComposeAddressTableStorage*> (mInitialTable->GetTableStorage() );
|
||||
mPickerAddresses->EndEditCell();
|
||||
mInitialTable->SetTableStorage( mPickerAddresses->GetTableStorage() );
|
||||
mInitialTable->Refresh();
|
||||
mPickerAddresses->SetTableStorage( oldTableStorage );
|
||||
break;
|
||||
|
||||
case eHelp:
|
||||
ShowHelp( HELP_SELECT_ADDRESSES );
|
||||
break;
|
||||
|
||||
case eToButton:
|
||||
mLastAction = eToButton;
|
||||
AddSelection ( eToType );
|
||||
break;
|
||||
|
||||
case eCcButton:
|
||||
mLastAction = eCcButton;
|
||||
AddSelection ( eCcType );
|
||||
break;
|
||||
|
||||
case eBccButton:
|
||||
mLastAction = eBccButton;
|
||||
AddSelection( eBccType );
|
||||
break;
|
||||
|
||||
case ePropertiesButton:
|
||||
break;
|
||||
|
||||
case CStandardFlexTable::msg_SelectionChanged:
|
||||
Boolean enable = mAddressBookController->GetAddressBookTable()->GetSelectedRowCount() >0;
|
||||
SetDefaultButton( mLastAction );
|
||||
USearchHelper::EnableDisablePane( USearchHelper::FindViewControl( this ,eToButton ), enable, true );
|
||||
USearchHelper::EnableDisablePane( USearchHelper::FindViewControl( this ,eCcButton ), enable, true );
|
||||
USearchHelper::EnableDisablePane( USearchHelper::FindViewControl( this ,eBccButton ), enable, true );
|
||||
USearchHelper::EnableDisablePane( USearchHelper::FindViewControl( this ,ePropertiesButton ), enable, true );
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ AddSelection
|
||||
//------------------------------------------------------------------------------
|
||||
// Adds the table selection to the address bucket.
|
||||
//
|
||||
//
|
||||
void CAddressPickerWindow::AddSelection( EAddressType inAddressType )
|
||||
{
|
||||
char* address = NULL;
|
||||
Uint32 size= sizeof(address);
|
||||
TableIndexT row = 0;
|
||||
|
||||
while ( mAddressBookController->GetAddressBookTable()->GetNextSelectedRow( row ) )
|
||||
{
|
||||
address = mAddressBookController->GetAddressBookTable()->GetFullAddress( row );
|
||||
mPickerAddresses->InsertNewRow( inAddressType, address, false );
|
||||
XP_FREE( address );
|
||||
}
|
||||
|
||||
SetDefaultButton( eOkayButton );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ ReadWindowStatus
|
||||
//------------------------------------------------------------------------------
|
||||
// Adjust the window to stored preferences.
|
||||
//
|
||||
void CAddressPickerWindow::ReadWindowStatus(LStream *inStatusData)
|
||||
{
|
||||
if ( inStatusData != nil )
|
||||
{
|
||||
mAddressBookController->ReadStatus( inStatusData );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ WriteWindowStatus
|
||||
//------------------------------------------------------------------------------
|
||||
// Write window stored preferences.
|
||||
//
|
||||
void CAddressPickerWindow::WriteWindowStatus(LStream *outStatusData)
|
||||
{
|
||||
mAddressBookController->WriteStatus(outStatusData);
|
||||
}
|
||||
|
||||
#endif //NEWADDR
|
||||
@@ -1,81 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* 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) 1997 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
|
||||
// CAddressPickerWindow.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "abcom.h"
|
||||
#ifdef MOZ_NEWADDR
|
||||
#include "LGADialogBox.h"
|
||||
#include "CSaveWindowStatus.h"
|
||||
#include "CComposeAddressTableView.h"
|
||||
class CAddressBookTableView;
|
||||
class CAddressBookController;
|
||||
class CMailNewsContext;
|
||||
static const UInt16 cAddressPickerWindowStatusVersion = 0x006;
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ CAddressPickerWindow
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
class CAddressPickerWindow : public LGADialogBox, public CSaveWindowStatus
|
||||
{
|
||||
public:
|
||||
static void DoPickerDialog( CComposeAddressTableView* initialTable );
|
||||
private:
|
||||
typedef LGADialogBox Inherited;
|
||||
public:
|
||||
enum { class_ID = 'ApWn', pane_ID = class_ID, res_ID = 8990 };
|
||||
|
||||
// Control IDs
|
||||
enum EButton {
|
||||
eOkayButton = 'OkBt',
|
||||
eCancelButton ='CnBt',
|
||||
eHelp ='help',
|
||||
eToButton = 'ToBt',
|
||||
eCcButton = 'CcBt',
|
||||
eBccButton = 'BcBt',
|
||||
ePropertiesButton = 'PrBt'
|
||||
} ;
|
||||
|
||||
CAddressPickerWindow(LStream *inStream);
|
||||
~CAddressPickerWindow();
|
||||
void Setup( CComposeAddressTableView* initialTable );
|
||||
|
||||
virtual ResIDT GetStatusResID() const { return res_ID; }
|
||||
protected:
|
||||
virtual void FinishCreateSelf();
|
||||
virtual void ListenToMessage(MessageT inMessage, void *ioParam);
|
||||
void AddSelection( EAddressType inAddressType );
|
||||
|
||||
virtual void ReadWindowStatus(LStream *inStatusData);
|
||||
virtual void WriteWindowStatus(LStream *outStatusData);
|
||||
virtual UInt16 GetValidStatusVersion() const { return cAddressPickerWindowStatusVersion; }
|
||||
|
||||
private:
|
||||
|
||||
CComposeAddressTableView* mInitialTable;
|
||||
CComposeAddressTableView* mPickerAddresses;
|
||||
|
||||
CAddressBookController* mAddressBookController;
|
||||
CMailNewsContext* mMailNewsContext;
|
||||
CProgressListener* mProgressListener;
|
||||
EButton mLastAction;
|
||||
};
|
||||
#endif
|
||||
@@ -1,387 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* 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) 1997 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
|
||||
// CLDAPQueryDialog.cp
|
||||
|
||||
#include "CLDAPQueryDialog.h"
|
||||
#include "pascalstring.h"
|
||||
#include "LGAEditField.h"
|
||||
#include "prefapi.h"
|
||||
#include "SearchHelpers.h"
|
||||
#include "resgui.h"
|
||||
#include "xp_help.h"
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ CLDAPBasicHandler
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ Setup
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
void CLDAPBasicHandler::Setup( MSG_Pane *inSearchPane, DIR_Server *inServer, LView *inView )
|
||||
{
|
||||
Assert_( inSearchPane != NULL );
|
||||
Assert_( inServer != NULL );
|
||||
Assert_(inView != NULL );
|
||||
|
||||
mView = inView;
|
||||
int maxItems = 4;
|
||||
|
||||
// Get Basic Search attributes
|
||||
MSG_SearchError error = MSG_GetBasicLdapSearchAttributes (
|
||||
inServer, &mSearchAttributes[0], &maxItems);
|
||||
|
||||
|
||||
// Update the captions to reflect their new attributes
|
||||
for( int32 captionNumber = 0; captionNumber < maxItems; captionNumber++ )
|
||||
{
|
||||
LCaption* caption = dynamic_cast< LCaption*>( mView->FindPaneByID (eBasicSearchCaption+ captionNumber ) );
|
||||
Assert_( caption );
|
||||
caption->SetDescriptor ( CStr255(mSearchAttributes[ captionNumber ].name ));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ GetSearchParameters
|
||||
//------------------------------------------------------------------------------
|
||||
// Get the current search parameters. outSearchParams must be able to hold at least
|
||||
// 4 elements. Strings are output as c-strings.
|
||||
//
|
||||
Int32 CLDAPBasicHandler::GetSearchParameters(SearchLevelParamT* levelParam )
|
||||
{
|
||||
CStr255 valueString;
|
||||
MSG_SearchOperator op = (MSG_SearchOperator) opContains;;
|
||||
int maxItems = 4;
|
||||
Int32 currentLevel = 0;
|
||||
|
||||
for( int32 i = 0; i < maxItems; i++ )
|
||||
{
|
||||
LGAEditField* editField = dynamic_cast< LGAEditField*>( mView->FindPaneByID (eBasicSearchTerm+ i ) );
|
||||
Assert_( editField );
|
||||
editField->GetDescriptor ( valueString );
|
||||
if ( valueString.Length() )
|
||||
{
|
||||
levelParam[ currentLevel ].val.attribute = MSG_SearchAttribute( mSearchAttributes[ i ].attrib );
|
||||
XP_STRCPY( levelParam[ currentLevel ].val.u.string, valueString );
|
||||
levelParam[ currentLevel ].op = op;
|
||||
levelParam[ currentLevel ].boolOp = true;
|
||||
currentLevel++;
|
||||
}
|
||||
}
|
||||
|
||||
return currentLevel;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ SetSearchParameters
|
||||
//------------------------------------------------------------------------------
|
||||
// This works by taking the first occurence of an Param whose attribute
|
||||
// which matches a basic search criteria attribute.
|
||||
//
|
||||
void CLDAPBasicHandler::SetSearchParameters ( SearchLevelParamT* levelParam , int32 numLevels )
|
||||
{
|
||||
int maxItems = 4;
|
||||
Int32 currentLevel = 0;
|
||||
MSG_SearchAttribute attribute;
|
||||
for( int32 basic = 0; basic < maxItems; basic++ )
|
||||
{
|
||||
attribute = MSG_SearchAttribute( mSearchAttributes[ basic ].attrib );
|
||||
for ( int32 currentLevel = 0; currentLevel<numLevels; currentLevel++ )
|
||||
{
|
||||
if ( levelParam[ currentLevel ].val.attribute == attribute )
|
||||
{
|
||||
LGAEditField* editField = dynamic_cast< LGAEditField*>( mView->FindPaneByID (eBasicSearchTerm+ basic ) );
|
||||
Assert_( editField );
|
||||
editField->SetDescriptor( CStr255( levelParam[ currentLevel ].val.u.string) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ Setup
|
||||
//------------------------------------------------------------------------------
|
||||
// Advanced Search Routines
|
||||
// Most of the work is done by delagation to the Search Manager
|
||||
//
|
||||
void CLDAPAdvancedHandler::Setup( MSG_Pane *inSearchPane, DIR_Server *inServer, LView *inView )
|
||||
{
|
||||
Assert_( inSearchPane != NULL );
|
||||
Assert_( inServer != NULL );
|
||||
Assert_(inView != NULL );
|
||||
|
||||
mSearchFolders.InsertItemsAt(1, LArray::index_First, &inServer);
|
||||
mSearchManager.InitSearchManager( inView, NULL, scopeLdapDirectory, & mSearchFolders );
|
||||
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ GetSearchParameters
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
Int32 CLDAPAdvancedHandler::GetSearchParameters ( SearchLevelParamT* levelParam )
|
||||
{
|
||||
mSearchManager.GetSearchParameters( levelParam );
|
||||
return mSearchManager.GetNumVisibleLevels();
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ SetSearchParameters
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
void CLDAPAdvancedHandler::SetSearchParameters ( SearchLevelParamT* levelParam , int32 numLevels )
|
||||
{
|
||||
mSearchManager.SetSearchParameters ( numLevels, levelParam );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ ~CLDAPQueryDialog
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
CLDAPQueryDialog::~CLDAPQueryDialog()
|
||||
{
|
||||
if( mMSGPane ) // If the search manager isn't initialized don't save the window data
|
||||
{
|
||||
PREF_SetBoolPref("mail.addr_book.useAdvancedSearch", mAdvancedSearch);
|
||||
CSaveWindowStatus::SaveStatusInfo();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ BuildQuery
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
Boolean CLDAPQueryDialog::BuildQuery()
|
||||
{
|
||||
// Initial Search setup
|
||||
Assert_( mMSGPane );
|
||||
MSG_SearchFree ( mMSGPane );
|
||||
MSG_SearchAlloc ( mMSGPane );
|
||||
|
||||
|
||||
if( MSG_AddLdapScope( mMSGPane, mDirServer ) != SearchError_Success )
|
||||
return false;
|
||||
|
||||
if( AddParametersToSearch( ) != SearchError_Success)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ AddParametersToSearch
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
MSG_SearchError CLDAPQueryDialog::AddParametersToSearch( )
|
||||
{
|
||||
Assert_(mMSGPane != nil);
|
||||
MSG_SearchError error = SearchError_Success;
|
||||
|
||||
// Get the search parameters
|
||||
StSearchDataBlock searchParams( mMaxLevels, StSearchDataBlock::eAllocateStrings);
|
||||
SearchLevelParamT *curLevel = searchParams.GetData();
|
||||
int32 numLevels = mHandler[ mAdvancedSearch ]->GetSearchParameters( curLevel );
|
||||
|
||||
// Add parameters to the search
|
||||
for ( Int32 i=0; i< numLevels; i++ )
|
||||
{
|
||||
#ifdef FE_IMPLEMENTS_BOOLEAN_OR
|
||||
error = MSG_AddSearchTerm(mMSGPane, curLevel[i].val.attribute, curLevel[i].op,
|
||||
&curLevel[i].val, curLevel[i].boolOp, NULL ) ;
|
||||
#else
|
||||
error = MSG_AddSearchTerm(mMSGPane, curLevel[i].val.attribute, curLevel[i].op,
|
||||
&curLevel[i].val) ;
|
||||
#endif
|
||||
if ( error != SearchError_Success )
|
||||
break;
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ Setup
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
void CLDAPQueryDialog::Setup( MSG_Pane* inPane, DIR_Server* inServer )
|
||||
{
|
||||
mMSGPane = inPane;
|
||||
mDirServer = inServer;
|
||||
|
||||
// Set the name of the group box
|
||||
LView* box = dynamic_cast<LView* >( FindPaneByID('ScBx') );
|
||||
Assert_( box);
|
||||
CStr255 name;
|
||||
box->GetDescriptor( name );
|
||||
name+= mDirServer->description;
|
||||
box->SetDescriptor( name );
|
||||
|
||||
// Setup the Handlers
|
||||
mBasicView = dynamic_cast<LView*>( box->FindPaneByID( eBasicEnclosure ) );
|
||||
Assert_( mBasicView );
|
||||
mHandler[ eBasic ]->Setup( inPane, inServer, mBasicView );
|
||||
USearchHelper::LinkListenerToBroadcasters( mBasicView, this );
|
||||
|
||||
mAdvancedView = dynamic_cast<LView*>( box->FindPaneByID( eAdvancedEnclosure ) );
|
||||
Assert_( mAdvancedView );
|
||||
mHandler[ eAdvanced ]->Setup( inPane, inServer, mAdvancedView );
|
||||
|
||||
CLDAPAdvancedHandler* advancedLDAP = dynamic_cast<CLDAPAdvancedHandler*>(mHandler[ eAdvanced ]);
|
||||
Assert_( advancedLDAP );
|
||||
mSearchManager = advancedLDAP->GetSearchManager();
|
||||
mSearchManager->AddListener( this );
|
||||
|
||||
XP_Bool isAdvanced = false;
|
||||
if (PREF_GetBoolPref("mail.addr_book.useAdvancedSearch", &isAdvanced)== PREF_NOERROR )
|
||||
mAdvancedSearch = isAdvanced;
|
||||
CSaveWindowStatus::FinishCreateWindow();
|
||||
|
||||
mIsModified = false;
|
||||
|
||||
ShowHandler();
|
||||
Show();
|
||||
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ ListenToMessage
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
void CLDAPQueryDialog::ListenToMessage(MessageT inMessage, void *ioParam)
|
||||
{
|
||||
switch( inMessage )
|
||||
{
|
||||
case paneID_Search:
|
||||
BuildQuery();
|
||||
break;
|
||||
|
||||
case CSearchManager::msg_SearchParametersResized:
|
||||
ResizeWindowBy( 0, *((Int16 *) ioParam) );
|
||||
break;
|
||||
|
||||
case CSearchEditField::msg_UserChangedText:
|
||||
mIsModified = true;
|
||||
break;
|
||||
|
||||
case msg_Help:
|
||||
if ( mAdvancedSearch )
|
||||
ShowHelp( HELP_SEARCH_LDAP_ADVANCED );
|
||||
else
|
||||
ShowHelp( HELP_SEARCH_LDAP_BASIC );
|
||||
break;
|
||||
|
||||
case paneID_Advanced:
|
||||
case paneID_Basic:
|
||||
if ( !PREF_PrefIsLocked( "mail.addr_book.useAdvancedSearch") )
|
||||
mAdvancedSearch = !mAdvancedSearch;
|
||||
ShowHandler();
|
||||
break;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ FinishCreateSelf
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
void CLDAPQueryDialog::FinishCreateSelf()
|
||||
{
|
||||
mHandler[ eBasic ] = new CLDAPBasicHandler;
|
||||
mHandler[ eAdvanced ] = new CLDAPAdvancedHandler;
|
||||
UReanimator::LinkListenerToControls( this, this, CLDAPQueryDialog::res_ID );
|
||||
Inherited::FinishCreateSelf();
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ ShowHandler
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
void CLDAPQueryDialog::ShowHandler()
|
||||
{
|
||||
Assert_ ( mSearchManager );
|
||||
|
||||
Int32 windowHeight = 130;
|
||||
if ( mAdvancedSearch )
|
||||
{
|
||||
Int16 deltaLevels = 5 - mSearchManager->GetNumVisibleLevels();
|
||||
windowHeight = 220 - deltaLevels * 23 ;
|
||||
}
|
||||
|
||||
ResizeWindowTo ( 500, windowHeight );
|
||||
// modify contents, always do when going from advanced to basic
|
||||
// Only do when going from basic to advanced if there has been a modification
|
||||
if ( mIsModified || !mAdvancedSearch)
|
||||
{
|
||||
StSearchDataBlock searchParams( mMaxLevels, StSearchDataBlock::eAllocateStrings);
|
||||
SearchLevelParamT *curLevel = searchParams.GetData();
|
||||
int32 numLevels = mHandler[ !mAdvancedSearch ]->GetSearchParameters( curLevel );
|
||||
mHandler[ mAdvancedSearch ]->SetSearchParameters( curLevel, numLevels );
|
||||
mIsModified = false;
|
||||
}
|
||||
|
||||
// Swap the Buttons
|
||||
USearchHelper::ShowHidePane( FindPaneByID(paneID_Advanced), !mAdvancedSearch);
|
||||
USearchHelper::ShowHidePane( FindPaneByID( paneID_Basic ), mAdvancedSearch);
|
||||
|
||||
// Swap the panes
|
||||
USearchHelper::ShowHidePane( mBasicView, !mAdvancedSearch);
|
||||
USearchHelper::ShowHidePane( mAdvancedView, mAdvancedSearch);
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ ReadWindowStatus
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
void CLDAPQueryDialog::ReadWindowStatus(LStream *inStatusData)
|
||||
{
|
||||
CSaveWindowStatus::ReadWindowStatus(inStatusData);
|
||||
|
||||
mSearchManager->ReadSavedSearchStatus(inStatusData);
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ WriteWindowStatus
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
void CLDAPQueryDialog::WriteWindowStatus(LStream *outStatusData)
|
||||
{
|
||||
CSaveWindowStatus::WriteWindowStatus(outStatusData);
|
||||
if( mAdvancedSearch == 0 )
|
||||
{
|
||||
mAdvancedSearch = true;
|
||||
ShowHandler();
|
||||
}
|
||||
mSearchManager->WriteSavedSearchStatus(outStatusData);
|
||||
|
||||
}
|
||||
@@ -1,128 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* 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) 1997 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
|
||||
// CLDAPQueryDialog.h
|
||||
#pragma once
|
||||
|
||||
#include "LGADialogBox.h"
|
||||
#include "CSearchManager.h"
|
||||
#include "CSaveWindowStatus.h"
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ CLDAPHandlerInterface
|
||||
//------------------------------------------------------------------------------
|
||||
// I am defining a simple interface for getting Search Parameters
|
||||
// an alternative would have been to subclass CSearchManager
|
||||
// but that class does a lot more than just building queries
|
||||
//
|
||||
class CLDAPHandlerInterface
|
||||
{
|
||||
public:
|
||||
virtual void Setup( MSG_Pane *inSearchPane, DIR_Server *inServer, LView *inView ) = 0;
|
||||
virtual Int32 GetSearchParameters ( SearchLevelParamT* levelParam ) = 0;
|
||||
virtual void SetSearchParameters ( SearchLevelParamT* levelParam , int32 numLevels ) = 0;
|
||||
protected:
|
||||
LView * mView;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ CLDAPBasicHandler
|
||||
//------------------------------------------------------------------------------
|
||||
// Handles building queries from basic search pane
|
||||
//
|
||||
class CLDAPBasicHandler: public CLDAPHandlerInterface
|
||||
{
|
||||
public:
|
||||
enum { eBasicSearchTerm = 8965, eBasicSearchCaption = 8961 };
|
||||
virtual void Setup( MSG_Pane *inSearchPane, DIR_Server *inServer, LView *inView );
|
||||
virtual Int32 GetSearchParameters ( SearchLevelParamT* levelParam );
|
||||
virtual void SetSearchParameters ( SearchLevelParamT* levelParam , int32 numLevels );
|
||||
|
||||
private:
|
||||
MSG_SearchMenuItem mSearchAttributes[4]; // The names and attributes of the 4 editfields
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ CLDAPAdvancedHandler
|
||||
//------------------------------------------------------------------------------
|
||||
// Handles building queries from the advanced pane
|
||||
//
|
||||
class CLDAPAdvancedHandler: public CLDAPHandlerInterface
|
||||
{
|
||||
public:
|
||||
virtual void Setup( MSG_Pane *inSearchPane, DIR_Server *inServer, LView *inView ) ;
|
||||
virtual Int32 GetSearchParameters ( SearchLevelParamT* levelParam ) ;
|
||||
virtual void SetSearchParameters ( SearchLevelParamT* levelParam , int32 numLevels ) ;
|
||||
CSearchManager* GetSearchManager() { return &mSearchManager; }
|
||||
private:
|
||||
CSearchManager mSearchManager;
|
||||
LArray mSearchFolders;
|
||||
};
|
||||
|
||||
|
||||
static const UInt16 cLDAPSaveWindowStatusVersion = 0x0214;
|
||||
//------------------------------------------------------------------------------
|
||||
// ¥ CLDAPQueryDialog
|
||||
//------------------------------------------------------------------------------
|
||||
// The query building dialog box
|
||||
// if the user hits okay a query will be build for the given message pane
|
||||
//
|
||||
class CLDAPQueryDialog: public LGADialogBox, public CSaveWindowStatus
|
||||
{
|
||||
private:
|
||||
typedef LGADialogBox Inherited;
|
||||
public:
|
||||
enum { class_ID = 'LdDb', res_ID = 8980 };
|
||||
enum { eBasic = 0, eAdvanced = 1 };
|
||||
enum { eBasicEnclosure = 'BaVw', eAdvancedEnclosure = 'PENC'};
|
||||
enum { paneID_Search = 'SRCH', paneID_Advanced = 'AdBt', paneID_Basic = 'BaBt'};
|
||||
|
||||
CLDAPQueryDialog( LStream* inStream ): LGADialogBox( inStream ), CSaveWindowStatus ( this )
|
||||
,mMaxLevels(5), mAdvancedSearch( 0 ),mSearchManager( NULL ),
|
||||
mMSGPane(NULL ), mDirServer(NULL ), mIsModified( false) {};
|
||||
|
||||
~CLDAPQueryDialog();
|
||||
|
||||
void Setup( MSG_Pane* inPane, DIR_Server* inServer );
|
||||
Boolean BuildQuery();
|
||||
|
||||
|
||||
protected:
|
||||
virtual void FinishCreateSelf();
|
||||
virtual void ListenToMessage(MessageT inMessage, void *ioParam);
|
||||
// Status window
|
||||
virtual ResIDT GetStatusResID() const { return res_ID; }
|
||||
virtual UInt16 GetValidStatusVersion() const { return cLDAPSaveWindowStatusVersion; }
|
||||
virtual void ReadWindowStatus(LStream *inStatusData);
|
||||
virtual void WriteWindowStatus(LStream *outStatusData);
|
||||
private:
|
||||
void ShowHandler();
|
||||
MSG_SearchError AddParametersToSearch();
|
||||
|
||||
CLDAPHandlerInterface* mHandler[2];
|
||||
LView* mBasicView;
|
||||
LView* mAdvancedView;
|
||||
|
||||
Int32 mAdvancedSearch;
|
||||
Boolean mIsModified;
|
||||
|
||||
MSG_Pane* mMSGPane;
|
||||
DIR_Server* mDirServer;
|
||||
CSearchManager* mSearchManager;
|
||||
Int32 mMaxLevels;
|
||||
};
|
||||
@@ -1,414 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
// CNameCompletionPicker.cp
|
||||
|
||||
#include "abcom.H"
|
||||
#ifdef MOZ_NEWADDR
|
||||
#include "CNameCompletionPicker.h"
|
||||
#include "UStdDialogs.h"
|
||||
#include "SearchHelpers.h"
|
||||
#include "LGAPushButton.h"
|
||||
|
||||
LEditField* CNameCompletionPicker::mLastReceivedEditField = nil;
|
||||
MSG_Pane* CNameCompletionPicker::mLastReceivedPickerPane = nil;
|
||||
CMailNewsContext* CNameCompletionPicker::mLastReceivedContext = nil;
|
||||
int CNameCompletionPicker::mLastReceivedNumResults = 0;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ¥ CNameCompletionTable class [static]
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
CNameCompletionTable::CNameCompletionTable(LStream* inStream )
|
||||
: CMailFlexTable(inStream)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
CNameCompletionTable::~CNameCompletionTable()
|
||||
{
|
||||
SetMessagePane(NULL);
|
||||
// Do it here so that our DestroyMessagePane() is called.
|
||||
// If we let the inherited CMailFlexTable do it, it will call
|
||||
// its own DestroyMessagePane() because ours is already destroyed
|
||||
// and the PickerPane will be deleted (which is something we
|
||||
// don't want because it belongs to the CMailAddressEditField).
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ¥ CNameCompletionTable::DestroyMessagePane
|
||||
//----------------------------------------------------------------------------
|
||||
// Don't delete the MSG_PickerPane: it belongs to the CMailAddressEditField
|
||||
//
|
||||
void CNameCompletionTable::DestroyMessagePane(MSG_Pane* /*inPane*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ¥ CNameCompletionTable::SetColumnHeaders
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
void CNameCompletionTable::SetColumnHeaders()
|
||||
{
|
||||
LTableViewHeader* tableHeader = GetTableHeader();
|
||||
PaneIDT headerPaneID;
|
||||
|
||||
// Column #1 = 'Type' is the container type (Address Book / LDAP server).
|
||||
// Column #2 = 'Col0' is the entry type (User / Mailing list).
|
||||
// The other columns have configurable headers.
|
||||
for (short col = 2; col <= tableHeader->CountColumns(); col ++)
|
||||
{
|
||||
headerPaneID = tableHeader->GetColumnPaneID(col);
|
||||
Int32 index = headerPaneID - eTableHeaderBase;
|
||||
AB_ColumnInfo *info = AB_GetColumnInfoForPane(GetMessagePane(), AB_ColumnID(index));
|
||||
|
||||
LCaption* headerPane = dynamic_cast<LCaption*>(GetSuperView()->FindPaneByID(headerPaneID));
|
||||
if (headerPane) headerPane->SetDescriptor(CStr255(info->displayString));
|
||||
|
||||
AB_FreeColumnInfo(info);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ¥ CNameCompletionTable::SelectionChanged
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
void CNameCompletionTable::SelectionChanged()
|
||||
{
|
||||
Inherited::SelectionChanged();
|
||||
StartBroadcasting();
|
||||
// Long story: the CTableKeyAttachment from CStandardFlexTable
|
||||
// calls StopBroadcasting() on keyDown and StartBroadcasting()
|
||||
// on keyUp. Problem: we are in a dialog and we never get keyUp's.
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ¥ CNameCompletionTable::OpenRow
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
void CNameCompletionTable::OpenRow(TableIndexT inRow)
|
||||
{
|
||||
if (IsValidRow(inRow))
|
||||
{
|
||||
BroadcastMessage(msg_OK, nil);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ¥ CNameCompletionTable::GetCellDisplayData
|
||||
//----------------------------------------------------------------------------
|
||||
// Entirely copied from CMailingListTableView
|
||||
//
|
||||
void CNameCompletionTable::GetCellDisplayData(const STableCell &inCell, ResIDT& ioIcon, CStr255 &ioDisplayString)
|
||||
{
|
||||
ioIcon = 0;
|
||||
ioDisplayString = "";
|
||||
|
||||
// Get the attribute corresponding to the current column
|
||||
LTableViewHeader* tableHeader = GetTableHeader();
|
||||
PaneIDT headerPaneID = tableHeader->GetColumnPaneID(inCell.col);
|
||||
Int32 index = headerPaneID - eTableHeaderBase;
|
||||
|
||||
AB_ColumnInfo *info = AB_GetColumnInfoForPane(GetMessagePane(), AB_ColumnID(index));
|
||||
AB_AttribID attrib = info->attribID;
|
||||
AB_FreeColumnInfo(info);
|
||||
|
||||
// Get the data
|
||||
uint16 numItems = 1;
|
||||
AB_AttributeValue* value;
|
||||
if (AB_GetEntryAttributesForPane(GetMessagePane(), inCell.row-1, &attrib, &value, &numItems) == AB_SUCCESS)
|
||||
{
|
||||
if (attrib == AB_attribEntryType)
|
||||
{
|
||||
ioIcon = (value->u.entryType == AB_MailingList ? 15263 : 15260);
|
||||
}
|
||||
else
|
||||
{
|
||||
ioDisplayString = value->u.string ;
|
||||
}
|
||||
AB_FreeEntryAttributeValue(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ¥ CNameCompletionTable::DrawCellContents
|
||||
//----------------------------------------------------------------------------
|
||||
// Mostly copied from CMailingListTableView
|
||||
//
|
||||
void CNameCompletionTable::DrawCellContents(const STableCell &inCell, const Rect &inLocalRect)
|
||||
{
|
||||
ResIDT iconID = 0;
|
||||
PaneIDT cellType = GetCellDataType(inCell);
|
||||
switch (cellType)
|
||||
{
|
||||
case 'Type':
|
||||
AB_ContainerType container = AB_GetEntryContainerType(GetMessagePane(), inCell.row-1);
|
||||
switch (container)
|
||||
{
|
||||
case AB_LDAPContainer: iconID = 15250; break; // remote folder
|
||||
case AB_MListContainer: iconID = 15258; break; // address book
|
||||
case AB_PABContainer: iconID = 15258; break; // address book
|
||||
case AB_UnknownContainer: iconID = 0; break;
|
||||
}
|
||||
if (iconID)
|
||||
DrawIconFamily(iconID, 16, 16, 0, inLocalRect);
|
||||
break;
|
||||
// case 'Col0':
|
||||
// ...
|
||||
// case 'Col6':
|
||||
default:
|
||||
CStr255 displayString;
|
||||
GetCellDisplayData(inCell, iconID, displayString);
|
||||
if (iconID)
|
||||
DrawIconFamily(iconID, 16, 16, kTransformNone, inLocalRect);
|
||||
else
|
||||
DrawTextString(displayString, &mTextFontInfo, 0, inLocalRect);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
//----------------------------------------------------------------------------
|
||||
// ¥ CNameCompletionPicker::DisplayDialog [static]
|
||||
//----------------------------------------------------------------------------
|
||||
// Show the name completion dialog
|
||||
//
|
||||
int CNameCompletionPicker::DisplayDialog(LEditField* inEditField, MSG_Pane* inPane, CMailNewsContext* inContext, int inNumResults)
|
||||
{
|
||||
// put up dialog
|
||||
mLastReceivedEditField = inEditField;
|
||||
mLastReceivedPickerPane = inPane;
|
||||
mLastReceivedContext = inContext;
|
||||
mLastReceivedNumResults = inNumResults;
|
||||
|
||||
RegisterClass_(CNameCompletionPicker);
|
||||
RegisterClass_(CNameCompletionTable);
|
||||
|
||||
StStdDialogHandler handler(CNameCompletionPicker::res_ID, NULL);
|
||||
CNameCompletionPicker* dlog = (CNameCompletionPicker*)handler.GetDialog();
|
||||
|
||||
// run the dialog
|
||||
MessageT message;
|
||||
do
|
||||
{
|
||||
message = handler.DoDialog();
|
||||
} while (message != msg_OK && message != msg_Cancel);
|
||||
|
||||
// return the result
|
||||
STableCell aCell(0,0);
|
||||
if (message == msg_OK)
|
||||
aCell = dlog->GetActiveTable()->GetFirstSelectedCell();
|
||||
|
||||
// explicitly close the dialog to save its status
|
||||
dlog->DoClose();
|
||||
|
||||
return (aCell.row);
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
//----------------------------------------------------------------------------
|
||||
// ¥ CNameCompletionPicker class
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
CNameCompletionPicker::CNameCompletionPicker(LStream *inStream)
|
||||
: CMailNewsWindow(inStream, WindowType_NameCompletion)
|
||||
{
|
||||
}
|
||||
|
||||
CNameCompletionPicker::~CNameCompletionPicker()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ¥ CNameCompletionPicker::FinishCreateSelf
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
void CNameCompletionPicker::FinishCreateSelf()
|
||||
{
|
||||
// transmit parameters from the Compose window to the list
|
||||
ReceiveComposeWindowParameters();
|
||||
|
||||
mNameCompletionTable = dynamic_cast<CNameCompletionTable *>(USearchHelper::FindViewSubview(this, paneID_NameCompletionTable));
|
||||
FailNILRes_(mNameCompletionTable);
|
||||
mNameCompletionTable->ReceiveMessagePane(mPickerPane);
|
||||
|
||||
// finish create stuff
|
||||
Inherited::FinishCreateSelf();
|
||||
CSaveWindowStatus::FinishCreateWindow();
|
||||
|
||||
// prepare list
|
||||
mNameCompletionTable->SetColumnHeaders();
|
||||
mNameCompletionTable->SetRowCount();
|
||||
STableCell cellToSelect(2, 1);
|
||||
mNameCompletionTable->SelectCell(cellToSelect);
|
||||
|
||||
// default button
|
||||
LGAPushButton * defaultBtn = dynamic_cast<LGAPushButton*>(FindPaneByID(paneID_OkButton));
|
||||
if (defaultBtn) defaultBtn->SetDefaultButton(true, true);
|
||||
mNameCompletionTable->AddListener(this);
|
||||
|
||||
// show window
|
||||
this->Show();
|
||||
this->Select();
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ¥ CNameCompletionPicker::DoClose
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
void CNameCompletionPicker::DoClose()
|
||||
{
|
||||
// Save table data and window position
|
||||
SaveStatusInfo();
|
||||
|
||||
// Close window
|
||||
Inherited::DoClose();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ¥ CNameCompletionPicker::CalcStandardBoundsForScreen
|
||||
//----------------------------------------------------------------------------
|
||||
// Zoom in the vertical direction only.
|
||||
//
|
||||
void CNameCompletionPicker::CalcStandardBoundsForScreen(
|
||||
const Rect &inScreenBounds,
|
||||
Rect &outStdBounds) const
|
||||
{
|
||||
LWindow::CalcStandardBoundsForScreen(inScreenBounds, outStdBounds);
|
||||
Rect contRect = UWindows::GetWindowContentRect(mMacWindowP);
|
||||
|
||||
outStdBounds.left = contRect.left;
|
||||
outStdBounds.right = contRect.right;
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ¥ CNameCompletionPicker::ListenToMessage
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
void CNameCompletionPicker::ListenToMessage(MessageT inMessage, void */*ioParam*/)
|
||||
{
|
||||
if (inMessage == msg_OK)
|
||||
{
|
||||
LControl* keyButton = (LControl*)FindPaneByID(paneID_OkButton);
|
||||
keyButton->SimulateHotSpotClick(kControlButtonPart);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ¥ CNameCompletionPicker::HandleKeyPress
|
||||
//----------------------------------------------------------------------------
|
||||
// Handle Escape and Cmd-Period (copied from LDialogBox)
|
||||
//
|
||||
Boolean CNameCompletionPicker::HandleKeyPress(const EventRecord &inKeyEvent)
|
||||
{
|
||||
Boolean keyHandled = false;
|
||||
PaneIDT keyButtonID = 0;
|
||||
|
||||
switch (inKeyEvent.message & charCodeMask)
|
||||
{
|
||||
case char_Enter:
|
||||
case char_Return:
|
||||
keyButtonID = paneID_OkButton;
|
||||
break;
|
||||
|
||||
case char_Escape:
|
||||
if ((inKeyEvent.message & keyCodeMask) == vkey_Escape)
|
||||
keyButtonID = paneID_CancelButton;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (UKeyFilters::IsCmdPeriod(inKeyEvent))
|
||||
keyButtonID = paneID_CancelButton;
|
||||
else
|
||||
keyHandled = LWindow::HandleKeyPress(inKeyEvent);
|
||||
break;
|
||||
}
|
||||
|
||||
if (keyButtonID != 0)
|
||||
{
|
||||
LControl* keyButton = (LControl*)FindPaneByID(keyButtonID);
|
||||
keyButton->SimulateHotSpotClick(kControlButtonPart);
|
||||
keyHandled = true;
|
||||
}
|
||||
|
||||
return keyHandled;
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ¥ CNameCompletionPicker::ReadWindowStatus
|
||||
//----------------------------------------------------------------------------
|
||||
// Put the window next to the edit field and try to restore its last size.
|
||||
//
|
||||
void CNameCompletionPicker::ReadWindowStatus(LStream *inStatusData)
|
||||
{
|
||||
// get last window size
|
||||
Rect savedBounds;
|
||||
if (inStatusData != nil)
|
||||
*inStatusData >> savedBounds;
|
||||
else
|
||||
{
|
||||
GetPaneGlobalBounds(this, &savedBounds);
|
||||
savedBounds.right = savedBounds.left + 320; //¥ TODO: remove these hard-coded values
|
||||
}
|
||||
|
||||
// put the window at the right of the caret position in the edit field
|
||||
TEHandle teH = mEditField->GetMacTEH();
|
||||
short caretPos = (*teH)->selStart;
|
||||
|
||||
Rect actualBounds;
|
||||
mEditField->CalcPortFrameRect(actualBounds);
|
||||
mEditField->PortToGlobalPoint(topLeft(actualBounds));
|
||||
actualBounds.top -= 44; //¥ TODO: remove these hard-coded values
|
||||
actualBounds.left += (caretPos + 3) * 7; //¥ TODO:
|
||||
actualBounds.bottom = actualBounds.top + (savedBounds.bottom - savedBounds.top);
|
||||
actualBounds.right = actualBounds.left + (savedBounds.right - savedBounds.left);
|
||||
|
||||
VerifyWindowBounds(this, &actualBounds);
|
||||
DoSetBounds(actualBounds);
|
||||
|
||||
// restore table data
|
||||
if (inStatusData != nil)
|
||||
mNameCompletionTable->ReadSavedTableStatus(inStatusData);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ¥ CNameCompletionPicker::WriteWindowStatus
|
||||
//----------------------------------------------------------------------------
|
||||
// Save window size and table data.
|
||||
//
|
||||
void CNameCompletionPicker::WriteWindowStatus(LStream *outStatusData)
|
||||
{
|
||||
CSaveWindowStatus::WriteWindowStatus(outStatusData);
|
||||
mNameCompletionTable->WriteSavedTableStatus(outStatusData);
|
||||
}
|
||||
#endif //MOZ_NEWADDR
|
||||
@@ -1,135 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
// CNameCompletionPicker.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "abcom.H"
|
||||
#ifdef MOZ_NEWADDR
|
||||
#include "CMailNewsWindow.h"
|
||||
//¥#include "CAddressBookViews.h"
|
||||
#include "CMailFlexTable.h"
|
||||
#include "msgcom.h"
|
||||
#include "PascalString.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ¥ CNameCompletionTable class
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
class CNameCompletionTable : public CMailFlexTable
|
||||
{
|
||||
public:
|
||||
typedef CMailFlexTable Inherited;
|
||||
enum { class_ID = 'NcVw', pane_ID = 'Tabl' };
|
||||
|
||||
enum EColType {
|
||||
eTableHeaderBase = 'Col0' // Columns are called 'Col0', 'Col1', 'Col2' etc...
|
||||
}; // but 'Col0' is not used (it used to contain the person/list icon)
|
||||
|
||||
public:
|
||||
CNameCompletionTable(LStream *inStream);
|
||||
virtual ~CNameCompletionTable();
|
||||
void SetColumnHeaders();
|
||||
|
||||
virtual void DeleteSelection() {};
|
||||
virtual void SelectionChanged();
|
||||
virtual void OpenRow(TableIndexT inRow);
|
||||
virtual void ReceiveMessagePane(MSG_Pane* inMsgPane) {SetMessagePane(inMsgPane);};
|
||||
virtual void DestroyMessagePane( MSG_Pane* inPane );
|
||||
|
||||
protected:
|
||||
virtual void GetCellDisplayData(const STableCell &inCell, ResIDT &ioIcon, CStr255 &ioDisplayString );
|
||||
virtual void DrawCellContents(
|
||||
const STableCell &inCell,
|
||||
const Rect &inLocalRect);
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ¥ CNameCompletionPicker class
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
static const UInt16 cNameCompletionSaveWindowStatusVersion = 0x0200;
|
||||
|
||||
class CNameCompletionPicker : public CMailNewsWindow
|
||||
, public LListener
|
||||
{
|
||||
public:
|
||||
typedef CMailNewsWindow Inherited;
|
||||
|
||||
enum { class_ID = 'NcWn', pane_ID = class_ID, res_ID = 8970 };
|
||||
|
||||
enum {
|
||||
paneID_OkButton = 'BtOk',
|
||||
paneID_CancelButton = 'Canc',
|
||||
paneID_NameCompletionTable = 'Tabl'
|
||||
};
|
||||
|
||||
// Dialog handler
|
||||
static int DisplayDialog(LEditField* inEditField, MSG_Pane* inPane, CMailNewsContext* inContext, int inNumResults);
|
||||
|
||||
// Stream creator method
|
||||
CNameCompletionPicker(LStream *inStream);
|
||||
virtual ~CNameCompletionPicker();
|
||||
virtual ResIDT GetStatusResID() const { return res_ID; }
|
||||
virtual CNSContext* CreateContext() const { return (CNSContext*)mLastReceivedContext; }
|
||||
virtual void CalcStandardBoundsForScreen(
|
||||
const Rect &inScreenBounds,
|
||||
Rect &outStdBounds) const;
|
||||
virtual void DoClose();
|
||||
virtual void ListenToMessage(
|
||||
MessageT inMessage,
|
||||
void *ioParam);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Overriden methods
|
||||
virtual void FinishCreateSelf();
|
||||
virtual Boolean HandleKeyPress(const EventRecord &inKeyEvent);
|
||||
|
||||
// Utility methods
|
||||
virtual CMailFlexTable* GetActiveTable() { return mNameCompletionTable; }
|
||||
virtual void ReadWindowStatus(LStream *inStatusData);
|
||||
virtual void WriteWindowStatus(LStream *outStatusData);
|
||||
virtual UInt16 GetValidStatusVersion() const { return cNameCompletionSaveWindowStatusVersion;}
|
||||
virtual void ReceiveComposeWindowParameters() {
|
||||
mEditField = mLastReceivedEditField;
|
||||
mPickerPane = mLastReceivedPickerPane;
|
||||
mContext = mLastReceivedContext;
|
||||
mNumResults = mLastReceivedNumResults;
|
||||
}
|
||||
|
||||
// Instance variables
|
||||
CNameCompletionTable *mNameCompletionTable;
|
||||
LEditField* mEditField;
|
||||
MSG_Pane* mPickerPane;
|
||||
CMailNewsContext* mContext;
|
||||
int mNumResults;
|
||||
|
||||
private:
|
||||
static LEditField* mLastReceivedEditField;
|
||||
static MSG_Pane* mLastReceivedPickerPane;
|
||||
static CMailNewsContext* mLastReceivedContext;
|
||||
static int mLastReceivedNumResults;
|
||||
};
|
||||
#endif //MOZ_NEWADDR
|
||||