Compare commits

..

171 Commits

Author SHA1 Message Date
alecf%netscape.com
c7bfb46f1a start fixing this branch
git-svn-id: svn://10.0.0.236/branches/alecf_killuri_branch@50832 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 16:40:41 +00:00
(no author)
c781a4931a This commit was manufactured by cvs2svn to create branch
'alecf_killuri_branch'.

git-svn-id: svn://10.0.0.236/branches/alecf_killuri_branch@50775 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:50:22 +00:00
bienvenu%netscape.com
78b763db4d more of addrbook memory leak fixes r=mscott
git-svn-id: svn://10.0.0.236/trunk@50774 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:50:21 +00:00
radha%netscape.com
d6dbd3db1f fixing session history for frames. I accidently broke the behavior in
my monday's checkin. No bug #. r=law


git-svn-id: svn://10.0.0.236/trunk@50773 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:49:29 +00:00
troy%netscape.com
be2abd7a2c Patch from jst@citec.fi r=troy@netscape.com
Part of a fix for crash when expanding/collapsing toolbars. Change to
DeletingFrameSubtree() to make sure it examines the additional child
list as well as the principal child list


git-svn-id: svn://10.0.0.236/trunk@50772 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:37:10 +00:00
waterson%netscape.com
1464bedb39 Bug 16402. Make sure that literals addref (and release) the RDF service. Make sure to deal with edge Unregister[Resource|Literal] conditions; e.g., being called to unregister a literal when none was ever registered. r=rjc
git-svn-id: svn://10.0.0.236/trunk@50771 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:36:04 +00:00
jband%netscape.com
df5ae28aef r=shaver
- Fixed two similar cases where code was missing one level of
pointer dereference in terminating a copied string. Was trashing
data further up the stack.
- Use 'nsAllocator::Free' in two similar cases where 'delete' was
mistakenly used. Error pointed out by Purify.


git-svn-id: svn://10.0.0.236/trunk@50770 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:31:09 +00:00
rhp%netscape.com
2caa1592a8 Fix for email names with embedded &'s - Bug #16383 r=jefft
git-svn-id: svn://10.0.0.236/trunk@50769 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:27:33 +00:00
troy%netscape.com
8ec1b4ee83 Space savings. r=kipp@netscape.com
Re-implemented DST code to use separate objects for leaf nodes and
internal nodes. This reduces the per node size from 16 bytes to (on
average) 13 bytes per node


git-svn-id: svn://10.0.0.236/trunk@50768 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:18:28 +00:00
troy%netscape.com
9c1337b86f Space savings. r=karnaze@netscape.com Cc'd hyatt@netscape.com
Eliminated member data mIsContentEmpty and now we use a frame state bit
instead. This saves 4 bytes of space per table cell frame


git-svn-id: svn://10.0.0.236/trunk@50767 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:14:59 +00:00
shaver%netscape.com
9a4de938e7 make xpcshell use jsrtsvc, and let jsrtsvc handle JS_Shutdown (r=jband)
git-svn-id: svn://10.0.0.236/trunk@50766 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 03:05:48 +00:00
bienvenu%netscape.com
0eddf3358e fix memory leak of nsIURI in Set and GetAttribute r=waterson
git-svn-id: svn://10.0.0.236/trunk@50765 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 02:59:37 +00:00
srinivas%netscape.com
cc0b044bfe Autoconf for NSPR. Checkin for cls@seawood.org. Bugzilla #11893.
git-svn-id: svn://10.0.0.236/trunk@50764 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 02:42:36 +00:00
srinivas%netscape.com
6f136bc3f5 Autoconf for NSPR. Checkin for cls@seawood.org. Bugzilla #11893.
git-svn-id: svn://10.0.0.236/trunk@50763 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 02:36:40 +00:00
peterl%netscape.com
06471a021a moved toggle and tri-state from user-modify to user-select to stay in sync with CSS3
no bug #
r=pierre


git-svn-id: svn://10.0.0.236/trunk@50762 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 02:11:09 +00:00
cls%seawood.org
e381009988 Fix for bug #13412. r=shaver
If configured using --with-extensions or --with-extension=all, enable all of the non-default extensions rather than extension "yes" or "all".


git-svn-id: svn://10.0.0.236/trunk@50761 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 02:04:09 +00:00
akhil.arora%sun.com
047329ce0a 16426 r=akhil.arora@sun.com fixed by Denis Sharypov <sdv@sparc.spb.su>
The class java.lang.RuntimeException was not being pinned


git-svn-id: svn://10.0.0.236/trunk@50760 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 01:47:04 +00:00
akhil.arora%sun.com
4e04c99aad 16427 r=akhil.arora@sun.com fixed by Denis Sharypov <sdv@sparc.spb.su>
Check before dereferencing a NULL pointer.


git-svn-id: svn://10.0.0.236/trunk@50759 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 01:43:24 +00:00
varada%netscape.com
b2e2e2a6bc change from relative to absolute path
git-svn-id: svn://10.0.0.236/trunk@50758 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 01:39:32 +00:00
sspitzer%netscape.com
0d6acc8491 fix for #14892, automatically migrate if we only have one 4.x profile and no 5.0 profiles.
r=mscott.


git-svn-id: svn://10.0.0.236/trunk@50757 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 01:38:54 +00:00
akhil.arora%sun.com
0e030fdb50 16424 r=akhil.arora@sun.com fixed by Denis Sharypov <sdv@sparc.spb.su>
Fix two problems that kept the code from compiling on Win32


git-svn-id: svn://10.0.0.236/trunk@50756 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 01:38:42 +00:00
varada%netscape.com
cbaf31ef98 getting rid of relative paths in wizardmachine.cpp and wizardui.cpp for generate lists
git-svn-id: svn://10.0.0.236/trunk@50755 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 01:38:25 +00:00
varada%netscape.com
0e04699ad6 getting rid of relative paths in accountsetup and checklist inifiles
git-svn-id: svn://10.0.0.236/trunk@50754 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 01:19:25 +00:00
despotdaemon%netscape.com
6e4309cd35 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@50753 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:57:31 +00:00
wtc%netscape.com
ef278f909e Bugsplat bug #358401: created a separate .rc file for each DLL. The
product name is "Netscape Portable Runtime" and the file descriptions
are "NSPR Library", "PLDS Library", "PLC Library", and "PRSTRMS Library".
A debug build is indicated in the file description.  The copyright years
changed to 1996-1999.
Modified files: rules.mk, lib/ds/Makefile, lib/ds/Makefile.in,
lib/libc/src/Makefile, lib/libc/src/Makefile.in,
lib/prstreams/Makefile, lib/prstreams/Makefile.in,
prinit.h, nspr.rc
Added files: plds.rc, plc.rc, prstrms.rc
Removed file: resource.h


git-svn-id: svn://10.0.0.236/trunk@50752 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:51:41 +00:00
mcafee%netscape.com
981a0b415a Add #status option so you don't have to scroll down to the tree status.
git-svn-id: svn://10.0.0.236/trunk@50751 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:50:58 +00:00
sspitzer%netscape.com
13ef2ec53a more fixes to the 4.x uri -> 5.0 uri (copies and folders) code, for windows and mac.
#14951.  r=mscott


git-svn-id: svn://10.0.0.236/trunk@50750 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:50:34 +00:00
rpotts%netscape.com
fa27c68f3e bug #16328. Share a single nsToolkit instance among all widgets.
git-svn-id: svn://10.0.0.236/trunk@50749 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:49:11 +00:00
fur%netscape.com
69272dcfcd Initial version of net data cache APIs
git-svn-id: svn://10.0.0.236/trunk@50748 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:46:41 +00:00
kipp%netscape.com
f23d12f0ae Removed two more warnings
git-svn-id: svn://10.0.0.236/trunk@50747 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:29:28 +00:00
leaf%mozilla.org
1388fcf255 adding lib/mac/embedding for pierre -leaf
git-svn-id: svn://10.0.0.236/trunk@50746 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:19:06 +00:00
cathleen%netscape.com
1ba2750fb6 adds jsurl.xpt and html.css to windows packager list
git-svn-id: svn://10.0.0.236/trunk@50745 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:14:44 +00:00
wtc%netscape.com
974a9a3d5c Backed out the Windows resource file stuff checked in in the autoconf
branch merge.  It has two problems: 1. RESOBJ is not being used.  It
has the same meaning as the existing variable RES.  2. $(RES) is added
to OBJS twice on Win32.


git-svn-id: svn://10.0.0.236/trunk@50744 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:14:09 +00:00
nhotta%netscape.com
0cbcded17a Hooking up nsISaveAsCharset to the build, part of bug fix 8865, r=ftang.
git-svn-id: svn://10.0.0.236/trunk@50743 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:13:00 +00:00
bienvenu%netscape.com
f9c5bba278 fix memory leaks opening and closing dbs r=mscott
git-svn-id: svn://10.0.0.236/trunk@50742 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:11:58 +00:00
nhotta%netscape.com
dbcdcc135b Changed to get a charset name from a locale instead of hard code, also fixed a memory leak, bug=10816, r=tague
git-svn-id: svn://10.0.0.236/trunk@50741 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:11:38 +00:00
nhotta%netscape.com
54747068e8 Additional fallback for not charset labeled input, bug=15766, r=rhp
git-svn-id: svn://10.0.0.236/trunk@50740 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:08:42 +00:00
nhotta%netscape.com
58752631d9 Hooking up nsISaveAsCharset to the build, part of bug fix 8865, r=ftang.
git-svn-id: svn://10.0.0.236/trunk@50739 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:05:23 +00:00
bienvenu%netscape.com
284cea9db5 fix mork linked list which was disabling more than one table change from getting recorded r=davidmc
git-svn-id: svn://10.0.0.236/trunk@50738 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:05:10 +00:00
shaver%netscape.com
62dca335b0 Fix for 15480 (menu reflow from content change).
Use <titledbutton>, not <div>, for accelerator text to fix alignment
and improve performance _ever_ so slightly.
Initial support for checked menus (needs more magic).
(r=hyatt)


git-svn-id: svn://10.0.0.236/trunk@50737 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:59:18 +00:00
wtc%netscape.com
ad9bb8908b Removed the rule for $(PURE_LIBRARY), which was accidentally
resurrected in the autoconf checkin.


git-svn-id: svn://10.0.0.236/trunk@50736 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:55:27 +00:00
shaver%netscape.com
f3548d4772 case correction, scriptability and deprecative comment for nsIEnumerator (r=waterson,brendan)
git-svn-id: svn://10.0.0.236/trunk@50734 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:52:59 +00:00
mjudge%netscape.com
8633625794 oops. for got to check this in last time. bug number is 14795
git-svn-id: svn://10.0.0.236/trunk@50733 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:52:42 +00:00
norris%netscape.com
9323b18962 Fix a Unix warning by removing an unused local variable
git-svn-id: svn://10.0.0.236/trunk@50732 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:49:36 +00:00
norris%netscape.com
d8ebef8633 correct a comment.
git-svn-id: svn://10.0.0.236/trunk@50731 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:49:05 +00:00
kmcclusk%netscape.com
d8ff43782f Set vertical-align:baseline for input[type=image] to make it compatible with Nav 4.x
bug #16370; r=rods@netscape.com


git-svn-id: svn://10.0.0.236/trunk@50730 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:48:02 +00:00
pollmann%netscape.com
806e3f40cd Bugs 16450, 11979, 16576: Add back a CRLF I took out of the form post headers; r=harishd
git-svn-id: svn://10.0.0.236/trunk@50729 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:47:08 +00:00
davidm%netscape.com
b8febcc271 14974 apprunner fails to start up on B&W G3 8.6
Add file to generate logs on the mac
r sdagley


git-svn-id: svn://10.0.0.236/trunk@50728 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:46:27 +00:00
norris%netscape.com
814809437c Fix bug 16303. r=alecf@netscape.com
git-svn-id: svn://10.0.0.236/trunk@50727 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:45:40 +00:00
davidm%netscape.com
4d52510e79 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@50726 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:45:20 +00:00
kmcclusk%netscape.com
440593ffd1 When submitting a form using a "get" method only add the ? if the href does not end in a ?.
bug #16137 r=rods@netscape.com


git-svn-id: svn://10.0.0.236/trunk@50725 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:45:02 +00:00
kmcclusk%netscape.com
9827b1d455 Return the value of the option element value attribute if it is present otherwise return
the content of the option. bug #16158. r=rods@netscape.com


git-svn-id: svn://10.0.0.236/trunk@50724 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:41:40 +00:00
morse%netscape.com
19b5a1e558 fix bug 16357, memory leak, r=neeti
git-svn-id: svn://10.0.0.236/trunk@50723 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:37:35 +00:00
harishd%netscape.com
1cd0327569 Bug fix 2749 - Tweaked comment handling in quirks mode.
Bug fix 15992 - Line breaks within script and style were not getting counted
Related to bug 15423 - Rectified a glitch in Nav. DTD code where a doctype tag
                                         was opening up a body.
Userdefined tags are now treated as containers.
Added Kipp's Leaky Tool

r=pollmann.


git-svn-id: svn://10.0.0.236/trunk@50722 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:37:21 +00:00
morse%netscape.com
75a2c4fce1 fix bug 16348, memory leak, r=neeti
git-svn-id: svn://10.0.0.236/trunk@50721 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:36:50 +00:00
sdagley%netscape.com
6f9ff35120 Enforce _MD_DEFAULT_STACK_SIZE as the minimum stack size on Mac. r=beard
git-svn-id: svn://10.0.0.236/trunk@50720 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:33:13 +00:00
pepper%netscape.com
7f58cc3a0b Changed friend declaration to make HP compilers happy.
aCC requires a decl of friend class ClassName instead of friend ClassName.
r=peterl@netscape.com,mgleeson@netscape.com


git-svn-id: svn://10.0.0.236/trunk@50719 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:31:07 +00:00
ssu%netscape.com
6277f3a3b3 fixes bug #16246, #16312, #16344, #16308. r=dbragg@netscape.com. fixes crash bug if the install file operation fails. no longer crashes.
git-svn-id: svn://10.0.0.236/trunk@50718 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:30:56 +00:00
kipp%netscape.com
a4a3169649 r=dougt; fixed a warning
git-svn-id: svn://10.0.0.236/trunk@50717 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:30:39 +00:00
sdagley%netscape.com
072fc1a666 Marking all Mac threads as GCable for leak detector work. Bug #15906. r=beard
git-svn-id: svn://10.0.0.236/trunk@50716 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:29:34 +00:00
pepper%netscape.com
0c627abfcd Added missing newline at end of file to make the HP compilers happy.
r=mgleeson@netscape.com


git-svn-id: svn://10.0.0.236/trunk@50715 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:28:17 +00:00
alecf%netscape.com
3185d0a81d add boehm to apprunner
(flag not active in build yet)


git-svn-id: svn://10.0.0.236/trunk@50714 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:27:45 +00:00
alecf%netscape.com
4d423eecaf add boehm leak detector support to xpcom on linux
(these flags not active in the build yet)


git-svn-id: svn://10.0.0.236/trunk@50713 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:26:41 +00:00
wtc%netscape.com
0317a9ec8d Bugsplat bug #365543: removed the PRIntn typecast in the definition of
PR_TRUE and PR_FALSE.


git-svn-id: svn://10.0.0.236/trunk@50712 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:25:01 +00:00
alecf%netscape.com
c8460fa4ce tweaks to make generic_threads work on linux
not part of build


git-svn-id: svn://10.0.0.236/trunk@50711 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:24:34 +00:00
alecf%netscape.com
2fce42c8be more tweaks to make beard's generic_threads stuff work on linux
linux already has some of these routines implemented with pthread-specifics
not part of build = no reviewer/bug


git-svn-id: svn://10.0.0.236/trunk@50710 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:22:17 +00:00
mgleeson1%netscape.com
34c5281c43 r=pepper HPUX specific change - enable 64-bit int for js
git-svn-id: svn://10.0.0.236/trunk@50709 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:20:27 +00:00
wtc%netscape.com
463f69ae27 Bugzilla bug #14126: quote $(OS_RELEASE) in the shell command.
Thanks to Greg Noel <GregNoel@san.rr.com> for the bug report
and the fix.  Reviewed by Greg Noel and tested on several flavors
of Linux (x86, sparc, alpha, and ppc) and FreeBSD.


git-svn-id: svn://10.0.0.236/trunk@50708 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:17:38 +00:00
mcafee%netscape.com
8ebe80d3dc Better warning messages. r=pavlov.
git-svn-id: svn://10.0.0.236/trunk@50707 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:13:39 +00:00
kipp%netscape.com
37a76d8a25 r=Tomi.Leppikangas@oulu.fi; landed his patch for solaris build issues
git-svn-id: svn://10.0.0.236/trunk@50706 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:11:44 +00:00
kipp%netscape.com
63bce01588 Fixed edge case where line bounds wasn't quite accurate which causes the combined rect to not match which now wastes memory; only affects right aligned lines
git-svn-id: svn://10.0.0.236/trunk@50705 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:10:59 +00:00
kipp%netscape.com
18e9b9d2f5 r=troy; Reworked nsLineBox api to allow for reduced storage overhead; fixed bug 16252 while keeping bug 12709 fixed
git-svn-id: svn://10.0.0.236/trunk@50704 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:10:03 +00:00
jband%netscape.com
b3711cec39 Fixing leaks found by beard...
- Fixed leaked nsID ptr. bug 16373. This alsothrows a JS
exception when JS callers call createInstance or getService
using an (optional) param that is not an iid. This had been a
'XXX' in the code.
- Moved a release call out of just the error condition block in
setting up a ServiceReleaser. I should have caught this one, but
few of my tests use services :(  I have hopes that the whole
ServiceReleaser will become unnecessary as the ServiceManager
system changes and simply calling NS_RELEASE on a service becomes
sufficient.
- Cleaned up an addref/release pair in a setter (need to move to
nsComPtrs!) r=beard


git-svn-id: svn://10.0.0.236/trunk@50703 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:08:59 +00:00
kipp%netscape.com
dde9a9185e r=troy; Use a custom frame type so that bullets show up properly in the frame sizing data
git-svn-id: svn://10.0.0.236/trunk@50702 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:08:58 +00:00
kipp%netscape.com
3f737c9dc4 r=troy; Added some more atoms so that Dframe sizing data is more particular for line boxes
git-svn-id: svn://10.0.0.236/trunk@50701 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:08:31 +00:00
kipp%netscape.com
873c0b8d47 r=troy; Added a #define to prevent future code crashes
git-svn-id: svn://10.0.0.236/trunk@50700 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:08:04 +00:00
ftang%netscape.com
2a3924d2e0 fix Shift+a does not produce A in editor problem. We need to clean up isShift before we send. r=pavlov
git-svn-id: svn://10.0.0.236/trunk@50699 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 23:04:57 +00:00
kipp%netscape.com
a542382c77 Added a new table regression test
git-svn-id: svn://10.0.0.236/trunk@50698 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 22:58:41 +00:00
terry%mozilla.org
909afc64d2 Patch by holger@holger.om.org (Holger Schurig) -- was not correctly fixing up the 'when' column in the bugs_activity table.
git-svn-id: svn://10.0.0.236/trunk@50697 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 22:35:12 +00:00
terry%mozilla.org
270c5df832 Patch by holger@holger.om.org (Holger Schurig) -- get the permissions right on the shadow directory.
git-svn-id: svn://10.0.0.236/trunk@50696 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 22:32:44 +00:00
ftang%netscape.com
da9f453e91 fix problem with url bar trancation. Do not send extra key press for non A-Z0-9
git-svn-id: svn://10.0.0.236/trunk@50695 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 21:49:49 +00:00
brade%netscape.com
6bc5327b10 add nspr shlb to optimized too (to fix probably future mac bustage); remove bad path (r=sfraser@netscape.com)
git-svn-id: svn://10.0.0.236/trunk@50694 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 20:34:38 +00:00
ssu%netscape.com
0acd8acee3 fixing bug #16242. approved by leaf. r=leaf. removes jre122 from the mozilla installer. not part of tinderbox. would only affect windows.
git-svn-id: svn://10.0.0.236/trunk@50693 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 20:23:22 +00:00
brade%netscape.com
9c363797fa add nspr shlb to debug to fix mac build bustage
git-svn-id: svn://10.0.0.236/trunk@50692 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 20:18:30 +00:00
dmose%mozilla.org
f0ad8b22a7 fix to cope with checkins.when column name change to checkins.ci_when
git-svn-id: svn://10.0.0.236/trunk@50691 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 20:10:30 +00:00
ftang%netscape.com
0abb41fb24 fix the problem taht PageUp/PageDown/Up/Down/Left/Right/Home/End does not work after we land the keyevent branch. add missing isMeta code there
git-svn-id: svn://10.0.0.236/trunk@50690 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 20:03:00 +00:00
ftang%netscape.com
2d2a382150 landing keyEvent_19991004_BRANCH
bugs # see the log of the check in into branch
author/reviewer:
mozilla/layout/base/src/nsRangeList.cpp brade/mjudge
mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp brade/ftang
mozilla/layout/events/src/nsDOMEvent.cpp brade/joki
mozilla/layout/events/src/nsEventStateManager.cpp brade/joki
mozilla/widget/public/nsGUIEvent.h akkana/ftang
mozilla/widget/src/windows/nsWindow.cpp ftang/mjudge
mozilla/widget/src/windows/nsWindow.h ftang/mjudge
mozilla/widget/src/mac/nsTextAreaWidget.cpp brade/ftang
mozilla/widget/src/mac/nsMacEventHandler.cpp brade/simon
mozilla/widget/src/xpwidgets/nsKeyBindMgr.cpp brade/ftang
mozilla/widget/src/gtk/nsGtkEventHandler.cpp akkana/?
mozilla/widget/src/gtk/nsWidget.cpp erik/ftang
mozilla/layout/xul/base/src/nsTreeCellFrame.cpp brade/ftang
mozilla/editor/base/nsEditorEventListeners.cpp brade/akkana
mozilla/editor/base/nsHTMLEditor.cpp brade/akkana
mozilla/rdf/content/src/nsXULKeyListener.cpp ftang/saari
fix the master bug- 15693
fix at least, but not limited to, the following bugs
10158,11956,6053,9333,10901,14348,6449,11845,13016,14410,15657,15307,15842,13856


git-svn-id: svn://10.0.0.236/trunk@50688 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 18:27:01 +00:00
alecf%netscape.com
74f7c311eb fix back/forward buttons, #16415
a=leaf


git-svn-id: svn://10.0.0.236/trunk@50687 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 18:26:13 +00:00
terry%mozilla.org
210deb53ba Fix invalid SQL introduced by last patch.
git-svn-id: svn://10.0.0.236/trunk@50686 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 17:34:00 +00:00
terry%mozilla.org
e121b35d4c Allow sorting of status whiteboard column.
git-svn-id: svn://10.0.0.236/trunk@50685 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 17:21:43 +00:00
srinivas%netscape.com
3b846f9edf Add autoconf for NSPR. Check in for cls@seawood.org. Buzill 11893
git-svn-id: svn://10.0.0.236/trunk@50684 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 15:09:11 +00:00
rods%netscape.com
f2b4462a33 This corrects an erroneous checkin made on monday, fixes bug #16362 r=dcone
git-svn-id: svn://10.0.0.236/trunk@50683 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 14:55:08 +00:00
srinivas%netscape.com
e68238933b Autconf for NSPR. Checkin for cls@seawood.org. Bugzill #11893.
git-svn-id: svn://10.0.0.236/trunk@50682 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 14:50:38 +00:00
kipp%netscape.com
49f795c9c9 Make necko work with the viewer again
git-svn-id: svn://10.0.0.236/trunk@50681 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 14:43:59 +00:00
brade%netscape.com
bbc03d38ad remove dbl-click message (per joki); dblclick message is causing bug #14990; r=sfraser@netscape.com
git-svn-id: svn://10.0.0.236/trunk@50680 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 14:22:22 +00:00
brade%netscape.com
eb9061c0ef add nsXULControllers.cpp for hyatt (fix mac bustage)
git-svn-id: svn://10.0.0.236/trunk@50679 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 14:14:55 +00:00
brade%netscape.com
093237bea8 add nsIControllers.idl for hyatt (fix mac build bustage)
git-svn-id: svn://10.0.0.236/trunk@50678 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 13:56:34 +00:00
morse%netscape.com
9cbd053f44 fix bug 10434, memory leak detection, r=kin
git-svn-id: svn://10.0.0.236/trunk@50677 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 13:50:36 +00:00
morse%netscape.com
789e4a6e68 fix bug 10434, memory leak detection, r=valeski
git-svn-id: svn://10.0.0.236/trunk@50676 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 13:36:33 +00:00
hyatt%netscape.com
b895b64505 Fixing warnings. r=travis
git-svn-id: svn://10.0.0.236/trunk@50675 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 12:02:32 +00:00
hyatt%netscape.com
3e56d44211 Fixing linux bustage. Typo in makefile.
git-svn-id: svn://10.0.0.236/trunk@50674 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 11:18:03 +00:00
tbogard%aol.net
226a10c27a Changed the content area of navigator to use the new browser tag rather than html:iframe. r=hyatt.
git-svn-id: svn://10.0.0.236/trunk@50673 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 11:00:21 +00:00
hyatt%netscape.com
9259952dca Landing re-architected command dispatcher. r=hangas(XUL/JS), saari(C++)
git-svn-id: svn://10.0.0.236/trunk@50672 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 10:58:25 +00:00
tbogard%aol.net
d548e091c7 Fixed a number of incorrect assumptions of the attribute retrieval so it would now work with the of new XUL content nodes (iframe, browser, editor). r=hyatt.
git-svn-id: svn://10.0.0.236/trunk@50671 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 10:58:04 +00:00
tbogard%aol.net
e623d0cd2b Adding construction for new XUL tags "iframe", "editor", and "browser". r=hyatt.
git-svn-id: svn://10.0.0.236/trunk@50670 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 10:55:24 +00:00
tbogard%aol.net
645b1aba54 Adding new XUL tags, "iframe", "browser", "editor". r=hyatt.
git-svn-id: svn://10.0.0.236/trunk@50669 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 10:54:32 +00:00
tbogard%aol.net
9cb4c25b8a Added rules for the new browser, editor and iframe types. r=hyatt
git-svn-id: svn://10.0.0.236/trunk@50668 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 10:50:10 +00:00
sgehani%netscape.com
04a7745986 *** NOT PART OF BUILD ***
Fixed bug 11216: Cascading dependencies feature
   
Fixed bug 14320: Parser and action support for the LAUNCHAPP atribute
   
Fixed bug 14322: Mouse over displays component description
   
Fixed bug 16224: Mac Install Wizard crashing when installing custom components


git-svn-id: svn://10.0.0.236/trunk@50667 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 08:30:29 +00:00
sgehani%netscape.com
e33d697bbd Divide by 1024 rather than 1000 when calculating component install sizes. [r=ssu]
git-svn-id: svn://10.0.0.236/trunk@50666 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 08:15:35 +00:00
locka%iol.ie
3e4a7413ef Seperated webshell initialisation/termination out into their own methods. Added support to run Mozilla control from any directory with calls to the new NS_InitXPCOM and some new registry keys.
git-svn-id: svn://10.0.0.236/trunk@50665 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 07:46:55 +00:00
locka%iol.ie
e08fc8df48 Added context popup menu resources
git-svn-id: svn://10.0.0.236/trunk@50664 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 07:44:40 +00:00
locka%iol.ie
9d3f958db2 Added simple working implementation of drag and drop. Control now accepts a URL dragged and dropped from the IE address bar.
git-svn-id: svn://10.0.0.236/trunk@50663 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 07:43:50 +00:00
alecf%netscape.com
4cb578fb28 fix for #16303 - work around DOM security by specifying absolute chrome URLs
patch from norris, r=alecf


git-svn-id: svn://10.0.0.236/trunk@50662 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 07:07:43 +00:00
alecf%netscape.com
067e9e08c7 more tweaks to actually make this do useful things with linux - override malloc with GC_malloc
git-svn-id: svn://10.0.0.236/trunk@50659 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 05:34:21 +00:00
alecf%netscape.com
b7e4e49c84 make this link on rh60 - the pthreads that comes with rh60 doesn't allow direct access to __pthread_initial_thread_box, which was only used as a test anyway
git-svn-id: svn://10.0.0.236/trunk@50658 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 05:33:46 +00:00
troy%netscape.com
3007f63368 b=15388,15408 r=peterl@netscape.com
Made it so that for absolutely positioned frames we pass in the containing
block width/height to the HTML reflow state, rather than have it compute it.
This means we get a bottom up size rather than a top down size. That fixes
a problem where for containing blocks with a specified 'height' of 'auto' we
weren't correctly calculating the containing block height


git-svn-id: svn://10.0.0.236/trunk@50657 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 04:56:50 +00:00
troy%netscape.com
bc13612958 b=16238. Fix discussed with evaughan@netscape. One line change to make sure
the default area frame flag of NS_BLOCK_SPACE_MGR is used for scrolled
elements


git-svn-id: svn://10.0.0.236/trunk@50656 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 04:47:18 +00:00
warren%netscape.com
18d4872487 Reordered columns as per macafee's suggestion.
git-svn-id: svn://10.0.0.236/trunk@50655 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 04:37:13 +00:00
troy%netscape.com
50fb78a575 Space reductions for nsTableFrame. r=karnaze@netscape.com and changes Cc'd to
Hyatt. Tested extensively in apprunner (now mozilla). Change was to reduce from
10 to 5 the default size of the mColumnWidths array (note that the array is
dynamically grown if necessary). This reduces by 20 bytes the minimum table
frame size


git-svn-id: svn://10.0.0.236/trunk@50654 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 04:27:01 +00:00
karnaze%netscape.com
43efe84083 bug 15247 - ComputeAvailableTableWidth accounts for margins
git-svn-id: svn://10.0.0.236/trunk@50653 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 04:03:20 +00:00
karnaze%netscape.com
14d9729d57 cells with width=0 become auto, added comments
git-svn-id: svn://10.0.0.236/trunk@50652 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 04:01:26 +00:00
karnaze%netscape.com
1c91cf67ee new regression tests
git-svn-id: svn://10.0.0.236/trunk@50651 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 03:59:42 +00:00
ssu%netscape.com
661f8f1993 fixing bug #16064. checking in for dveditz@netscape.com. r=ssu@netscape.com. This fixes the crash under win98 when running from the windows installer.
git-svn-id: svn://10.0.0.236/trunk@50650 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 03:26:22 +00:00
srinivas%netscape.com
33f38025b2 Enable specification of minimum stack size.
git-svn-id: svn://10.0.0.236/trunk@50649 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 02:33:14 +00:00
jefft%netscape.com
f59d48eecf enable message move/copy {File Here} menu item; bug 13880, r= hangas
git-svn-id: svn://10.0.0.236/trunk@50648 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 02:20:02 +00:00
rhp%netscape.com
36d221edd9 Fix for attachment count - bug #16076 - reviewer: jefft
git-svn-id: svn://10.0.0.236/trunk@50647 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 02:05:20 +00:00
alecf%netscape.com
e39c37dd58 one down, one to go
git-svn-id: svn://10.0.0.236/trunk@50646 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 02:01:40 +00:00
beard%netscape.com
2975241aaf added support for "about:bloat?leaks". bug=15906,r=warren
git-svn-id: svn://10.0.0.236/trunk@50645 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 01:56:49 +00:00
varada%netscape.com
60280cb48a fix for bug #6348 -new field called Title is to be added in each ini file for the show example
git-svn-id: svn://10.0.0.236/trunk@50644 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 01:56:43 +00:00
evaughan%netscape.com
c89e48e233 Fixed gfx scrollbars style rule. Reviewed by Hyatt
git-svn-id: svn://10.0.0.236/trunk@50642 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 01:55:41 +00:00
alecf%netscape.com
af6d54dbdd convert to nsIModule
r=sspitzer
no bug


git-svn-id: svn://10.0.0.236/trunk@50640 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 01:40:27 +00:00
mcafee%netscape.com
ea6a04a363 Backing out quotes change for (14663), r=matt
git-svn-id: svn://10.0.0.236/trunk@50639 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 01:38:22 +00:00
varada%netscape.com
9acc778e9e bug #10361 config in title
git-svn-id: svn://10.0.0.236/trunk@50637 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 01:23:02 +00:00
varada%netscape.com
9b7d72b4f3 fix for bug #10361 - make neccessary changes in ini files in the title
git-svn-id: svn://10.0.0.236/trunk@50636 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 01:21:01 +00:00
bienvenu%netscape.com
48263cb73e real fix for build bustage
git-svn-id: svn://10.0.0.236/trunk@50635 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 01:02:23 +00:00
peterl%netscape.com
946d493f92 moved style rule cascading logic into a stand-alone rule processor
the rule processor can now cascade rules from multiple style sheets
fix for bug 12401 & 12106
r=pierre


git-svn-id: svn://10.0.0.236/trunk@50634 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 00:59:21 +00:00
peterl%netscape.com
c7896988cd factored out parsing of style attribute
deferred parsing of style attribute until content
is connected to a document
Fix for bug 14986
r=vidur


git-svn-id: svn://10.0.0.236/trunk@50633 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 00:57:37 +00:00
peterl%netscape.com
866322d95e added an assertion to help track down Bug 14238
r=troy


git-svn-id: svn://10.0.0.236/trunk@50632 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 00:56:30 +00:00
cyeh%netscape.com
8ba9c7c1f8 move megahal initialization so that if there is a nick collision and we
die, we at least don't leave a forked process behind.


git-svn-id: svn://10.0.0.236/trunk@50631 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 00:44:37 +00:00
don%netscape.com
7491373c1e Fixed build bustage.
git-svn-id: svn://10.0.0.236/trunk@50630 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 00:39:45 +00:00
varada%netscape.com
0a71d36864 rewriting verifyval to compare values
git-svn-id: svn://10.0.0.236/trunk@50629 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 00:39:31 +00:00
Jerry.Kirk%Nexwarecorp.com
5f745cfd66 These changes fix a draw problem when a top-level window was Move'd
Bug=16325 r=Michael.Kedl@Nexwarecorp.com


git-svn-id: svn://10.0.0.236/trunk@50628 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 00:33:49 +00:00
cmanske%netscape.com
1347e8f244 Fixed bugs 16204, 16118, 15831,15448,14342(partial) r=mjudge
git-svn-id: svn://10.0.0.236/trunk@50627 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 00:13:27 +00:00
cmanske%netscape.com
376ee7ffc4 Fixed bug 16118, part of fix for 14342. Reduced size of ender input widget. r=hyatt,hangas
git-svn-id: svn://10.0.0.236/trunk@50626 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 00:13:21 +00:00
beard%netscape.com
c49f31fb70 fixing a memory leak, just use an nsAutoString. bug=15380, r=harishd
git-svn-id: svn://10.0.0.236/trunk@50625 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:59:27 +00:00
alecf%netscape.com
064759d0a6 make this compile with -pedantic on Linux 2.2
git-svn-id: svn://10.0.0.236/trunk@50624 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:58:25 +00:00
alecf%netscape.com
4cc8b798cc add new makefile for our build system
git-svn-id: svn://10.0.0.236/trunk@50623 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:58:09 +00:00
alecf%netscape.com
e8c68e85db move old Boehm makefile to Makefile.unix
(not part of build)


git-svn-id: svn://10.0.0.236/trunk@50622 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:57:38 +00:00
bienvenu%netscape.com
2d2078838d add close method to datasources, r=mscott, no bug, but fixes some shutdown memory leaks
git-svn-id: svn://10.0.0.236/trunk@50621 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:55:57 +00:00
beard%netscape.com
06ca9ef5c4 make stack crawl instructions addresses reflect call site, not return address. bug=15906, r=rjc
git-svn-id: svn://10.0.0.236/trunk@50620 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:45:40 +00:00
beard%netscape.com
a0aa1b960a Rewrote using Mac file I/O, since MSL can only manage 35 FILEs. bug=15906, r=rjc
git-svn-id: svn://10.0.0.236/trunk@50619 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:45:03 +00:00
beard%netscape.com
34cb9deb75 for now, let leak detector reclaim block. bug=15906, r=rjc
git-svn-id: svn://10.0.0.236/trunk@50618 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:44:55 +00:00
beard%netscape.com
6dfda342cc html-ized the report, added -blame option.
git-svn-id: svn://10.0.0.236/trunk@50617 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:42:49 +00:00
alecf%netscape.com
416447022b fix typo (gif not dif)
talked to cmanske about this, no review necessary


git-svn-id: svn://10.0.0.236/trunk@50616 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:39:52 +00:00
dveditz%netscape.com
c5129bc74b added directory recursion feature to makecopy.exe, r=dougt
git-svn-id: svn://10.0.0.236/trunk@50615 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 23:37:24 +00:00
varada%netscape.com
59aaafb7d0 fix for bug #6569
git-svn-id: svn://10.0.0.236/trunk@50614 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 21:30:51 +00:00
terry%mozilla.org
10a148d16b Removing the last vote on a bug was causing an SQL error.
git-svn-id: svn://10.0.0.236/trunk@50611 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 20:17:01 +00:00
selmer%netscape.com
9c33ecf2b8 fix 15325 - don't allow dupl config
git-svn-id: svn://10.0.0.236/trunk@50607 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 19:55:13 +00:00
selmer%netscape.com
73b2bf9d78 Can't have commands after a Reload
git-svn-id: svn://10.0.0.236/trunk@50606 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 19:24:41 +00:00
wtc%netscape.com
78e2d8b9b1 Fixed an error of incorrect return value type in _MD_DeleteSharedMemory.
git-svn-id: svn://10.0.0.236/trunk@50603 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 19:17:05 +00:00
larryh%netscape.com
c2335df585 NSPR 3.5 landing
git-svn-id: svn://10.0.0.236/trunk@50602 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 18:32:42 +00:00
rbs%maths.uq.edu.au
28de62d660 [MathML] Fix to get the scriptlevel style context back, and minor cleanups.
git-svn-id: svn://10.0.0.236/trunk@50600 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 15:10:14 +00:00
karnaze%netscape.com
d0d34df829 bug 11026 - AllocateUnconstrained was off by 1 twip in some cases. bug 14159 - cell is not fixed width if an auto cell in the same col has a larger desired size for backward compatibilty.
git-svn-id: svn://10.0.0.236/trunk@50599 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 14:44:22 +00:00
kipp%netscape.com
9c0c764b13 Removed an unsupported argument (-f)
git-svn-id: svn://10.0.0.236/trunk@50598 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 14:43:04 +00:00
karnaze%netscape.com
12a011a2e9 removed handling of 0 width cells in ComputeAvailableTableWidth since it is done in nsHTMLTableElement. review=kmcclusk
git-svn-id: svn://10.0.0.236/trunk@50597 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 14:39:33 +00:00
karnaze%netscape.com
b893071648 added comments
git-svn-id: svn://10.0.0.236/trunk@50596 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 14:36:28 +00:00
gagan%netscape.com
6d496c35bf Argh... fix my last fix.
git-svn-id: svn://10.0.0.236/trunk@50595 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 12:16:08 +00:00
gagan%netscape.com
14334bc5ea Fix build bustage on windows.
git-svn-id: svn://10.0.0.236/trunk@50594 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 11:50:14 +00:00
gagan%netscape.com
22f1039803 Fix the windows build bustage. Bad checkin on my part!
git-svn-id: svn://10.0.0.236/trunk@50593 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 11:09:37 +00:00
gagan%netscape.com
a4426a97a5 Removing an #if 0 block that got checked in accidently with my last checkins.
git-svn-id: svn://10.0.0.236/trunk@50592 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 10:31:16 +00:00
gagan%netscape.com
8d5737519d Removed an unneccesary include statement. No bug number.
git-svn-id: svn://10.0.0.236/trunk@50591 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 10:28:10 +00:00
1416 changed files with 229492 additions and 24347 deletions

View File

@@ -0,0 +1,28 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = idl public base db news local compose mime imap addrbook
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,28 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public src prefs build resources
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,17 @@
# 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.
#
nsAbBaseCID.h

View File

@@ -0,0 +1,49 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = addrbook
LIBRARY_NAME = addrbook
IS_COMPONENT = 1
CPPSRCS = nsAbFactory.cpp
EXPORTS = nsAbBaseCID.h
SHARED_LIBRARY_LIBS = \
$(DIST)/lib/libaddrbook_s.a \
$(DIST)/lib/librdfutil_s.a \
$(NULL)
EXTRA_DSO_LDOPTS = \
$(MKSHLIB_FORCE_ALL) \
$(SHARED_LIBRARY_LIBS) \
$(MKSHLIB_UNFORCE_ALL) \
-L$(DIST)/bin \
$(NSPR_LIBS) \
-lxpcom \
$(NULL)
include $(topsrcdir)/config/rules.mk
$(LIBRARY) $(SHARED_LIBRARY): $(SHARED_LIBRARY_LIBS) Makefile

View File

@@ -0,0 +1,49 @@
#!gmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..\..
MODULE=addrbook
################################################################################
## exports
EXPORTS= \
nsAbBaseCID.h \
$(NULL)
################################################################################
## library
LIBNAME = .\$(OBJDIR)\addrbook
DLL = $(LIBNAME).dll
CPP_OBJS= \
.\$(OBJDIR)\nsAbFactory.obj \
$(NULL)
LLIBS= \
$(DIST)\lib\xpcom.lib \
$(DIST)\lib\addrbook_s.lib \
$(LIBNSPR) \
$(DIST)\lib\rdfutil_s.lib \
$(NULL)
include <$(DEPTH)\config\rules.mak>
install:: $(DLL)
$(MAKE_INSTALL) $(LIBNAME).$(DLL_SUFFIX) $(DIST)\bin\components
$(MAKE_INSTALL) $(LIBNAME).$(LIB_SUFFIX) $(DIST)\lib

View File

@@ -0,0 +1,154 @@
/* -*- Mode: C++; tab-width: 2; 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.
*/
#ifndef nsAbBaseCID_h__
#define nsAbBaseCID_h__
#include "nsISupports.h"
#include "nsIFactory.h"
#include "nsIComponentManager.h"
//
// nsAddressBook
//
#define NS_ADDRESSBOOK_PROGID \
"component://netscape/addressbook"
#define NS_ADDRESSBOOK_CID \
{ /* {D60B84F2-2A8C-11d3-9E07-00A0C92B5F0D} */ \
0xd60b84f2, 0x2a8c, 0x11d3, \
{ 0x9e, 0x7, 0x0, 0xa0, 0xc9, 0x2b, 0x5f, 0xd } \
}
//
// nsAbDirectoryDataSource
//
#define NS_ABDIRECTORYDATASOURCE_PROGID \
NS_RDF_DATASOURCE_PROGID_PREFIX "addressdirectory"
#define NS_ABDIRECTORYDATASOURCE_CID \
{ /* 0A79186D-F754-11d2-A2DA-001083003D0C */ \
0xa79186d, 0xf754, 0x11d2, \
{0xa2, 0xda, 0x0, 0x10, 0x83, 0x0, 0x3d, 0xc} \
}
//
// nsAbDirectory
//
#define NS_ABDIRECTORY_PROGID \
NS_RDF_RESOURCE_FACTORY_PROGID_PREFIX "abdirectory"
#define NS_ABDIRECTORY_CID \
{ /* {6C21831D-FCC2-11d2-A2E2-001083003D0C}*/ \
0x6c21831d, 0xfcc2, 0x11d2, \
{0xa2, 0xe2, 0x0, 0x10, 0x83, 0x0, 0x3d, 0xc} \
}
//
// nsAbCardDataSource
//
#define NS_ABCARDDATASOURCE_PROGID \
NS_RDF_DATASOURCE_PROGID_PREFIX "addresscard"
#define NS_ABCARDDATASOURCE_CID \
{ /* 1920E486-0709-11d3-A2EC-001083003D0C */ \
0x1920e486, 0x709, 0x11d3, \
{0xa2, 0xec, 0x0, 0x10, 0x83, 0x0, 0x3d, 0xc} \
}
//
// nsAbCard
//
#define NS_ABCARD_PROGID \
NS_RDF_RESOURCE_FACTORY_PROGID_PREFIX "abcard"
#define NS_ABCARD_CID \
{ /* {1920E487-0709-11d3-A2EC-001083003D0C}*/ \
0x1920e487, 0x709, 0x11d3, \
{0xa2, 0xec, 0x0, 0x10, 0x83, 0x0, 0x3d, 0xc} \
}
//
// nsAddressBookDB
//
#define NS_ADDRDATABASE_PROGID \
"component://netscape/addressbook/carddatabase"
#define NS_ADDRDATABASE_CID \
{ /* 63187917-1D19-11d3-A302-001083003D0C */ \
0x63187917, 0x1d19, 0x11d3, \
{0xa3, 0x2, 0x0, 0x10, 0x83, 0x0, 0x3d, 0xc} \
}
//
// nsAbCardProperty
//
#define NS_ABCARDPROPERTY_PROGID \
"component://netscape/addressbook/cardproperty"
#define NS_ABCARDPROPERTY_CID \
{ /* 2B722171-2CEA-11d3-9E0B-00A0C92B5F0D */ \
0x2b722171, 0x2cea, 0x11d3, \
{0x9e, 0xb, 0x0, 0xa0, 0xc9, 0x2b, 0x5f, 0xd} \
}
//
// nsAddrBookSession
//
#define NS_ADDRBOOKSESSION_PROGID \
"component://netscape/addressbook/services/session"
#define NS_ADDRBOOKSESSION_CID \
{ /* C5339442-303F-11d3-9E13-00A0C92B5F0D */ \
0xc5339442, 0x303f, 0x11d3, \
{0x9e, 0x13, 0x0, 0xa0, 0xc9, 0x2b, 0x5f, 0xd} \
}
//
// nsAbDirProperty
//
#define NS_ABDIRPROPERTY_PROGID \
"component://netscape/addressbook/directoryproperty"
#define NS_ABDIRPROPERTY_CID \
{ /* 6FD8EC67-3965-11d3-A316-001083003D0C */ \
0x6fd8ec67, 0x3965, 0x11d3, \
{0xa3, 0x16, 0x0, 0x10, 0x83, 0x0, 0x3d, 0xc} \
}
//
// nsAbAutoCompleteSession
//
#define NS_ABAUTOCOMPLETESESSION_PROGID \
"component://netscape/messenger/autocomplete&type=addrbook"
#define NS_ABAUTOCOMPLETESESSION_CID \
{ /* 138DE9BD-362B-11d3-988E-001083010E9B */ \
0x138de9bd, 0x362b, 0x11d3, \
{0x98, 0x8e, 0x0, 0x10, 0x83, 0x1, 0xe, 0x9b} \
}
//
// nsAbAddressCollecter
//
#define NS_ABADDRESSCOLLECTER_PROGID \
"component://netscape/addressbook/services/addressCollecter"
#define NS_ABADDRESSCOLLECTER_CID \
{ /* fe04c8e6-501e-11d3-a527-0060b0fc04b7 */ \
0xfe04c8e6, 0x501e, 0x11d3, \
{0xa5, 0x27, 0x0, 0x60, 0xb0, 0xfc, 0x4, 0xb7} \
}
#endif // nsAbBaseCID_h__

View File

@@ -0,0 +1,83 @@
/* -*- Mode: C++; tab-width: 2; 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,1999 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsIFactory.h"
#include "nsISupports.h"
#include "nsIGenericFactory.h"
#include "nsIModule.h"
#include "nsAbBaseCID.h"
#include "pratom.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "rdf.h"
#include "nsCRT.h"
#include "nsCOMPtr.h"
/* Include all of the interfaces our factory can generate components for */
#include "nsDirectoryDataSource.h"
#include "nsCardDataSource.h"
#include "nsAbDirectory.h"
#include "nsAbCard.h"
#include "nsAddrDatabase.h"
#include "nsAddressBook.h"
#include "nsAddrBookSession.h"
#include "nsAbDirProperty.h"
#include "nsAbAutoCompleteSession.h"
#include "nsAbAddressCollecter.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAddressBook)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAbDirectoryDataSource,Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAbDirectory)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAbCardDataSource,Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAbCard)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAbCardProperty)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAddrDatabase)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAbDirProperty)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAddrBookSession)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAbAutoCompleteSession)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAbAddressCollecter)
struct components_t {
nsCID cid;
nsIGenericFactory::ConstructorProcPtr constructor;
const char *progid;
const char *description;
};
static components_t components[] =
{
{ NS_ADDRESSBOOK_CID, &nsAddressBookConstructor, NS_ADDRESSBOOK_PROGID, },
{ NS_ABDIRECTORYDATASOURCE_CID, &nsAbDirectoryDataSourceConstructor, NS_ABDIRECTORYDATASOURCE_PROGID, },
{ NS_ABDIRECTORY_CID, &nsAbDirectoryConstructor, NS_ABDIRECTORY_PROGID, },
{ NS_ABCARDDATASOURCE_CID, &nsAbCardDataSourceConstructor, NS_ABCARDDATASOURCE_PROGID, },
{ NS_ABCARD_CID, &nsAbCardConstructor, NS_ABCARD_PROGID, },
{ NS_ADDRDATABASE_CID, &nsAddrDatabaseConstructor, NS_ADDRDATABASE_PROGID, },
{ NS_ABCARDPROPERTY_CID, &nsAbCardPropertyConstructor, NS_ABCARDPROPERTY_PROGID, },
{ NS_ABDIRPROPERTY_CID, &nsAbDirPropertyConstructor, NS_ABDIRPROPERTY_PROGID, },
{ NS_ADDRBOOKSESSION_CID, &nsAddrBookSessionConstructor, NS_ADDRBOOKSESSION_PROGID, },
{ NS_ABAUTOCOMPLETESESSION_CID, &nsAbAutoCompleteSessionConstructor, NS_ABAUTOCOMPLETESESSION_PROGID, },
{ NS_ABADDRESSCOLLECTER_CID, &nsAbAddressCollecterConstructor, NS_ABADDRESSCOLLECTER_PROGID, },
};
NS_IMPL_MODULE(components)
NS_IMPL_NSGETMODULE(nsModule)

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,21 @@
/* -*- 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 "MacPrefix.h"

View File

@@ -0,0 +1,21 @@
/* -*- 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 "MacPrefix_debug.h"

View File

@@ -0,0 +1,22 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..
DIRS=public src prefs build resources
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,28 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = resources
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,22 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..\..
DIRS= resources
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,28 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = content locale
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,19 @@
# 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 local files which get copied to the res\mailnews\messenger directory
#
pref-addressing.xul

View File

@@ -0,0 +1,37 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
SAMPLES_DIR = $(DIST)/bin/chrome/addressbook/content/default
EXPORT_RESOURCE_SAMPLES = \
pref-addressing.xul \
$(NULL)
include $(topsrcdir)/config/rules.mk
GARBAGE += $(addprefix $(SAMPLES_DIR)/, $(EXPORT_RESOURCE_SAMPLES))
install::
$(INSTALL) $(addprefix $(srcdir)/, $(EXPORT_RESOURCE_SAMPLES)) $(SAMPLES_DIR)

View File

@@ -0,0 +1,26 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..\..\..\..
include <$(DEPTH)\config\rules.mak>
install::
$(MAKE_INSTALL) pref-addressing.xul $(DIST)\bin\chrome\addressbook\content\default
clobber::
rm -f $(DIST)\chrome\addressbook\content\default\pref-addressing.xul

View File

@@ -0,0 +1,66 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://pref/skin/pref.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://addressbook/locale/pref-addressing.dtd">
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="StartUp('Mailnews-Main')" >
<html:script language="javascript" src="chrome://pref/content/PrefsWindow.js"/>
<html:div flex="100%">
<html:div id="top">
<html:span id="lefttext">&pane.title;</html:span>
</html:div>
&pinpoint.label;
<html:form>
<html:table>
<html:tr><html:td>&lookFor.label;</html:td></html:tr>
<html:tr><html:td>
<html:input type="checkbox"/>
<html:label>&padCheck.label;</html:label>
</html:td></html:tr>
<html:tr><html:td>
<html:input type="checkbox"/>
<html:label>&dirCheck.label;</html:label>
</html:td></html:tr>
<html:tr><html:td>
<html:select>
<html:option>&nsbook.label;</html:option>
</html:select>
</html:td></html:tr>
<html:tr><html:td>&mulFound.label;</html:td></html:tr>
<html:tr><html:td>
<html:input name="multilist" type="radio"/>
<html:label>&showList.label;</html:label>
</html:td></html:tr>
<html:tr><html:td>
<html:input name="multilist" type="radio"/>
<html:label>&acceptList.label;</html:label>
</html:td></html:tr>
<html:tr><html:td>&oneMatch.label;</html:td></html:tr>
<html:tr><html:td>
<html:input type="checkbox"/>
<html:label>&useAddress.label;</html:label>
</html:td></html:tr>
</html:table>
</html:form>
&displayFullname.label;
<html:form>
<html:table>
<html:tr><html:td>
<html:input name="displayname" type="radio" id="pref:0:int:mail.addr_book.lastnamefirst" checked="true"/>
<html:label>&useDisplayName.label;</html:label>
</html:td></html:tr>
<html:tr><html:td>
<html:input name="displayname" type="radio" id="pref:1:int:mail.addr_book.lastnamefirst"/>
<html:label>&useLastFirst.label;</html:label>
</html:td></html:tr>
</html:table>
</html:form>
</html:div>
</window>

View File

@@ -0,0 +1,28 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = en-US
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1 @@
pref-addressing.dtd

View File

@@ -0,0 +1,29 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
install::
$(INSTALL) $(srcdir)/pref-addressing.dtd $(DIST)/bin/chrome/addressbook/locale/en-US

View File

@@ -0,0 +1,29 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..\..\..\..\..
include <$(DEPTH)\config\rules.mak>
DISTBROWSER=$(DIST)\bin\chrome\addressbook\locale\en-US
install::
$(MAKE_INSTALL) pref-addressing.dtd $(DISTBROWSER)
clobber::
rm -f $(DIST)\bin\chrome\addressbook\locale\en-US\pref-addressing.dtd

View File

@@ -0,0 +1,35 @@
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<!ENTITY window.title "Addressing">
<!ENTITY pane.title "Addressing">
<!ENTITY pinpoint.label "Pinpoint Addressing">
<!ENTITY lookFor.label "Look for addresses in the following">
<!ENTITY padCheck.label "Address Books">
<!ENTITY dirCheck.label "Directory Server">
<!ENTITY nsbook.label "Netscape Phonebook">
<!ENTITY mulFound.label "When there are multiple addresses found:">
<!ENTITY showList.label "Show me a list of choices">
<!ENTITY acceptList.label "Accept what I have typed">
<!ENTITY oneMatch.label "If there is one match in your personal address books:">
<!ENTITY useAddress.label "Use the address and do not search in the directory">
<!ENTITY displayFullname.label "When displaying full names:">
<!ENTITY useDisplayName.label "Show names using display name (from address book card)">
<!ENTITY useLastFirst.label "Show names using last name, first name">

View File

@@ -0,0 +1,22 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..\..\..\..
DIRS= en-US
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,22 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..\..\..
DIRS= content locale
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,18 @@
# 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 local files which get copied to the mozilla:dist:mailnews directory
#

View File

@@ -0,0 +1,6 @@
#
# This is a list of local files which get copied to the mozilla:dist:idl directory
#
nsIAbAddressCollecter.idl

View File

@@ -0,0 +1,43 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = addrbook
XPIDLSRCS = \
nsIAbListener.idl \
nsIAbDirectory.idl \
nsIAbCard.idl \
nsIAddrDBAnnouncer.idl \
nsIAddrDBListener.idl \
nsIAddrDatabase.idl \
nsIAddressBook.idl \
nsIAbBase.idl \
nsIAddrBookSession.idl \
nsIAutoCompleteListener.idl \
nsIAutoCompleteSession.idl \
nsIAbAddressCollecter.idl \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,39 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..\..
MODULE=addrbook
XPIDLSRCS = \
.\nsIAbListener.idl \
.\nsIAbBase.idl \
.\nsIAbDirectory.idl \
.\nsIAbCard.idl \
.\nsIAddrDBAnnouncer.idl \
.\nsIAddrDBListener.idl \
.\nsIAddrDatabase.idl \
.\nsIAddressBook.idl \
.\nsIAddrBookSession.idl \
.\nsIAutoCompleteSession.idl \
.\nsIAutoCompleteListener.idl \
.\nsIAbAddressCollecter.idl \
$(NULL)
include <$(DEPTH)\config\rules.mak>
include <$(DEPTH)\config\config.mak>

View File

@@ -0,0 +1,28 @@
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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) 1999 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsISupports.idl"
[scriptable, uuid(fe04c8e6-501e-11d3-a527-0060b0fc04b7)]
interface nsIAbAddressCollecter : nsISupports {
void CollectAddress(in string address);
};

View File

@@ -0,0 +1,35 @@
/* -*- Mode: C++; tab-width: 2; 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 "nsICollection.idl"
[scriptable, uuid(013DD009-F73B-11d2-A2DA-001083003D0C)]
interface nsIAbBase : nsICollection {
readonly attribute string URI;
attribute string name;
nsISupports GetChildNamed(in string name);
attribute nsIAbBase parent;
nsIEnumerator GetChildNodes();
void AddUnique(in nsISupports element);
void ReplaceElement(in nsISupports element, in nsISupports newElement);
};

View File

@@ -0,0 +1,97 @@
/* -*- Mode: C++; tab-width: 2; 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 "nsISupports.idl"
interface nsIAddrDatabase;
[ptr] native nsVoidArray(nsVoidArray);
%{C++
#include "nsVoidArray.h"
%}
[scriptable, uuid(FA5C977F-04C8-11d3-A2EB-001083003D0C)]
interface nsIAbCard : nsISupports {
attribute wstring FirstName;
attribute wstring LastName;
attribute wstring DisplayName;
attribute wstring NickName;
attribute wstring PrimaryEmail;
attribute wstring SecondEmail;
attribute wstring WorkPhone;
attribute wstring HomePhone;
attribute wstring FaxNumber;
attribute wstring PagerNumber;
attribute wstring CellularNumber;
attribute wstring HomeAddress;
attribute wstring HomeAddress2;
attribute wstring HomeCity;
attribute wstring HomeState;
attribute wstring HomeZipCode;
attribute wstring HomeCountry;
attribute wstring WorkAddress;
attribute wstring WorkAddress2;
attribute wstring WorkCity;
attribute wstring WorkState;
attribute wstring WorkZipCode;
attribute wstring WorkCountry;
attribute wstring JobTitle;
attribute wstring Department;
attribute wstring Company;
attribute wstring WebPage1;
attribute wstring WebPage2;
attribute wstring BirthYear;
attribute wstring BirthMonth;
attribute wstring BirthDay;
attribute wstring Custom1;
attribute wstring Custom2;
attribute wstring Custom3;
attribute wstring Custom4;
attribute wstring Notes;
attribute unsigned long LastModifiedDate;
attribute boolean SendPlainText;
attribute unsigned long DbTableID;
attribute unsigned long DbRowID;
void GetCardValue(in string attrname, out wstring value);
void SetCardValue(in string attrname, in wstring value);
void SetAbDatabase(in nsIAddrDatabase database);
[noscript] void GetAnonymousStrAttrubutesList(out nsVoidArray attrlist);
[noscript] void GetAnonymousStrValuesList(out nsVoidArray valuelist);
[noscript] void GetAnonymousIntAttrubutesList(out nsVoidArray attrlist);
[noscript] void GetAnonymousIntValuesList(out nsVoidArray valuelist);
[noscript] void GetAnonymousBoolAttrubutesList(out nsVoidArray attrlist);
[noscript] void GetAnonymousBoolValuesList(out nsVoidArray valuelist);
void SetAnonymousStringAttribute(in string attrname, in string value);
void SetAnonymousIntAttribute(in string attrname, in unsigned long value);
void SetAnonymousBoolAttribute(in string attrname, in boolean value);
void AddAnonymousAttributesToDB();
void EditAnonymousAttributesInDB();
void GetCardURI(out string uri);
void AddCardToDatabase(in string uri);
void EditCardToDatabase(in string uri);
void CopyCard(in nsIAbCard srcCard);
void GetCollationKey(in wstring str, out wstring key);
};

View File

@@ -0,0 +1,51 @@
/* -*- Mode: C++; tab-width: 2; 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 "nsISupports.idl"
#include "nsIAbCard.idl"
#include "nsISupportsArray.idl"
[ptr] native nsFileSpec(nsFileSpec);
[ptr] native DIR_Server(DIR_Server);
%{C++
#include "nsFileSpec.h"
#include "nsDirPrefs.h"
%}
[scriptable, uuid(1920E485-0709-11d3-A2EC-001083003D0C)]
interface nsIAbDirectory : nsISupports {
attribute wstring DirName;
attribute unsigned long LastModifiedDate;
attribute DIR_Server server;
void GetDirFilePath(out string dbPath);
void GetChildNodes(out nsIEnumerator childList);
void GetChildCards(out nsIEnumerator childCards);
void AddChildCards(in string uriName, out nsIAbCard childCard);
void AddDirectory(in string uriName, out nsIAbDirectory childDir);
void DeleteDirectories(in nsISupportsArray dierctories);
void DeleteCards(in nsISupportsArray cards);
void HasCard(in nsIAbCard cards, out boolean hasCard);
void HasDirectory(in nsIAbDirectory dir, out boolean hasDir);
void GetMailingList(out nsIEnumerator mailingList);
void CreateNewDirectory(in wstring dirName, in string fileName);
void GetDirUri(out string uri);
};

View File

@@ -0,0 +1,29 @@
/* -*- Mode: C++; tab-width: 2; 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 "nsISupports.idl"
#include "nsIEnumerator.idl"
[scriptable, uuid(1920E484-0709-11d3-A2EC-001083003D0C)]
interface nsIAbListener : nsISupports {
void OnItemAdded(in nsISupports parentDir, in nsISupports item);
void OnItemRemoved(in nsISupports parentDir, in nsISupports item);
void OnItemPropertyChanged(in nsISupports item, in string property, in wstring oldValue, in wstring newValue);
};

View File

@@ -0,0 +1,49 @@
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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 "nsISupports.idl"
/*
* The mail session is a replacement for the old 4.x MSG_Master object. It
* contains mail session generic information such as the account manager, etc
* I'm starting this off as an empty interface and as people feel they need to
* add more information to it, they can. I think this is a better approach
* than trying to port over the old MSG_Master in its entirety as that had a
* lot of cruft in it....
*/
#include "nsISupports.idl"
#include "nsIAbListener.idl"
#include "nsIAbDirectory.idl"
#include "nsIAbCard.idl"
[scriptable, uuid(C5339441-303F-11d3-9E13-00A0C92B5F0D)]
interface nsIAddrBookSession : nsISupports {
void AddAddressBookListener(in nsIAbListener listener);
void RemoveAddressBookListener(in nsIAbListener listener);
void NotifyItemPropertyChanged(in nsISupports item,
in string property,
in wstring oldValue,
in wstring newValue);
void NotifyDirectoryItemAdded(in nsIAbDirectory directory, in nsISupports item);
void NotifyDirectoryItemDeleted(in nsIAbDirectory directory, in nsISupports item);
[noscript] void GetUserProfileDirectory(out nsFileSpec userDir);
};

View File

@@ -0,0 +1,37 @@
/* -*- Mode: C++; tab-width: 2; 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 "nsISupports.idl"
#include "nsIAbCard.idl"
interface nsIAddrDBListener;
[scriptable, uuid(A4186D8A-1DD0-11d3-A303-001083003D0C)]
interface nsIAddrDBAnnouncer : nsISupports {
void AddListener(in nsIAddrDBListener listener);
void RemoveListener(in nsIAddrDBListener listener);
void NotifyCardAttribChange(in unsigned long abCode,
in nsIAddrDBListener instigator);
void NotifyCardEntryChange (in unsigned long abCode,
in nsIAbCard card,
in nsIAddrDBListener instigator);
void NotifyAnnouncerGoingAway();
};

View File

@@ -0,0 +1,32 @@
/* -*- Mode: C++; tab-width: 2; 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 "nsISupports.idl"
#include "nsIAbCard.idl"
interface nsIAddrDBAnnouncer;
[scriptable, uuid(A4186D89-1DD0-11d3-A303-001083003D0C)]
interface nsIAddrDBListener : nsISupports {
void OnCardAttribChange(in unsigned long abCode,
in nsIAddrDBListener instigator);
void OnCardEntryChange (in unsigned long abCode,
in nsIAbCard card,
in nsIAddrDBListener instigator);
void OnAnnouncerGoingAway(in nsIAddrDBAnnouncer instigator);
};

View File

@@ -0,0 +1,109 @@
/* -*- Mode: C++; tab-width: 2; 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.
*/
/* nsFileSpec is declared in nsIAbDirectory.idl */
#include "nsIAddrDBAnnouncer.idl"
#include "nsIAbCard.idl"
#include "nsIAbDirectory.idl"
[ptr] native nsIMdbTableRowCursor(nsIMdbTableRowCursor);
[ptr] native nsIMdbEnv(nsIMdbEnv);
[ptr] native nsIMdbRow(nsIMdbRow);
%{C++
#include "mdb.h"
%}
[scriptable, uuid(A4186D8B-1DD0-11d3-A303-001083003D0C)]
interface nsIAddrDatabase : nsIAddrDBAnnouncer {
attribute nsFileSpec dbPath;
[noscript] void Open(in nsFileSpec folderName, in boolean create,
out nsIAddrDatabase pCardDB, in boolean upgrading);
void Close(in boolean forceCommit);
[noscript] void OpenMDB(in nsFileSpec dbName, in boolean create);
void CloseMDB(in boolean commit);
void OpenAnonymousDB(out nsIAddrDatabase pCardDB);
void CloseAnonymousDB(in boolean forceCommit);
void Commit(in unsigned long commitType);
void ForceClosed();
void CreateNewCardAndAddToDB(in nsIAbCard newCard, in boolean beNotify);
void EnumerateCards(in nsIAbDirectory directory, out nsIEnumerator result);
void EnumerateMailingLists(in nsIAbDirectory directory, out nsIEnumerator result);
void DeleteCard(in nsIAbCard card, in boolean beNotify);
void EditCard(in nsIAbCard card, in boolean beNotify);
void ContainsCard(in nsIAbCard card, out boolean hasCard);
void GetCardForEmailAddress(in nsIAbDirectory directory, in string emailAddress, out nsIAbCard card);
void SetAnonymousStringAttribute(in string attrname, in string value);
void GetAnonymousStringAttribute(in string attrname, out string value);
void SetAnonymousIntAttribute(in string attrname, in unsigned long value);
void GetAnonymousIntAttribute(in string attrname, out unsigned long value);
void SetAnonymousBoolAttribute(in string attrname, in boolean value);
void GetAnonymousBoolAttribute(in string attrname, out boolean value);
void AddAnonymousAttributesToDB();
void RemoveAnonymousAttributesFromDB();
void EditAnonymousAttributesInDB();
void AddAnonymousAttributesFromCard(in nsIAbCard card);
void RemoveAnonymousAttributesFromCard(in nsIAbCard card);
void EditAnonymousAttributesFromCard(in nsIAbCard card);
[noscript] void GetNewRow(out nsIMdbRow newRow);
[noscript] void AddCardRowToDB(in nsIMdbRow newRow);
[noscript] void AddFirstName(in nsIMdbRow row, in string value);
[noscript] void AddLastName(in nsIMdbRow row, in string value);
[noscript] void AddDisplayName(in nsIMdbRow row, in string value);
[noscript] void AddNickName(in nsIMdbRow row, in string value);
[noscript] void AddPrimaryEmail(in nsIMdbRow row, in string value);
[noscript] void Add2ndEmail(in nsIMdbRow row, in string value);
[noscript] void AddWorkPhone(in nsIMdbRow row, in string value);
[noscript] void AddHomePhone(in nsIMdbRow row, in string value);
[noscript] void AddFaxNumber(in nsIMdbRow row, in string value);
[noscript] void AddPagerNumber(in nsIMdbRow row, in string value);
[noscript] void AddCellularNumber(in nsIMdbRow row, in string value);
[noscript] void AddHomeAddress(in nsIMdbRow row, in string value);
[noscript] void AddHomeAddress2(in nsIMdbRow row, in string value);
[noscript] void AddHomeCity(in nsIMdbRow row, in string value);
[noscript] void AddHomeState(in nsIMdbRow row, in string value);
[noscript] void AddHomeZipCode(in nsIMdbRow row, in string value);
[noscript] void AddHomeCountry(in nsIMdbRow row, in string value);
[noscript] void AddWorkAddress(in nsIMdbRow row, in string value);
[noscript] void AddWorkAddress2(in nsIMdbRow row, in string value);
[noscript] void AddWorkCity(in nsIMdbRow row, in string value);
[noscript] void AddWorkState(in nsIMdbRow row, in string value);
[noscript] void AddWorkZipCode(in nsIMdbRow row, in string value);
[noscript] void AddWorkCountry(in nsIMdbRow row, in string value);
[noscript] void AddJobTitle(in nsIMdbRow row, in string value);
[noscript] void AddDepartment(in nsIMdbRow row, in string value);
[noscript] void AddCompany(in nsIMdbRow row, in string value);
[noscript] void AddWebPage1(in nsIMdbRow row, in string value);
[noscript] void AddWebPage2(in nsIMdbRow row, in string value);
[noscript] void AddBirthYear(in nsIMdbRow row, in string value);
[noscript] void AddBirthMonth(in nsIMdbRow row, in string value);
[noscript] void AddBirthDay(in nsIMdbRow row, in string value);
[noscript] void AddCustom1(in nsIMdbRow row, in string value);
[noscript] void AddCustom2(in nsIMdbRow row, in string value);
[noscript] void AddCustom3(in nsIMdbRow row, in string value);
[noscript] void AddCustom4(in nsIMdbRow row, in string value);
[noscript] void AddNotes(in nsIMdbRow row, in string value);
};

View File

@@ -0,0 +1,43 @@
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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 "nsISupports.idl"
#include "xulstubs.idl"
#include "nsIRDFCompositeDataSource.idl"
#include "nsIAbCard.idl"
%{C++
#include "nsIDOMNodeList.h"
#include "nsIDOMXULElement.h"
%}
interface nsIDOMWindow;
[scriptable, uuid(D60B84F1-2A8C-11d3-9E07-00A0C92B5F0D)]
interface nsIAddressBook : nsISupports {
void DeleteCards(in nsIDOMXULElement tree, in nsIDOMXULElement srcDir, in nsIDOMNodeList node);
void NewAddressBook(in nsIRDFCompositeDataSource db, in nsIDOMXULElement srcDir, in wstring name);
void DeleteAddressBooks(in nsIRDFCompositeDataSource db, in nsIDOMXULElement srcDir, in nsIDOMNodeList node);
void PrintCard();
void PrintAddressbook();
void SetWebShellWindow(in nsIDOMWindow win);
void ImportAddressBook();
};

View File

@@ -0,0 +1,26 @@
/* -*- 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) 1999 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsISupports.idl"
#include "nsrootidl.idl"
[scriptable, uuid(CA2A6B08-3625-11d3-988E-001083010E9B)]
interface nsIAutoCompleteListener : nsISupports {
void OnAutoCompleteResult(in nsISupports aParam, in wstring aOriginalString, in wstring aMatch);
};

View File

@@ -0,0 +1,28 @@
/* -*- 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) 1999 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsISupports.idl"
#include "nsrootidl.idl"
interface nsIAutoCompleteListener;
[scriptable, uuid(CA2A6B07-3625-11d3-988E-001083010E9B)]
interface nsIAutoCompleteSession : nsISupports {
void AutoComplete(in nsISupports aParam, in wstring aSearchString, in nsIAutoCompleteListener aResultListener);
};

View File

@@ -0,0 +1,28 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = content locale skin
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,33 @@
# 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 local files which get copied to the res\mailnews\messenger directory
#
abAddressBookNameDialog.js
abAddressBookNameDialog.xul
abCardOverlay.js
abCardOverlay.xul
abCardViewOverlay.js
abCardViewOverlay.xul
abCommon.js
abDirTreeOverlay.xul
abEditCardDialog.xul
abNewCardDialog.xul
abResultsTreeOverlay.xul
abSelectAddressesDialog.js
abSelectAddressesDialog.xul
addressbook.js
addressbook.xul

View File

@@ -0,0 +1,51 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
SAMPLES_DIR = $(DIST)/bin/chrome/addressbook/content/default
EXPORT_RESOURCE_SAMPLES = \
abAddressBookNameDialog.js \
abAddressBookNameDialog.xul \
abCardOverlay.js \
abCardOverlay.xul \
abCardViewOverlay.js \
abCardViewOverlay.xul \
abCommon.js \
abDirTreeOverlay.xul \
abEditCardDialog.xul \
abNewCardDialog.xul \
abResultsTreeOverlay.xul \
abSelectAddressesDialog.js \
abSelectAddressesDialog.xul \
addressbook.js \
addressbook.xul \
$(NULL)
include $(topsrcdir)/config/rules.mk
GARBAGE += $(addprefix $(SAMPLES_DIR)/, $(EXPORT_RESOURCE_SAMPLES))
install::
$(INSTALL) $(addprefix $(srcdir)/, $(EXPORT_RESOURCE_SAMPLES)) $(SAMPLES_DIR)

View File

@@ -0,0 +1,37 @@
var okCallback = 0;
function abNameOnLoad()
{
doSetOKCancel(abNameOKButton, 0);
// look in arguments[0] for parameters
if (window.arguments && window.arguments[0])
{
if ( window.arguments[0].title )
{
dump("title = " + window.arguments[0].title + "\n");
var title = window.arguments[0].title;
top.window.title = title;
}
if ( window.arguments[0].okCallback )
top.okCallback = window.arguments[0].okCallback;
}
// focus on input
var name = document.getElementById('name');
if ( name )
name.focus();
}
function abNameOKButton()
{
if ( top.okCallback )
{
var name = document.getElementById('name').value;
top.okCallback(name);
}
return true;
}

View File

@@ -0,0 +1,51 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://addressbook/locale/abAddressBookNameDialog.dtd">
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
align="vertical"
class="dialog"
onload="abNameOnLoad()"
style="padding:10px">
<html:script language="JavaScript" src="chrome://addressbook/content/abAddressBookNameDialog.js"/>
<keyset id="keyset"/>
<box align="vertical" style="width:36em; min-height:12em">
<spring flex="100%"/>
<html:div style="margin-bottom:.3em">&name.label;</html:div>
<html:input tabindex="0" type="text" id="name" style="width:100%"/>
<spring flex="100%"/>
<box id="okCancelButtons"/>
</box>
</window>

View File

@@ -0,0 +1,303 @@
var editCard;
var newCardTitlePrefix = "New Card for ";
var editCardTitlePrefix = "Card for ";
var editCardFirstLastSeparator = " ";
var editCardLastFirstSeparator = ", ";
function OnLoadNewCard()
{
InitEditCard();
doSetOKCancel(NewCardOKButton, 0);
editCard.card = 0;
editCard.okCallback = 0;
editCard.titlePrefix = newCardTitlePrefix;
if (window.arguments && window.arguments[0])
{
if ( window.arguments[0].selectedAB )
editCard.selectedAB = window.arguments[0].selectedAB;
}
// set popup with address book names
var abPopup = document.getElementById('abPopup');
if ( editCard.selectedAB )
abPopup.value = editCard.selectedAB;
//// FIX ME - looks like we need to focus on both the text field and the tab widget
//// probably need to do the same in the addressing widget
// focus on first name
var firstName = document.getElementById('FirstName');
if ( firstName )
firstName.focus();
}
function OnLoadEditCard()
{
InitEditCard();
doSetOKCancel(EditCardOKButton, 0);
editCard.titlePrefix = editCardTitlePrefix;
if (window.arguments && window.arguments[0])
{
if ( window.arguments[0].card )
editCard.card = window.arguments[0].card;
if ( window.arguments[0].okCallback )
editCard.okCallback = window.arguments[0].okCallback;
if ( window.arguments[0].abURI )
editCard.abURI = window.arguments[0].abURI;
}
// set global state variables
// if first or last name entered, disable generateDisplayName
if ( editCard.generateDisplayName && (editCard.card.FirstName.length +
editCard.card.LastName.length +
editCard.card.DisplayName.length > 0) )
{
editCard.generateDisplayName = false;
}
GetCardValues(editCard.card, document);
top.window.title = editCard.titlePrefix + editCard.card.DisplayName;
}
function InitEditCard()
{
// create editCard object that contains global variables for editCard.js
editCard = new Object;
// get pointer to nsIPref object
var prefs = Components.classes["component://netscape/preferences"];
if ( prefs )
{
prefs = prefs.getService();
if ( prefs )
{
prefs = prefs.QueryInterface(Components.interfaces.nsIPref);
editCard.prefs = prefs;
}
}
// get specific prefs that editCard will need
if ( prefs )
{
try {
editCard.displayLastNameFirst = prefs.GetBoolPref("mail.addr_book.lastnamefirst");
}
catch (ex) {
dump("failed to get the mail.addr_book.lastnamefirst pref\n");
}
try {
editCard.generateDisplayName = prefs.GetBoolPref("mail.addr_book.displayName.autoGeneration");
}
catch (ex) {
dump("failed to get the mail.addr_book.displayName.autoGeneration pref\n");
}
}
}
function NewCardOKButton()
{
var popup = document.getElementById('abPopup');
if ( popup )
{
var uri = popup.value;
// FIX ME - hack to avoid crashing if no ab selected because of blank option bug from template
// should be able to just remove this if we are not seeing blank lines in the ab popup
if ( !uri )
return false; // don't close window
// -----
var cardproperty = Components.classes["component://netscape/addressbook/cardproperty"].createInstance();
cardproperty = cardproperty.QueryInterface(Components.interfaces.nsIAbCard);
if ( cardproperty )
{
SetCardValues(cardproperty, document);
cardproperty.AddCardToDatabase(uri);
}
}
return true; // close the window
}
function EditCardOKButton()
{
SetCardValues(editCard.card, document);
editCard.card.EditCardToDatabase(editCard.abURI);
// callback to allow caller to update
if ( editCard.okCallback )
editCard.okCallback();
return true; // close the window
}
// Move the data from the cardproperty to the dialog
function GetCardValues(cardproperty, doc)
{
if ( cardproperty )
{
doc.getElementById('FirstName').value = cardproperty.FirstName;
doc.getElementById('LastName').value = cardproperty.LastName;
doc.getElementById('DisplayName').value = cardproperty.DisplayName;
doc.getElementById('NickName').value = cardproperty.NickName;
doc.getElementById('PrimaryEmail').value = cardproperty.PrimaryEmail;
doc.getElementById('SecondEmail').value = cardproperty.SecondEmail;
//doc.getElementById('SendPlainText').value = cardproperty.SendPlainText;
doc.getElementById('WorkPhone').value = cardproperty.WorkPhone;
doc.getElementById('HomePhone').value = cardproperty.HomePhone;
doc.getElementById('FaxNumber').value = cardproperty.FaxNumber;
doc.getElementById('PagerNumber').value = cardproperty.PagerNumber;
doc.getElementById('CellularNumber').value = cardproperty.CellularNumber;
doc.getElementById('HomeAddress').value = cardproperty.HomeAddress;
doc.getElementById('HomeAddress2').value = cardproperty.HomeAddress2;
doc.getElementById('HomeCity').value = cardproperty.HomeCity;
doc.getElementById('HomeState').value = cardproperty.HomeState;
doc.getElementById('HomeZipCode').value = cardproperty.HomeZipCode;
doc.getElementById('HomeCountry').value = cardproperty.HomeCountry;
doc.getElementById('JobTitle').value = cardproperty.JobTitle;
doc.getElementById('Department').value = cardproperty.Department;
doc.getElementById('Company').value = cardproperty.Company;
doc.getElementById('WorkAddress').value = cardproperty.WorkAddress;
doc.getElementById('WorkAddress2').value = cardproperty.WorkAddress2;
doc.getElementById('WorkCity').value = cardproperty.WorkCity;
doc.getElementById('WorkState').value = cardproperty.WorkState;
doc.getElementById('WorkZipCode').value = cardproperty.WorkZipCode;
doc.getElementById('WorkCountry').value = cardproperty.WorkCountry;
doc.getElementById('WebPage1').value = cardproperty.WebPage1;
doc.getElementById('Custom1').value = cardproperty.Custom1;
doc.getElementById('Custom2').value = cardproperty.Custom2;
doc.getElementById('Custom3').value = cardproperty.Custom3;
doc.getElementById('Custom4').value = cardproperty.Custom4;
doc.getElementById('Notes').value = cardproperty.Notes;
}
}
// Move the data from the dialog to the cardproperty to be stored in the database
function SetCardValues(cardproperty, doc)
{
if (cardproperty)
{
cardproperty.FirstName = doc.getElementById('FirstName').value;
cardproperty.LastName = doc.getElementById('LastName').value;
cardproperty.DisplayName = doc.getElementById('DisplayName').value;
cardproperty.NickName = doc.getElementById('NickName').value;
cardproperty.PrimaryEmail = doc.getElementById('PrimaryEmail').value;
cardproperty.SecondEmail = doc.getElementById('SecondEmail').value;
//cardproperty.SendPlainText = doc.getElementById('SendPlainText').value;
cardproperty.WorkPhone = doc.getElementById('WorkPhone').value;
cardproperty.HomePhone = doc.getElementById('HomePhone').value;
cardproperty.FaxNumber = doc.getElementById('FaxNumber').value;
cardproperty.PagerNumber = doc.getElementById('PagerNumber').value;
cardproperty.CellularNumber = doc.getElementById('CellularNumber').value;
cardproperty.HomeAddress = doc.getElementById('HomeAddress').value;
cardproperty.HomeAddress2 = doc.getElementById('HomeAddress2').value;
cardproperty.HomeCity = doc.getElementById('HomeCity').value;
cardproperty.HomeState = doc.getElementById('HomeState').value;
cardproperty.HomeZipCode = doc.getElementById('HomeZipCode').value;
cardproperty.HomeCountry = doc.getElementById('HomeCountry').value;
cardproperty.JobTitle = doc.getElementById('JobTitle').value;
cardproperty.Department = doc.getElementById('Department').value;
cardproperty.Company = doc.getElementById('Company').value;
cardproperty.WorkAddress = doc.getElementById('WorkAddress').value;
cardproperty.WorkAddress2 = doc.getElementById('WorkAddress2').value;
cardproperty.WorkCity = doc.getElementById('WorkCity').value;
cardproperty.WorkState = doc.getElementById('WorkState').value;
cardproperty.WorkZipCode = doc.getElementById('WorkZipCode').value;
cardproperty.WorkCountry = doc.getElementById('WorkCountry').value;
cardproperty.WebPage1 = doc.getElementById('WebPage1').value;
cardproperty.Custom1 = doc.getElementById('Custom1').value;
cardproperty.Custom2 = doc.getElementById('Custom2').value;
cardproperty.Custom3 = doc.getElementById('Custom3').value;
cardproperty.Custom4 = doc.getElementById('Custom4').value;
cardproperty.Notes = doc.getElementById('Notes').value;
}
}
function NewCardCancelButton()
{
top.window.close();
}
function EditCardCancelButton()
{
top.window.close();
}
function GenerateDisplayName()
{
if ( editCard.generateDisplayName )
{
var displayName;
var firstNameField = document.getElementById('FirstName');
var lastNameField = document.getElementById('LastName');
var displayNameField = document.getElementById('DisplayName');
/* todo: i18N work todo here */
/* this used to be XP_GetString(MK_ADDR_FIRST_LAST_SEP) */
/* todo: mscott says there was a pref in 4.5 that would */
/* cause GenerateDisplayName() to do nothing. */
/* the i18N people need it. */
/* find the pref and heed it. */
/* trying to be smart about no using the first last sep */
/* if first or last is missing */
/* todo: is this i18N safe? */
var separator = "";
if ( lastNameField.value && firstNameField.value )
{
if ( editCard.displayLastNameFirst )
separator = editCardLastFirstSeparator;
else
separator = editCardFirstLastSeparator;
}
if ( editCard.displayLastNameFirst )
displayName = lastNameField.value + separator + firstNameField.value;
else
displayName = firstNameField.value + separator + lastNameField.value;
displayNameField.value = displayName;
top.window.title = editCard.titlePrefix + displayName;
}
}
function DisplayNameChanged()
{
// turn off generateDisplayName if the user changes the display name
editCard.generateDisplayName = false;
var title = editCard.titlePrefix + document.getElementById('DisplayName').value;
if ( top.window.title != title )
top.window.title = title;
}

View File

@@ -0,0 +1,293 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<!DOCTYPE window SYSTEM "chrome://addressbook/locale/abCardOverlay.dtd">
<overlay id="editcardOverlay"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script language="JavaScript" src="chrome://addressbook/content/abCardOverlay.js"/>
<box id="editcard" align="vertical">
<tabcontrol align="vertical" style="margin:5px">
<tabbox align="horizontal">
<tab>&Name.tab;</tab>
<tab>&Address.tab;</tab>
<tab>&Other.tab;</tab>
</tabbox>
<tabpanel align="vertical" flex="100%" style="border:2px groove white">
<!-- ** Name Tab ** -->
<box index="name" align="vertical" flex="100%">
<html:fieldset flex="100%">
<html:legend align="left">
<html:div style="font-weight: bold">&Name.box;</html:div>
</html:legend>
<box align="vertical" style="width:100%">
<box align="horizontal" flex="100%">
<spring flex="100%"/>
<html:label for="FirstName">&FirstName.label;</html:label>
<html:input type="text" id="FirstName" class="CardEdit" onkeyup="top.GenerateDisplayName()" />
</box>
<box align="horizontal">
<spring flex="100%"/>
<html:label for="LastName">&LastName.label;</html:label>
<html:input id="LastName" type="text" class="CardEdit" onkeyup="top.GenerateDisplayName()"/>
</box>
<box align="horizontal">
<spring flex="100%"/>
<html:label for="DisplayName">&DisplayName.label;</html:label>
<html:input id="DisplayName" type="text" class="CardEdit" onkeyup="top.DisplayNameChanged()"/>
</box>
<box align="horizontal">
<spring flex="100%"/>
<html:label for="NickName">&NickName.label;</html:label>
<html:input id="NickName" type="text" class="CardEdit"/>
</box>
</box>
</html:fieldset>
<html:fieldset flex="100%">
<html:legend align="left">
<html:div style="font-weight: bold">&Internet.box;</html:div>
</html:legend>
<box align="vertical" style="width:100%">
<box align="horizontal">
<spring flex="100%"/>
<html:label for="PrimaryEmail">&PrimaryEmail.label;</html:label>
<html:input id="PrimaryEmail" type="text" class="CardEdit"/>
</box>
<box align="horizontal">
<spring flex="100%"/>
<html:label for="SecondEmail">&SecondEmail.label;</html:label>
<html:input id="SecondEmail" type="text" class="CardEdit"/>
</box>
<box align="horizontal">
<spring flex="100%"/>
<box class="CardEditWidth">
<html:input id="SendPlainText" type="checkbox"/>
<html:label for="SendPlainText">&SendPlainText.label;</html:label>
</box>
</box>
</box>
</html:fieldset>
<html:fieldset flex="100%">
<html:legend align="left">
<html:div style="font-weight: bold">&Phones.box;</html:div>
</html:legend>
<box align="vertical" style="width:100%">
<box align="horizontal" style="vertical-align:baseline">
<spring flex="100%"/>
<html:label for="WorkPhone" style="vertical-align:baseline">&WorkPhone.label;</html:label>
<html:input id="WorkPhone" type="text" class="CardEdit" style="vertical-align:baseline"/>
</box>
<box align="horizontal">
<spring flex="100%"/>
<html:label for="HomePhone">&HomePhone.label;</html:label>
<html:input id="HomePhone" type="text" class="CardEdit"/>
</box>
<box align="horizontal">
<spring flex="100%"/>
<html:label for="FaxNumber">&FaxNumber.label;</html:label>
<html:input id="FaxNumber" type="text" class="CardEdit"/>
</box>
<box align="horizontal">
<spring flex="100%"/>
<html:label for="PagerNumber">&PagerNumber.label;</html:label>
<html:input id="PagerNumber" type="text" class="CardEdit"/>
</box>
<box align="horizontal">
<spring flex="100%"/>
<html:label for="CellularNumber">&CellularNumber.label;</html:label>
<html:input id="CellularNumber" type="text" class="CardEdit"/>
</box>
</box>
</html:fieldset>
</box>
<!-- ** Address Tab ** -->
<box index="address" align="vertical" flex="100%">
<html:fieldset flex="100%">
<html:legend align="left">
<html:div style="font-weight: bold">&Home.box;</html:div>
</html:legend>
<box align="vertical" style="width:100%">
<box align="horizontal">
<spring flex="100%"/>
<html:label for="HomeAddress">&HomeAddress.label;</html:label>
<html:input type="text" id="HomeAddress" class="CardEdit"/>
</box>
<box align="horizontal">
<spring flex="100%"/>
<html:label for="HomeAddress2">&HomeAddress2.label;</html:label>
<html:input type="text" id="HomeAddress2" class="CardEdit"/>
</box>
<box align="horizontal">
<spring flex="100%"/>
<html:label for="HomeCity">&HomeCity.label;</html:label>
<html:input id="HomeCity" type="text" class="CardEdit"/>
</box>
<box align="horizontal">
<spring flex="100%"/>
<html:label for="HomeState">&HomeState.label;</html:label>
<box class="CardEditWidth">
<html:input id="HomeState" type="text" class="CardEdit" style="min-width:1em; width:8em"/>
<spring flex="100%"/>
<html:label for="HomeZipCode">&HomeZipCode.label;</html:label>
<html:input id="HomeZipCode" type="text" class="CardEdit" style="min-width:1em; width:8em"/>
</box>
</box>
<box align="horizontal">
<spring flex="100%"/>
<html:label for="HomeCountry">&HomeCountry.label;</html:label>
<html:input id="HomeCountry" type="text" class="CardEdit"/>
</box>
</box>
</html:fieldset>
<html:fieldset style="width:100%">
<html:legend align="left">
<html:div style="font-weight: bold">&Work.box;</html:div>
</html:legend>
<box align="vertical" style="width:100%">
<box align="horizontal">
<spring flex="100%"/>
<html:label for="JobTitle">&JobTitle.label;</html:label>
<html:input type="text" id="JobTitle" class="CardEdit"/>
</box>
<box align="horizontal">
<spring flex="100%"/>
<html:label for="Department">&Department.label;</html:label>
<html:input type="text" id="Department" class="CardEdit"/>
</box>
<box align="horizontal">
<spring flex="100%"/>
<html:label for="Company">&Company.label;</html:label>
<html:input type="text" id="Company" class="CardEdit"/>
</box>
<box align="horizontal">
<spring flex="100%"/>
<html:label for="WorkAddress">&WorkAddress.label;</html:label>
<html:input type="text" id="WorkAddress" class="CardEdit"/>
</box>
<box align="horizontal">
<spring flex="100%"/>
<html:label for="WorkAddress2">&WorkAddress2.label;</html:label>
<html:input type="text" id="WorkAddress2" class="CardEdit"/>
</box>
<box align="horizontal">
<spring flex="100%"/>
<html:label for="WorkCity">&WorkCity.label;</html:label>
<html:input id="WorkCity" type="text" class="CardEdit"/>
</box>
<box align="horizontal">
<spring flex="100%"/>
<html:label for="WorkState">&WorkState.label;</html:label>
<box class="CardEditWidth">
<html:input id="WorkState" type="text" class="CardEdit" style="min-width:1em; width:8em"/>
<spring flex="100%"/>
<html:label for="WorkZipCode">&WorkZipCode.label;</html:label>
<html:input id="WorkZipCode" type="text" class="CardEdit" style="min-width:1em; width:8em"/>
</box>
</box>
<box align="horizontal">
<spring flex="100%"/>
<html:label for="WorkCountry">&WorkCountry.label;</html:label>
<html:input id="WorkCountry" type="text" class="CardEdit"/>
</box>
</box>
</html:fieldset>
<!--html:fieldset style="width:100%">
<html:legend align="left">
<html:div style="font-weight: bold">&Web.box;</html:div>
</html:legend-->
<box align="vertical" style="width:100%">
<box align="horizontal">
<!--spring flex="100%"/-->
<html:label for="WebPage1">&WebPage1.label;</html:label>
<html:input type="text" id="WebPage1" class="CardEdit" flex="100%"/>
</box>
</box>
<!--/html:fieldset-->
</box>
<!-- ** Other Tab ** -->
<box index="other" align="vertical" flex="100%">
<box align="vertical" style="width:100%">
<box align="horizontal" flex="100%">
<spring flex="100%"/>
<html:label for="Custom1">&Custom1.label;</html:label>
<html:input type="text" id="Custom1" class="CardEdit"/>
</box>
<box align="horizontal" flex="100%">
<spring flex="100%"/>
<html:label for="Custom2">&Custom2.label;</html:label>
<html:input type="text" id="Custom2" class="CardEdit"/>
</box>
<box align="horizontal" flex="100%">
<spring flex="100%"/>
<html:label for="Custom3">&Custom3.label;</html:label>
<html:input type="text" id="Custom3" class="CardEdit"/>
</box>
<box align="horizontal" flex="100%">
<spring flex="100%"/>
<html:label for="Custom4">&Custom4.label;</html:label>
<html:input type="text" id="Custom4" class="CardEdit"/>
</box>
</box>
<html:fieldset style="width:100%">
<html:legend align="left">
<html:div style="font-weight: bold">&Notes.box;</html:div>
</html:legend>
<box align="vertical" style="width:100%">
<html:textarea id="Notes" rows="15"/>
</box>
</html:fieldset>
</box>
</tabpanel>
</tabcontrol>
</box>
</overlay>

View File

@@ -0,0 +1,231 @@
var zWork = "Work: ";
var zHome = "Home: ";
var zFax = "Fax: ";
var zCellular = "Cellular: ";
var zPager = "Pager: ";
var zCustom1 = "Custom 1: ";
var zCustom2 = "Custom 2: ";
var zCustom3 = "Custom 3: ";
var zCustom4 = "Custom 4: ";
var rdf;
var cvData;
function OnLoadCardView()
{
// This should be in an onload for the card view window, but that is not currently working
rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();
rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);
var doc = document;
/* data for address book, prefixes: "cvb" = card view box
"cvh" = crad view header
"cv" = card view (normal fields) */
cvData = new Object;
// Card View Box
cvData.CardViewBox = doc.getElementById("CardViewBox");
// Title
cvData.CardTitle = doc.getElementById("CardTitle");
// Name section
cvData.cvbName = doc.getElementById("cvbName");
cvData.cvhName = doc.getElementById("cvhName");
cvData.cvNickname = doc.getElementById("cvNickname");
cvData.cvEmail1 = doc.getElementById("cvEmail1");
cvData.cvEmail2 = doc.getElementById("cvEmail2");
// Home section
cvData.cvbHome = doc.getElementById("cvbHome");
cvData.cvhHome = doc.getElementById("cvhHome");
cvData.cvHomeAddress = doc.getElementById("cvHomeAddress");
cvData.cvHomeAddress2 = doc.getElementById("cvHomeAddress2");
cvData.cvHomeCityStZip = doc.getElementById("cvHomeCityStZip");
cvData.cvHomeCountry = doc.getElementById("cvHomeCountry");
// Other section
cvData.cvbOther = doc.getElementById("cvbOther");
cvData.cvhOther = doc.getElementById("cvhOther");
cvData.cvCustom1 = doc.getElementById("cvCustom1");
cvData.cvCustom2 = doc.getElementById("cvCustom2");
cvData.cvCustom3 = doc.getElementById("cvCustom3");
cvData.cvCustom4 = doc.getElementById("cvCustom4");
cvData.cvNotes = doc.getElementById("cvNotes");
// Phone section
cvData.cvbPhone = doc.getElementById("cvbPhone");
cvData.cvhPhone = doc.getElementById("cvhPhone");
cvData.cvPhWork = doc.getElementById("cvPhWork");
cvData.cvPhHome = doc.getElementById("cvPhHome");
cvData.cvPhFax = doc.getElementById("cvPhFax");
cvData.cvPhCellular = doc.getElementById("cvPhCellular");
cvData.cvPhPager = doc.getElementById("cvPhPager");
// Work section
cvData.cvbWork = doc.getElementById("cvbWork");
cvData.cvhWork = doc.getElementById("cvhWork");
cvData.cvJobTitle = doc.getElementById("cvJobTitle");
cvData.cvDepartment = doc.getElementById("cvDepartment");
cvData.cvCompany = doc.getElementById("cvCompany");
cvData.cvWorkAddress = doc.getElementById("cvWorkAddress");
cvData.cvWorkAddress2 = doc.getElementById("cvWorkAddress2");
cvData.cvWorkCityStZip = doc.getElementById("cvWorkCityStZip");
cvData.cvWorkCountry = doc.getElementById("cvWorkCountry");
}
function DisplayCardViewPane(abNode)
{
var uri = abNode.getAttribute('id');
var cardResource = top.rdf.GetResource(uri);
var card = cardResource.QueryInterface(Components.interfaces.nsIAbCard);
// FIX ME - this should use a i18n name routine in JS
var name = card.DisplayName;
if ( card.FirstName.length + card.LastName.length > 0 )
name = card.FirstName + " " + card.LastName;
var nickname;
if ( card.NickName )
nickname = "\"" + card.NickName + "\"";
var data = top.cvData;
var visible;
// set fields in card view pane
cvSetNode(data.CardTitle, "Card for " + card.DisplayName);
// Name section
cvSetNode(data.cvhName, name);
cvSetNode(data.cvNickname, nickname);
cvSetNode(data.cvEmail1, card.PrimaryEmail);
cvSetNode(data.cvEmail2, card.SecondEmail);
// Home section
visible = cvSetNode(data.cvHomeAddress, card.HomeAddress);
visible = cvSetNode(data.cvHomeAddress2, card.HomeAddress2) || visible;
visible = cvSetCityStateZip(data.cvHomeCityStZip, card.HomeCity, card.HomeState, card.HomeZipCode) || visible;
visible = cvSetNode(data.cvHomeCountry, card.HomeCountry) || visible;
cvSetVisible(data.cvhHome, visible);
// Other section
visible = cvSetNodeWithLabel(data.cvCustom1, zCustom1, card.Custom1);
visible = cvSetNodeWithLabel(data.cvCustom2, zCustom2, card.Custom2) || visible;
visible = cvSetNodeWithLabel(data.cvCustom3, zCustom3, card.Custom3) || visible;
visible = cvSetNodeWithLabel(data.cvCustom4, zCustom4, card.Custom4) || visible;
visible = cvSetNode(data.cvNotes, card.Notes) || visible;
cvSetVisible(data.cvhOther, visible);
// Phone section
visible = cvSetNodeWithLabel(data.cvPhWork, zWork, card.WorkPhone);
visible = cvSetNodeWithLabel(data.cvPhHome, zHome, card.HomePhone) || visible;
visible = cvSetNodeWithLabel(data.cvPhFax, zFax, card.FaxNumber) || visible;
visible = cvSetNodeWithLabel(data.cvPhCellular, zCellular, card.CellularNumber) || visible;
visible = cvSetNodeWithLabel(data.cvPhPager, zPager, card.PagerNumber) || visible;
cvSetVisible(data.cvhPhone, visible);
// Work section
visible = cvSetNode(data.cvJobTitle, card.JobTitle);
visible = cvSetNode(data.cvDepartment, card.Department) || visible;
visible = cvSetNode(data.cvCompany, card.Company) || visible;
visible = cvSetNode(data.cvWorkAddress, card.WorkAddress) || visible;
visible = cvSetNode(data.cvWorkAddress2, card.WorkAddress2) || visible;
visible = cvSetCityStateZip(data.cvWorkCityStZip, card.WorkCity, card.WorkState, card.WorkZipCode) || visible;
visible = cvSetNode(data.cvWorkCountry, card.WorkCountry) || visible;
cvSetVisible(data.cvhWork, visible);
// make the card view box visible
cvSetVisible(top.cvData.CardViewBox, true);
}
function ClearCardViewPane()
{
cvSetVisible(top.cvData.CardViewBox, false);
/* can remove this code now that boxes handle display:none
// HACK - we need to be able to set the entire box or div to display:none when bug fixed
var data = top.cvData;
// title
cvSetVisible(data.CardTitle, false);
// Name section
cvSetVisible(data.cvhName, false);
cvSetVisible(data.cvNickname, false);
cvSetVisible(data.cvEmail1, false);
cvSetVisible(data.cvEmail2, false);
// Home section
cvSetVisible(data.cvhHome, false);
cvSetVisible(data.cvHomeAddress, false);
cvSetVisible(data.cvHomeAddress2, false);
cvSetVisible(data.cvHomeCityStZip, false);
cvSetVisible(data.cvHomeCountry, false);
// Other section
cvSetVisible(data.cvhOther, false);
cvSetVisible(data.cvCustom1, false);
cvSetVisible(data.cvCustom2, false);
cvSetVisible(data.cvCustom3, false);
cvSetVisible(data.cvCustom4, false);
cvSetVisible(data.cvNotes, false);
// Phone section
cvSetVisible(data.cvhPhone, false);
cvSetVisible(data.cvPhWork, false);
cvSetVisible(data.cvPhHome, false);
cvSetVisible(data.cvPhFax, false);
cvSetVisible(data.cvPhCellular, false);
cvSetVisible(data.cvPhPager, false);
// Work section
cvSetVisible(data.cvhWork, false);
cvSetVisible(data.cvJobTitle, false);
cvSetVisible(data.cvDepartment, false);
cvSetVisible(data.cvCompany, false);
cvSetVisible(data.cvWorkAddress, false);
cvSetVisible(data.cvWorkAddress2, false);
cvSetVisible(data.cvWorkCityStZip, false);
cvSetVisible(data.cvWorkCountry, false);
*/
}
function cvSetNodeWithLabel(node, label, text)
{
if ( text )
return cvSetNode(node, label + text);
else
{
cvSetVisible(node, false);
return false;
}
}
function cvSetCityStateZip(node, city, state, zip)
{
var text;
if ( city )
{
text = city;
if ( state || zip )
text += ", ";
}
if ( state )
text += state + " ";
if ( zip )
text += zip;
return cvSetNode(node, text);
}
function cvSetNode(node, text)
{
node.childNodes[0].nodeValue = text;
var visible;
if ( text )
visible = true;
else
visible = false;
cvSetVisible(node, visible);
return visible;
}
function cvSetVisible(node, visible)
{
if ( visible )
node.removeAttribute("hide");
else
node.setAttribute("hide", "true");
}

View File

@@ -0,0 +1,94 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<!DOCTYPE window SYSTEM "chrome://addressbook/locale/abCardViewOverlay.dtd">
<overlay xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script language="JavaScript" src="chrome://addressbook/content/abCardViewOverlay.js"/>
<box id="CardViewBox"
align="vertical"
flex="100%"
style="overflow:auto; background-color:#dddddd; padding-left:5px; padding-right:5px">
<html:div hide="true" style="font-size:150%; font-weight:bold; border-bottom:2px solid black" id="CardTitle">*</html:div>
<box align="horizontal" flex="100%">
<box align="vertical" flex="100%" style="width:100px">
<box id="cvbName" align="vertical">
<html:div class="CardViewHeading" hide="true" id="cvhName">*</html:div>
<html:div class="CardViewText" hide="true" id="cvNickname">*</html:div>
<html:div class="CardViewText" hide="true" id="cvEmail1">*</html:div>
<html:div class="CardViewText" hide="true" id="cvEmail2">*</html:div>
</box>
<box id="cvbHome" align="vertical">
<html:div class="CardViewHeading" hide="true" id="cvhHome">&home.heading;</html:div>
<html:div class="CardViewText" hide="true" id="cvHomeAddress">*</html:div>
<html:div class="CardViewText" hide="true" id="cvHomeAddress2">*</html:div>
<html:div class="CardViewText" hide="true" id="cvHomeCityStZip">*</html:div>
<html:div class="CardViewText" hide="true" id="cvHomeCountry">*</html:div>
</box>
<box id="cvbOther" align="vertical">
<html:div class="CardViewHeading" hide="true" id="cvhOther">&other.heading;</html:div>
<html:div class="CardViewText" hide="true" id="cvCustom1">*</html:div>
<html:div class="CardViewText" hide="true" id="cvCustom2">*</html:div>
<html:div class="CardViewText" hide="true" id="cvCustom3">*</html:div>
<html:div class="CardViewText" hide="true" id="cvCustom4">*</html:div>
<html:div class="CardViewText" hide="true" id="cvNotes">*</html:div>
</box>
</box>
<spring style="width:20px"/>
<box align="vertical" flex="100%" style="width:100px">
<box id="cvbPhone" align="vertical">
<html:div class="CardViewHeading" hide="true" id="cvhPhone">&phone.heading;</html:div>
<html:div class="CardViewText" hide="true" id="cvPhWork">*</html:div>
<html:div class="CardViewText" hide="true" id="cvPhHome">*</html:div>
<html:div class="CardViewText" hide="true" id="cvPhFax">*</html:div>
<html:div class="CardViewText" hide="true" id="cvPhCellular">*</html:div>
<html:div class="CardViewText" hide="true" id="cvPhPager">*</html:div>
</box>
<box id="cvbWork" align="vertical">
<html:div class="CardViewHeading" hide="true" id="cvhWork">&work.heading;</html:div>
<html:div class="CardViewText" hide="true" id="cvJobTitle">*</html:div>
<html:div class="CardViewText" hide="true" id="cvDepartment">*</html:div>
<html:div class="CardViewText" hide="true" id="cvCompany">*</html:div>
<html:div class="CardViewText" hide="true" id="cvWorkAddress">*</html:div>
<html:div class="CardViewText" hide="true" id="cvWorkAddress2">*</html:div>
<html:div class="CardViewText" hide="true" id="cvWorkCityStZip">*</html:div>
<html:div class="CardViewText" hide="true" id="cvWorkCountry">*</html:div>
</box>
</box>
</box>
</box>
</overlay>

View File

@@ -0,0 +1,287 @@
// functions needed from abMainWindow and abSelectAddresses
// Controller object for Results Pane
var ResultsPaneController =
{
supportsCommand: function(command)
{
switch ( command )
{
case "cmd_selectAll":
case "cmd_delete":
return true;
default:
return false;
}
},
isCommandEnabled: function(command)
{
dump('ResultsPaneController::isCommandEnabled(' + command + ')\n');
switch ( command )
{
case "cmd_selectAll":
return true;
case "cmd_delete":
var resultsTree = document.getElementById('resultsTree');
if ( resultsTree && resultsTree.selectedItems )
return true;
else
return false;
default:
return false;
}
},
doCommand: function(command)
{
var resultsTree = document.getElementById('resultsTree');
switch ( command )
{
case "cmd_selectAll":
if ( resultsTree )
{
dump("select all now!!!!!!" + "\n");
resultsTree.selectAll();
}
break;
case "cmd_delete":
if ( resultsTree )
{
var cardList = resultsTree.selectedItems;
top.addressbook.DeleteCards(resultsTree, resultsTree, cardList);
}
break;
}
}
};
// Controller object for Dir Pane
var DirPaneController =
{
supportsCommand: function(command)
{
switch ( command )
{
case "cmd_selectAll":
case "cmd_delete":
return true;
default:
return false;
}
},
isCommandEnabled: function(command)
{
dump('DirPaneController::isCommandEnabled(' + command + ')\n');
switch ( command )
{
case "cmd_selectAll":
return true;
case "cmd_delete":
var dirTree = document.getElementById('dirTree');
if ( dirTree && dirTree.selectedItems )
return true;
else
return false;
default:
return false;
}
},
doCommand: function(command)
{
var dirTree = document.getElementById('dirTree');
switch ( command )
{
case "cmd_selectAll":
if ( dirTree )
{
dump("select all now!!!!!!" + "\n");
dirTree.selectAll();
}
break;
case "cmd_delete":
if ( dirTree )
top.addressbook.DeleteAddressBooks(dirTree.database, dirTree, dirTree.selectedItems);
break;
}
}
};
function SetupCommandUpdateHandlers()
{
var widget;
// dir pane
widget = document.getElementById('dirTree');
if ( widget ) {
dump('About to execute appendController(DirPaneController \n');
widget.controllers.appendController(DirPaneController);
dump('Finished appendController(DirPaneController \n');
}
// results pane
widget = document.getElementById('resultsTree');
if ( widget ) {
dump('About to execute appendController(ResultsPaneController \n');
widget.controllers.appendController(ResultsPaneController);
dump('Finished to execute appendController(ResultsPaneController \n');
}
}
function AbNewCard()
{
var selectedAB = 0;
var tree = document.getElementById('dirTree');
if ( tree && tree.selectedItems && (tree.selectedItems.length == 1) )
selectedAB = tree.selectedItems[0].getAttribute('id');
goNewCardDialog(selectedAB);
}
function AbEditCard()
{
var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();
rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);
var resultsTree = document.getElementById('resultsTree');
if ( resultsTree.selectedItems && resultsTree.selectedItems.length == 1 )
{
var uri = resultsTree.selectedItems[0].getAttribute('id');
var card = rdf.GetResource(uri);
card = card.QueryInterface(Components.interfaces.nsIAbCard);
goEditCardDialog(document.getElementById('resultsTree').getAttribute('ref'),
card, top.editCardCallback);
}
}
function AbNewMessage()
{
var msgComposeService = Components.classes["component://netscape/messengercompose"].getService();
msgComposeService = msgComposeService.QueryInterface(Components.interfaces.nsIMsgComposeService);
msgComposeService.OpenComposeWindowWithValues(null, 0, GetSelectedAddresses(), null, null,
null, null, null);
}
function GetSelectedAddresses()
{
var item, uri, rdf, cardResource, card;
var selectedAddresses = "";
var resultsTree = document.getElementById('resultsTree');
rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();
rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);
if ( resultsTree.selectedItems && resultsTree.selectedItems.length )
{
for ( item = 0; item < resultsTree.selectedItems.length; item++ )
{
uri = resultsTree.selectedItems[item].getAttribute('id');
cardResource = rdf.GetResource(uri);
card = cardResource.QueryInterface(Components.interfaces.nsIAbCard);
if ( selectedAddresses )
selectedAddresses += ",";
selectedAddresses += "\"" + card.DisplayName + "\" <" + card.PrimaryEmail + ">";
}
}
dump("selectedAddresses = " + selectedAddresses + "\n");
return selectedAddresses;
}
function SelectFirstAddressBook()
{
var tree = document.getElementById('dirTree');
var body = document.getElementById('dirTreeBody');
if ( tree && body )
{
var treeitems = body.getElementsByTagName('treeitem');
if ( treeitems && treeitems.length > 0 )
{
tree.selectItem(treeitems[0]);
ChangeDirectoryByDOMNode(treeitems[0]);
}
}
}
function DirPaneSelectionChange()
{
// FIX ME - deselect the items in the results pane to work around tree bug
var resultsTree = document.getElementById('resultsTree');
if ( resultsTree )
resultsTree.clearItemSelection();
// ----
var tree = document.getElementById('dirTree');
if ( tree && tree.selectedItems && (tree.selectedItems.length == 1) )
ChangeDirectoryByDOMNode(tree.selectedItems[0]);
else
{
var tree = document.getElementById('resultsTree');
if ( tree )
tree.setAttribute('ref', null);
}
}
function ChangeDirectoryByDOMNode(dirNode)
{
var uri = dirNode.getAttribute('id');
dump("uri = " + uri + "\n");
var tree = document.getElementById('resultsTree');
if ( tree )
tree.setAttribute('ref', uri);
}
function ResultsPaneSelectionChange()
{
// FIX ME! - Should use some js var to determine abmain vs selectaddress dialog
// not in ab window if no parent.parent.rdf
if ( parent.parent.rdf )
{
var tree = document.getElementById('resultsTree');
if ( tree && tree.selectedItems && (tree.selectedItems.length == 1) )
DisplayCardViewPane(tree.selectedItems[0]);
else
ClearCardViewPane();
}
}
function SortResultPane(column, sortKey)
{
var node = document.getElementById(column);
if(!node) return(false);
var isupports = Components.classes["component://netscape/rdf/xul-sort-service"].getService();
if (!isupports) return(false);
var xulSortService = isupports.QueryInterface(Components.interfaces.nsIXULSortService);
if (!xulSortService) return(false);
// sort!!!
sortDirection = "ascending";
var currentDirection = node.getAttribute('sortDirection');
if (currentDirection == "ascending")
sortDirection = "descending";
else if (currentDirection == "descending")
sortDirection = "ascending";
else sortDirection = "ascending";
xulSortService.Sort(node, sortKey, sortDirection);
return(true);
}

View File

@@ -0,0 +1,64 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<!DOCTYPE window SYSTEM "chrome://addressbook/locale/abDirTreeOverlay.dtd">
<overlay xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<!-- FIX ME - remove document.commandDispatcher.updateCommands() when tree selection calls this automatically -->
<tree id="dirTree"
class="abDirectory"
style="width:100%; height:100%"
ref="abdirectory://"
open="true"
datasources="rdf:addressdirectory"
onselect="DirPaneSelectionChange(); document.commandDispatcher.updateCommands('select');">
<template>
<rule>
<treechildren>
<treeitem uri="...">
<treerow >
<treecell indent="true" value="rdf:http://home.netscape.com/NC-rdf#DirName"/>
</treerow>
</treeitem>
</treechildren>
</rule>
</template>
<treecol rdf:resource="http://home.netscape.com/NC-rdf#DirName"/>
<treehead>
<treerow>
<treecell>&directoryColumn.label;</treecell>
</treerow>
</treehead>
<treechildren id="dirTreeBody"
rdf:containment="http://home.netscape.com/NC-rdf#child"
rdf:ignore="http://home.netscape.com/NC-rdf#CardChild">
</treechildren>
</tree>
</overlay>

View File

@@ -0,0 +1,39 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<?xml-stylesheet href="chrome://addressbook/skin/" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<?xul-overlay href="chrome://addressbook/content/abCardOverlay.xul"?>
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="OnLoadEditCard()"
class="dialog"
align="vertical">
<keyset id="keyset"/>
<box id="editcard"/>
<box id="okCancelButtons"/>
</window>

View File

@@ -0,0 +1,63 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<?xml-stylesheet href="chrome://addressbook/skin/" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<?xul-overlay href="chrome://addressbook/content/abCardOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://addressbook/locale/abNewCardDialog.dtd">
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
title="&editcardWindow.title;"
onload="OnLoadNewCard()"
class="dialog"
align="vertical">
<!--html:script language="JavaScript" src="resource:/res/samples/DumpDOM.js"/-->
<keyset id="keyset"/>
<box align="horizontal">
<html:label for="abPopup">&chooseAddressBook.label;</html:label>
<html:select id="abPopup" ref="abdirectory://" datasources="rdf:addressdirectory">
<template>
<html:option uri="..." value="rdf:http://home.netscape.com/NC-rdf#DirUri">
<text value="rdf:http://home.netscape.com/NC-rdf#DirName"/>
</html:option>
</template>
</html:select>
</box>
<!--box align="horizontal">
<html:label for="chooseAddressBook">&chooseAddressBook.label;</html:label>
<html:select id="chooseAddressBook">
</html:select>
</box-->
<spring style="height:1em"/>
<box id="editcard"/>
<box id="okCancelButtons"/>
</window>

View File

@@ -0,0 +1,66 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<!DOCTYPE window SYSTEM "chrome://addressbook/locale/abResultsTreeOverlay.dtd">
<overlay xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<!-- FIX ME - remove document.commandDispatcher.updateCommands() when tree selection calls this automatically -->
<tree id="resultsTree"
class="abResults"
style="width:100%; height:100%"
datasources="rdf:addressdirectory rdf:addresscard"
onselect="top.ResultsPaneSelectionChange(); document.commandDispatcher.updateCommands('select');"
ondblclick="top.AbEditCard()"
containment="http://home.netscape.com/NC-rdf#CardChild">
<template>
<rule>
<treechildren>
<treeitem uri="...">
<treerow >
<treecell indent="true" value="rdf:http://home.netscape.com/NC-rdf#DisplayName"/>
<treecell value="rdf:http://home.netscape.com/NC-rdf#PrimaryEmail"/>
<treecell value="rdf:http://home.netscape.com/NC-rdf#WorkPhone"/>
</treerow>
</treeitem>
</treechildren>
</rule>
</template>
<treecol style="width:20%" id="NameColumn" rdf:resource="http://home.netscape.com/NC-rdf#DisplayName"/>
<treecol style="width:21%" id="EmailColumn" rdf:resource="http://home.netscape.com/NC-rdf#PrimaryEmail"/>
<treecol style="width:20%" id="WorkPhoneColumn" rdf:resource="http://home.netscape.com/NC-rdf#WorkPhone"/>
<treehead>
<treerow>
<treecell onclick="return top.SortResultPane('NameColumn', 'http://home.netscape.com/NC-rdf#DisplayName');">&nameColumn.label;</treecell>
<treecell onclick="return top.SortResultPane('EmailColumn', 'http://home.netscape.com/NC-rdf#PrimaryEmail');">&emailColumn.label;</treecell>
<treecell onclick="return top.SortResultPane('WorkPhoneColumn', 'http://home.netscape.com/NC-rdf#WorkPhone');">&phoneColumn.label;</treecell>
</treerow>
</treehead>
</tree>
</overlay>

View File

@@ -0,0 +1,183 @@
var addressbook = 0;
var composeWindow = 0;
var msgCompFields = 0;
var editCardCallback = 0;
// localization strings
var prefixTo = "To: ";
var prefixCc = "Cc: ";
var prefixBcc = "Bcc: ";
function OnLoadSelectAddress()
{
var toAddress="", ccAddress="", bccAddress="";
doSetOKCancel(SelectAddressOKButton, 0);
top.addressbook = Components.classes["component://netscape/addressbook"].createInstance();
top.addressbook = top.addressbook.QueryInterface(Components.interfaces.nsIAddressBook);
// look in arguments[0] for parameters
if (window.arguments && window.arguments[0])
{
// keep parameters in global for later
if ( window.arguments[0].composeWindow )
top.composeWindow = window.arguments[0].composeWindow;
if ( window.arguments[0].msgCompFields )
top.msgCompFields = window.arguments[0].msgCompFields;
if ( window.arguments[0].toAddress )
toAddress = window.arguments[0].toAddress;
if ( window.arguments[0].ccAddress )
ccAddress = window.arguments[0].ccAddress;
if ( window.arguments[0].bccAddress )
bccAddress = window.arguments[0].bccAddress;
dump("onload top.composeWindow: " + top.composeWindow + "\n");
dump("onload toAddress: " + toAddress + "\n");
// put the addresses into the bucket
AddAddressFromComposeWindow(toAddress, prefixTo);
AddAddressFromComposeWindow(ccAddress, prefixCc);
AddAddressFromComposeWindow(bccAddress, prefixBcc);
}
SelectFirstAddressBook();
}
function AddAddressFromComposeWindow(addresses, prefix)
{
if ( addresses )
{
var addressArray = addresses.split(",");
for ( var index = 0; index < addressArray.length; index++ )
{
// remove leading spaces
while ( addressArray[index][0] == " " )
addressArray[index] = addressArray[index].substring(1, addressArray[index].length);
AddAddressIntoBucket(prefix + addressArray[index]);
}
}
}
function SelectAddressOKButton()
{
var body = document.getElementById('bucketBody');
var item, row, cell, text, colon;
var toAddress="", ccAddress="", bccAddress="";
for ( var index = 0; index < body.childNodes.length; index++ )
{
item = body.childNodes[index];
if ( item.childNodes && item.childNodes.length )
{
row = item.childNodes[0];
if ( row.childNodes && row.childNodes.length )
{
cell = row.childNodes[0];
if ( cell.childNodes && cell.childNodes.length )
{
text = cell.childNodes[0];
if ( text && text.data && text.data.length )
{
switch ( text.data[0] )
{
case prefixTo[0]:
if ( toAddress )
toAddress += ", ";
toAddress += text.data.substring(prefixTo.length, text.data.length);
break;
case prefixCc[0]:
if ( ccAddress )
ccAddress += ", ";
ccAddress += text.data.substring(prefixCc.length, text.data.length);
break;
case prefixBcc[0]:
if ( bccAddress )
bccAddress += ", ";
bccAddress += text.data.substring(prefixBcc.length, text.data.length);
break;
}
}
}
}
}
}
// reset the UI in compose window
msgCompFields.SetTo(toAddress);
msgCompFields.SetCc(ccAddress);
msgCompFields.SetBcc(bccAddress);
top.composeWindow.CompFields2Recipients(top.msgCompFields);
return true;
}
function SelectAddressToButton()
{
AddSelectedAddressesIntoBucket(prefixTo);
}
function SelectAddressCcButton()
{
AddSelectedAddressesIntoBucket(prefixCc);
}
function SelectAddressBccButton()
{
AddSelectedAddressesIntoBucket(prefixBcc);
}
function AddSelectedAddressesIntoBucket(prefix)
{
var item, uri, rdf, cardResource, card, address;
rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();
rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);
var resultsTree = document.getElementById('resultsTree');
if ( resultsTree && resultsTree.selectedItems && resultsTree.selectedItems.length )
{
for ( item = 0; item < resultsTree.selectedItems.length; item++ )
{
uri = resultsTree.selectedItems[item].getAttribute('id');
cardResource = rdf.GetResource(uri);
card = cardResource.QueryInterface(Components.interfaces.nsIAbCard);
address = prefix + "\"" + card.DisplayName + "\" <" + card.PrimaryEmail + ">";
AddAddressIntoBucket(address);
}
}
}
function AddAddressIntoBucket(address)
{
var body = document.getElementById("bucketBody");
var item = document.createElement('treeitem');
var row = document.createElement('treerow');
var cell = document.createElement('treecell');
var text = document.createTextNode(address);
cell.appendChild(text);
row.appendChild(cell);
item.appendChild(row);
body.appendChild(item);
}
function RemoveSelectedFromBucket()
{
var bucketTree = document.getElementById("addressBucket");
if ( bucketTree )
{
var body = document.getElementById("bucketBody");
if ( body && bucketTree.selectedItems && bucketTree.selectedItems.length )
{
for ( var item = bucketTree.selectedItems.length - 1; item >= 0; item-- )
body.removeChild(bucketTree.selectedItems[item]);
}
}
}

View File

@@ -0,0 +1,141 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<?xml-stylesheet href="chrome://addressbook/skin/" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<?xul-overlay href="chrome://addressbook/content/abDirTreeOverlay.xul"?>
<?xul-overlay href="chrome://addressbook/content/abResultsTreeOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://addressbook/locale/abSelectAddressesDialog.dtd">
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&selectAddressWindow.title;"
class="dialog"
width="640" height="480"
style="width:100%; height:100%; padding:0px"
onload="OnLoadSelectAddress()"
align="vertical">
<html:script language="JavaScript" src="chrome://addressbook/content/abCommon.js"/>
<html:script language="JavaScript" src="chrome://addressbook/content/abSelectAddressesDialog.js"/>
<html:script language="JavaScript" src="chrome://messengercompose/content/MsgComposeCommands.js"/>
<html:script language="JavaScript" src="chrome://global/content/globalOverlay.js"/>
<!--html:script language="JavaScript" src="resource:/res/samples/DumpDOM.js"/-->
<keyset id="keyset"/>
<!-- Thin box across top, show names containing & stop, search buttons -->
<box align="horizontal" style="width:100%; padding:0px; padding-top:2px; padding-bottom:2px">
<html:div flex="100%" style="vertical-align: middle;">
<html:label for="searchtext" tabindex="0">&search.label;</html:label>
<html:input type="text" id="searchtext" flex="100%"/>
</html:div>
<spring style="width: 1em;"/>
<titledbutton id="stop" value="&stopButton.label;" class="push" onclick="SelectAddressStopButton()"/>
<spring style="width:5px"/>
<titledbutton id="search" value="&searchButton.label;" class="push" onclick="SelectAddressSearchButton()"/>
</box>
<!-- Main box, 3 pane and majority of buttons -->
<box align="horizontal" flex="100%">
<!-- 3 Pane box -->
<box align="horizontal" flex="100%" style="border-top:solid black 1px; border-bottom:solid black 1px">
<!-- dir tree -->
<box align="horizontal"
style="width:200px; height:100%; background-color:white; border-right:solid black 1px">
<!-- FIX ME - div is hack to make tree scroll properly -->
<html:div style="width:100px;height:100px" flex="1">
<tree id="dirTree"/>
</html:div>
</box>
<splitter collapse="before"/>
<!-- Box that holds results pane, (to,cc,bcc buttons), and address bucket -->
<box align="vertical" flex="100%" style="border-left:solid black 1px; border-right:solid black 1px">
<!-- Box that holds results pane and (to,cc,bcc buttons) -->
<box align="vertical" flex="100%">
<!-- results tree -->
<box flex="100%" align="vertical"
style="background-color:white; border-bottom:solid black 1px">
<!-- FIX ME - div is hack to make tree scroll properly -->
<html:div style="width:100px;height:100px" flex="1">
<tree id="resultsTree"/>
</html:div>
</box>
<!-- Box that holds (to,cc,bcc buttons) -->
<box align="horizontal" style="padding:0.3em; border-bottom:solid black 1px">
<spring flex="50%"/>
<titledbutton id="toButton" value="&toButton.label;" class="push" onclick="SelectAddressToButton()"/>
<spring style="width:10px"/>
<titledbutton id="ccButton" value="&ccButton.label;" class="push" onclick="SelectAddressCcButton()"/>
<spring style="width:10px"/>
<titledbutton id="bccButton" value="&bccButton.label;" class="push" onclick="SelectAddressBccButton()"/>
<spring flex="50%"/>
</box>
</box>
<splitter collapse="after"/>
<!-- Address bucket -->
<box align="vertical" style="height:170px; background-color:white; border-top:solid black 1px">
<html:div style="width:100px;height:100px" flex="1">
<tree id="addressBucket" style="width:100%; height:100%">
<treecol style="width:100%"/>
<treechildren id="bucketBody"/>
</tree>
</html:div>
</box>
</box>
</box>
<!-- Box with buttons on right edge of window -->
<box align="vertical" style="padding: .5em; padding-right: 0px">
<box align="vertical" flex="50%">
<spring style="height:10px"/>
<titledbutton id="new" value="&newButton.label;" class="push" onclick="AbNewCard()"/>
<spring style="height:10px"/>
<titledbutton id="edit" value="&editButton.label;" class="push" onclick="AbEditCard()"/>
<spring style="height:10px"/>
<titledbutton id="view" value="&viewButton.label;" class="push" onclick="SelectAddressViewButton()"/>
<spring flex="100%"/>
</box>
<box align="vertical" flex="50%">
<spring flex="50%"/>
<titledbutton id="remove" value="&removeButton.label;" class="push" onclick="RemoveSelectedFromBucket()"/>
<spring flex="50%"/>
</box>
</box>
</box>
<!-- OK & Cancel buttons -->
<box id="okCancelButtons"/>
</window>

View File

@@ -0,0 +1,183 @@
var addressbook = 0;
var editCardCallback = 0;
// functions used only by addressbook
function OnLoadAddressBook()
{
// FIX ME - later we will be able to use onload from the overlay
OnLoadCardView();
top.addressbook = Components.classes["component://netscape/addressbook"].createInstance();
top.addressbook = top.addressbook.QueryInterface(Components.interfaces.nsIAddressBook);
top.editCardCallback = UpdateCardView;
try {
top.addressbook.SetWebShellWindow(window)
}
catch (ex) {
dump("failed to set webshell window\n");
}
SetupCommandUpdateHandlers();
SelectFirstAddressBook();
}
function CommandUpdate_AddressBook()
{
dump("CommandUpdate_AddressBook\n");
// get selection info from dir pane
var tree = document.getElementById('dirTree');
var oneAddressBookSelected = false;
if ( tree && tree.selectedItems && (tree.selectedItems.length == 1) )
oneAddressBookSelected = true;
dump("oneAddressBookSelected = " + oneAddressBookSelected + "\n");
// get selection info from results pane
var selectedCards = GetSelectedAddresses();
var oneOrMoreCardsSelected = false;
if ( selectedCards )
oneOrMoreCardsSelected = true;
// set commands to enabled / disabled
goSetCommandEnabled('cmd_PrintCard', oneOrMoreCardsSelected);
goSetCommandEnabled('cmd_SortByName', oneAddressBookSelected);
goSetCommandEnabled('cmd_SortByEmail', oneAddressBookSelected);
goSetCommandEnabled('cmd_SortByPhone', oneAddressBookSelected);
AbUpdateCommandDelete();
}
// This function updates the text of the delete menu item and sets the state of the delete button
function AbUpdateCommandDelete()
{
var command = "cmd_delete";
var focusedElement = document.commandDispatcher.focusedElement;
var id = 0;
if ( focusedElement )
id = focusedElement.getAttribute('id');
dump("focusedOn = " + id + "\n");
switch ( id )
{
case "dirTree":
// menu text
goSetMenuValue(command, 'valueAddressBook');
// delete button
var dirTree = document.getElementById('dirTree');
var numSelected = 0;
if ( dirTree && dirTree.selectedItems )
numSelected = dirTree.selectedItems.length;
goSetCommandEnabled('button_delete', (numSelected>0));
break;
case "resultsTree":
// menu text
var resultsTree = document.getElementById('resultsTree');
var numSelected = 0;
if ( resultsTree && resultsTree.selectedItems )
numSelected = resultsTree.selectedItems.length;
if ( numSelected < 2 )
goSetMenuValue(command, 'valueCard');
else
goSetMenuValue(command, 'valueCards');
// delete button
goSetCommandEnabled('button_delete', (numSelected>0));
break;
default:
goSetMenuValue(command, 'valueDefault');
goSetCommandEnabled('button_delete', false);
break;
}
}
function UpdateCardView()
{
var tree = document.getElementById('resultsTree');
if ( tree && tree.selectedItems && (tree.selectedItems.length == 1) )
DisplayCardViewPane(tree.selectedItems[0]);
}
function AbClose()
{
top.window.close();
}
function AbNewAddressBook()
{
var dialog = window.openDialog("chrome://addressbook/content/abAddressBookNameDialog.xul",
"",
"chrome",
{title:"New Address Book",
okCallback:AbCreateNewAddressBook});
}
function AbCreateNewAddressBook(name)
{
top.addressbook.NewAddressBook(document.getElementById('dirTree').database, document.getElementById('resultsTree'), name);
}
function AbPrintCard()
{
dump("print card\n");
try {
addressbook.PrintCard();
}
catch (ex) {
dump("failed to print card\n");
}
}
function AbPrintAddressBook()
{
dump("print address book \n");
try {
addressbook.PrintAddressbook();
}
catch (ex) {
dump("failed to print address book\n");
}
}
function AbImport()
{
addressbook.ImportAddressBook();
}
/*
function AbDelete()
{
// dump("\AbDelete from XUL\n");
var tree = document.getElementById('resultsTree');
if ( tree )
{
//get the selected elements
var cardList = tree.selectedItems;
//get the current folder
var srcDirectory = document.getElementById('resultsTree');
dump("srcDirectory = " + srcDirectory + "\n");
top.addressbook.DeleteCards(tree, srcDirectory, cardList);
}
}
*/
/*
function AbDeleteDirectory()
{
// dump("\AbDeleteDirectory from XUL\n");
var tree = document.getElementById('dirTree');
// if ( tree && tree.selectedItems && tree.selectedItems.length )
if ( tree )
top.addressbook.DeleteAddressBooks(tree.database, tree, tree.selectedItems);
}
*/

View File

@@ -0,0 +1,247 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<?xml-stylesheet href="chrome://addressbook/skin/" type="text/css"?>
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<?xul-overlay href="chrome://global/content/tasksOverlay.xul"?>
<?xul-overlay href="chrome://addressbook/content/abDirTreeOverlay.xul"?>
<?xul-overlay href="chrome://addressbook/content/abResultsTreeOverlay.xul"?>
<?xul-overlay href="chrome://addressbook/content/abCardViewOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://addressbook/locale/abMainWindow.dtd">
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
height="420"
width="600"
align="vertical"
title="&addressbookWindow.title;"
windowtype="mail:addressbook"
onload="OnLoadAddressBook()">
<html:script language="JavaScript" src="chrome://addressbook/content/addressbook.js"/>
<html:script language="JavaScript" src="chrome://addressbook/content/abCommon.js"/>
<!--html:script language="JavaScript" src="resource:/res/samples/DumpDOM.js"/-->
<commands id="commands">
<commandset id="CommandUpdate_AddressBook"
commandupdater="true"
events="focus,blur,select"
oncommandupdate="CommandUpdate_AddressBook()"/>
<commandset id="globalEditMenuItems"/>
</commands>
<broadcasterset id="broadcasterset">
<!-- File Menu -->
<broadcaster id="cmd_newNavigator"/>
<broadcaster id="cmd_newMessage"/>
<broadcaster id="cmd_PrintCard" oncommand="AbPrintCard()" disabled="true"/>
<broadcaster id="cmd_close" oncommand="AbClose()"/>
<broadcaster id="cmd_quit"/>
<!-- Edit Menu -->
<broadcaster id="cmd_undo"/>
<broadcaster id="cmd_redo"/>
<broadcaster id="cmd_cut"/>
<broadcaster id="cmd_copy"/>
<broadcaster id="cmd_paste"/>
<broadcaster id="cmd_delete"
valueAddressBook="&deleteAbCmd.label;"
valueCard="&deleteCardCmd.label;"
valueCards="&deleteCardsCmd.label;"/>
<broadcaster id='cmd_selectAll'/>
<broadcaster id="cmd_preferences"/>
</broadcasterset>
<keyset id="keyset">
<!-- File Menu -->
<key id="key_newNavigator"/>
<key id="key_newMessage"/>
<key id="key_PrintCard" command="true" key="&printCardViewCmd.key;" observes="cmd_PrintCard" />
<key id="key_close"/>
<key id="key_quit"/>
<!-- Edit Menu -->
<key id="key_undo"/>
<key id="key_redo"/>
<key id="key_cut"/>
<key id="key_copy"/>
<key id="key_paste"/>
<key id="key_delete"/>
<key id="key_selectAll"/>
<key id="key_preferences"/>
</keyset>
<toolbox>
<menubar>
<menu id="menu_File">
<menupopup id="menu_FilePopup">
<menuitem value="&newCard.label;" accesskey="&newCard.accesskey;" oncommand="AbNewCard()"/>
<menu id="menu_New">
<menupopup>
<menuitem value="&newListCmd.label;" accesskey="&newListCmd.accesskey;" oncommand="AbNewList()"/>
<menuitem value="&newAddressBookCmd.label;" accesskey="&newAddressBookCmd.accesskey;" oncommand="AbNewAddressBook()"/>
<menuitem value="&newDirectoryCmd.label;" accesskey="&newDirectoryCmd.accesskey;" oncommand="AbNewDirectoryt()"/>
<menuseparator/>
<menuitem id="menu_newNavigator"/>
<menuitem id="menu_newMessage"/>
<menuitem id="cmd_newCard"/>
</menupopup>
</menu>
<menuseparator/>
<menuitem id="menu_close"/>
<menuseparator/>
<menuitem value="&importCmd.label;" oncommand="AbImport()"/>
<menuitem value="&exportCmd.label;" oncommand="AbExport()"/>
<menuseparator/>
<menuitem id="menu_pageSetup"/>
<menuitem value="&printPreviewCmd.label;" oncommand="AbPrintPreview()"/>
<menuitem value="&printCardViewCmd.label;" key="key_PrintCard" observes="cmd_PrintCard"/>
<menuitem value="&printAddressBook.label;" oncommand="AbPrintAddressBook()"/>
<menuseparator/>
</menupopup>
</menu>
<menu id="menu_Edit">
<menupopup>
<menuitem id="menu_undo"/>
<menuitem id="menu_redo"/>
<menuseparator/>
<menuitem id="menu_cut"/>
<menuitem id="menu_copy"/>
<menuitem id="menu_paste"/>
<menuitem id="menu_delete"/>
<menuseparator/>
<menuitem id="menu_selectAll"/>
<menuseparator/>
<menuitem value="&editCardCmd.label;"
accesskey="&editCardCmd.accesskey;"
oncommand="AbEditCard();"/>
<menuitem value="&htmlDomainCmd.label;"
accesskey="&htmlDomainCmd.accesskey;"
oncommand="AbHTMLDomain();"/>
<menuseparator/>
<menuitem id="menu_preferences" oncommand="goPreferences('addressbook.xul', 'chrome://addressbook/content/pref-addressing.xul')"/>
</menupopup>
</menu>
<menu id="menu_View">
<menupopup>
<menu id="menu_Toolbars">
<menupopup>
<menuitem id="menu_showAbToolbar"
value="&showAbToolbarCmd.label;"
accesskey="&showAbToolbarCmd.accesskey;"
oncommand="goToggleToolbar('abToolbar', 'menu_showAbToolbar')"
checked="true"/>
<menuitem id="menu_showTaskbar"/>
</menupopup>
</menu>
<menuitem value="&showCardPane.label;" oncommand="AbShowCardPane()"/>
<menu value="&sortMenu.label;">
<menupopup>
<menuitem value="&sortByNameCmd.label;"
id="cmd_SortByName"
disabled="true"
oncommand="top.SortResultPane('NameColumn', 'http://home.netscape.com/NC-rdf#DisplayName')"/>
<menuitem value="&sortByEmailCmd.label;"
id="cmd_SortByEmail"
disabled="true"
oncommand="top.SortResultPane('EmailColumn', 'http://home.netscape.com/NC-rdf#PrimaryEmail')"/>
<menuitem value="&sortByOrganizationCmd.label;" oncommand="AbSortByOrganization()"/>
<menuitem value="&sortByNicknameCmd.label;" oncommand="AbSortByNickname()"/>
<menuitem value="&sortByPhoneCmd.label;"
id="cmd_SortByPhone"
disabled="true"
oncommand="top.SortResultPane('WorkPhoneColumn', 'http://home.netscape.com/NC-rdf#WorkPhone')"/>
<menuitem value="&sortByCityCmd.label;" oncommand="AbSortByCity()"/>
<menuseparator/>
<menuitem value="&sortAscendingCmd.label;" oncommand="AbSortAscending()"/>
<menuitem value="&sortDescendingCmd.label;" oncommand="AbSortDescending()"/>
</menupopup>
</menu>
</menupopup>
</menu>
<menu id="tasksMenu"/>
<menu id="menu_Help"/>
<spring flex="100%"/>
</menubar>
<toolbar id="abToolbar" persist="collapsed">
<titledbutton src="&newcardButton.img;" align="top" value="&newcardButton.label;" onclick="AbNewCard()"/>
<titledbutton src="&newlistButton.img;" align="top" value="&newlistButton.label;" onclick="AbNewList()"/>
<titledbutton src="&editButton.img;" align="top" value="&editButton.label;" onclick="AbEditCard()"/>
<titledbutton src="&newmsgButton.img;" align="top" value="&newmsgButton.label;" onclick="AbNewMessage()"/>
<titledbutton id="button_delete" disabled="true" src="&deleteButton.img;" align="top" value="&deleteButton.label;" onclick="AbDelete()"/>
<html:div class="separator" align="vertical"/>
<box align="vertical">
<spring flex="100%"/>
<html:div style="padding-left:5px; padding-bottom:2px">&showNames.label;</html:div>
<html:input id="searchtext" type="text" align="bottom" style="min-width:100px; min-height:25px; padding-bottom:0px"/>
</box>
<titledbutton src="&stopButton.img;" align="top" value="&stopButton.label;" onclick="AbStop()"/>
<titledbutton src="&searchButton.img;" align="top" value="&searchButton.label;" onclick="AbSearch()"/>
<spring flex="100%"/>
<titledbutton id="Throbber" align="right" onclick="MsgHome('http://www.mozilla.org/')"/>
</toolbar>
</toolbox>
<!-- The main address book three pane -->
<box align="horizontal" flex="100%">
<!-- dir tree -->
<box align="horizontal"
style="width:200px; height:100%; background-color:white; border-right:solid black 1px">
<!-- FIX ME - div is hack to make tree scroll properly -->
<html:div style="width:100px;height:100px" flex="1">
<tree id="dirTree"/>
</html:div>
</box>
<splitter collapse="before"/>
<box align="vertical" flex="100%" style="border-left:solid black 1px">
<!-- results tree -->
<box flex="50%" align="vertical"
style="background-color:white; border-bottom:solid black 1px">
<!-- FIX ME - div is hack to make tree scroll properly -->
<html:div style="width:100px;height:100px" flex="1">
<tree id="resultsTree"/>
</html:div>
</box>
<splitter collapse="after"/>
<!-- card view -->
<box style="height:170px; border-top:solid black 1px">
<box id="CardViewBox"/>
</box>
</box>
</box>
<toolbox id="taskbox"/>
</window>

View File

@@ -0,0 +1,58 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..\..\..
include <$(DEPTH)\config\rules.mak>
install::
$(MAKE_INSTALL) abAddressBookNameDialog.js $(DIST)\bin\chrome\addressbook\content\default
$(MAKE_INSTALL) abAddressBookNameDialog.xul $(DIST)\bin\chrome\addressbook\content\default
$(MAKE_INSTALL) abCardOverlay.js $(DIST)\bin\chrome\addressbook\content\default
$(MAKE_INSTALL) abCardOverlay.xul $(DIST)\bin\chrome\addressbook\content\default
$(MAKE_INSTALL) abCardViewOverlay.js $(DIST)\bin\chrome\addressbook\content\default
$(MAKE_INSTALL) abCardViewOverlay.xul $(DIST)\bin\chrome\addressbook\content\default
$(MAKE_INSTALL) abCommon.js $(DIST)\bin\chrome\addressbook\content\default
$(MAKE_INSTALL) abDirTreeOverlay.xul $(DIST)\bin\chrome\addressbook\content\default
$(MAKE_INSTALL) abEditCardDialog.xul $(DIST)\bin\chrome\addressbook\content\default
$(MAKE_INSTALL) abNewCardDialog.xul $(DIST)\bin\chrome\addressbook\content\default
$(MAKE_INSTALL) abResultsTreeOverlay.xul $(DIST)\bin\chrome\addressbook\content\default
$(MAKE_INSTALL) abSelectAddressesDialog.js $(DIST)\bin\chrome\addressbook\content\default
$(MAKE_INSTALL) abSelectAddressesDialog.xul $(DIST)\bin\chrome\addressbook\content\default
$(MAKE_INSTALL) addressbook.js $(DIST)\bin\chrome\addressbook\content\default
$(MAKE_INSTALL) addressbook.xul $(DIST)\bin\chrome\addressbook\content\default
clobber::
rm -f $(DIST)\chrome\addressbook\content\default\abAddressBookNameDialog.js
rm -f $(DIST)\chrome\addressbook\content\default\abAddressBookNameDialog.xul
rm -f $(DIST)\chrome\addressbook\content\default\abCardOverlay.js
rm -f $(DIST)\chrome\addressbook\content\default\abCardOverlay.xul
rm -f $(DIST)\chrome\addressbook\content\default\abCardViewOverlay.js
rm -f $(DIST)\chrome\addressbook\content\default\abCardViewOverlay.xul
rm -f $(DIST)\chrome\addressbook\content\default\abCommon.js
rm -f $(DIST)\chrome\addressbook\content\default\abDirTreeOverlay.xul
rm -f $(DIST)\chrome\addressbook\content\default\abEditCardDialog.xul
rm -f $(DIST)\chrome\addressbook\content\default\abNewCardDialog.xul
rm -f $(DIST)\chrome\addressbook\content\default\abResultsTreeOverlay.xul
rm -f $(DIST)\chrome\addressbook\content\default\abSelectAddressesDialog.js
rm -f $(DIST)\chrome\addressbook\content\default\abSelectAddressesDialog.xul
rm -f $(DIST)\chrome\addressbook\content\default\addressbook.js
rm -f $(DIST)\chrome\addressbook\content\default\addressbook.xul

View File

@@ -0,0 +1,28 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = en-US
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,8 @@
abAddressBookNameDialog.dtd
abCardOverlay.dtd
abCardViewOverlay.dtd
abDirTreeOverlay.dtd
abMainWindow.dtd
abNewCardDialog.dtd
abResultsTreeOverlay.dtd
abSelectAddressesDialog.dtd

View File

@@ -0,0 +1,40 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
EXPORT_RESOURCE_CONTENT = \
$(srcdir)/abAddressBookNameDialog.dtd \
$(srcdir)/abCardOverlay.dtd \
$(srcdir)/abCardViewOverlay.dtd \
$(srcdir)/abDirTreeOverlay.dtd \
$(srcdir)/abMainWindow.dtd \
$(srcdir)/abNewCardDialog.dtd \
$(srcdir)/abResultsTreeOverlay.dtd \
$(srcdir)/abSelectAddressesDialog.dtd \
$(NULL)
include $(topsrcdir)/config/rules.mk
install::
$(INSTALL) $(EXPORT_RESOURCE_CONTENT) $(DIST)/bin/chrome/addressbook/locale/en-US

View File

@@ -0,0 +1,22 @@
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<!-- Labels -->
<!ENTITY name.label "Address Book Name">

View File

@@ -0,0 +1,65 @@
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<!-- Labels -->
<!ENTITY Name.tab "Name">
<!ENTITY Name.box "Name">
<!ENTITY FirstName.label "First:">
<!ENTITY LastName.label "Last:">
<!ENTITY DisplayName.label "Display:">
<!ENTITY NickName.label "Nickname:">
<!ENTITY Internet.box "Internet">
<!ENTITY PrimaryEmail.label "* Email:">
<!ENTITY SecondEmail.label "Additional Email:">
<!ENTITY SendPlainText.label "Send email as plain text (no html)">
<!ENTITY Phones.box "Phones">
<!ENTITY WorkPhone.label "Work:">
<!ENTITY HomePhone.label "Home:">
<!ENTITY FaxNumber.label "Fax:">
<!ENTITY PagerNumber.label "Pager:">
<!ENTITY CellularNumber.label "Cellular:">
<!ENTITY Address.tab "Address">
<!ENTITY Home.box "Home">
<!ENTITY HomeAddress.label "Address:">
<!ENTITY HomeAddress2.label "">
<!ENTITY HomeCity.label "City:">
<!ENTITY HomeState.label "State:">
<!ENTITY HomeZipCode.label "Zip:">
<!ENTITY HomeCountry.label "Country:">
<!ENTITY Work.box "Work">
<!ENTITY JobTitle.label "Title:">
<!ENTITY Department.label "Department:">
<!ENTITY Company.label "Organization:">
<!ENTITY WorkAddress.label "Address:">
<!ENTITY WorkAddress2.label "">
<!ENTITY WorkCity.label "City:">
<!ENTITY WorkState.label "State:">
<!ENTITY WorkZipCode.label "Zip:">
<!ENTITY WorkCountry.label "Country:">
<!--ENTITY Web.box "Web"-->
<!ENTITY WebPage1.label "Web Page:">
<!ENTITY Other.tab "Other">
<!ENTITY Custom1.label "Custom 1:">
<!ENTITY Custom2.label "Custom 2:">
<!ENTITY Custom3.label "Custom 3:">
<!ENTITY Custom4.label "Custom 4:">
<!ENTITY Notes.box "Notes">

View File

@@ -0,0 +1,25 @@
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<!-- Box Headings -->
<!ENTITY home.heading "Home">
<!ENTITY other.heading "Other">
<!ENTITY phone.heading "Phone">
<!ENTITY work.heading "Work">

View File

@@ -0,0 +1,22 @@
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<!-- Column Heading -->
<!ENTITY directoryColumn.label "Directory">

View File

@@ -0,0 +1,83 @@
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<!-- Title -->
<!ENTITY addressbookWindow.title "Address Book">
<!-- Menus: the . means that the menu item isn't implemented yet -->
<!-- File Menu -->
<!ENTITY newCard.label "New Address Book Card">
<!ENTITY newCard.accesskey "n">
<!ENTITY newListCmd.label ".Mailing List">
<!ENTITY newListCmd.accesskey "l">
<!ENTITY newAddressBookCmd.label "Address Book">
<!ENTITY newAddressBookCmd.accesskey "b">
<!ENTITY newDirectoryCmd.label ".Directory">
<!ENTITY newDirectoryCmd.accesskey "d">
<!ENTITY importCmd.label "Import...">
<!ENTITY exportCmd.label ".Export...">
<!ENTITY printPreviewCmd.label ".Print Preview">
<!ENTITY printCardViewCmd.label ".Print Card View...">
<!ENTITY printCardViewCmd.key "P">
<!ENTITY printAddressBook.label ".Print Address Book...">
<!-- Edit Menu -->
<!ENTITY deleteAbCmd.label "Delete Address Book">
<!ENTITY deleteCardCmd.label "Delete Card">
<!ENTITY deleteCardsCmd.label "Delete Selected Cards">
<!ENTITY editCardCmd.label "Edit Card...">
<!ENTITY editCardCmd.accesskey "e">
<!ENTITY htmlDomainCmd.label ".HTML Domains...">
<!ENTITY htmlDomainCmd.accesskey "h">
<!-- View Menu -->
<!ENTITY showAbToolbarCmd.label "Show Address Book Toolbar">
<!ENTITY showAbToolbarCmd.accesskey "a">
<!ENTITY showCardPane.label ".Card Pane">
<!ENTITY sortMenu.label "Sort">
<!ENTITY sortByNameCmd.label "by Name">
<!ENTITY sortByEmailCmd.label "by Email">
<!ENTITY sortByOrganizationCmd.label ".by Organization">
<!ENTITY sortByNicknameCmd.label ".by Nickname">
<!ENTITY sortByPhoneCmd.label "by Phone Number">
<!ENTITY sortByCityCmd.label ".by City">
<!ENTITY sortAscendingCmd.label ".Ascending">
<!ENTITY sortDescendingCmd.label ".Descending">
<!ENTITY stopSearchingCmd.label ".Stop Searching">
<!-- Toolbar items -->
<!ENTITY newcardButton.img "chrome://addressbook/skin/newcard.gif">
<!ENTITY newcardButton.label "New Card">
<!ENTITY newlistButton.img "chrome://addressbook/skin/newlist.gif">
<!ENTITY newlistButton.label ".New List">
<!ENTITY editButton.img "chrome://addressbook/skin/property.gif">
<!ENTITY editButton.label "Edit">
<!ENTITY newmsgButton.img "chrome://addressbook/skin/abnewmsg.gif">
<!ENTITY newmsgButton.label "New Msg">
<!ENTITY deleteButton.img "chrome://messenger/skin/trash.gif">
<!ENTITY deleteButton.label "Delete">
<!ENTITY stopButton.img "chrome://global/skin/stop.gif">
<!ENTITY stopButton.label ".Stop">
<!ENTITY searchButton.img "chrome://navigator/skin/search.gif">
<!ENTITY searchButton.label ".Search">
<!ENTITY showNames.label "Show names containing:">
<!ENTITY throbber.img "resource:/res/throbber/anims00.gif">
<!ENTITY throbber.url "http://www.mozilla.org/">

View File

@@ -0,0 +1,24 @@
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<!-- Title -->
<!ENTITY editcardWindow.title "New Card">
<!-- Labels -->
<!ENTITY chooseAddressBook.label "Add to: ">

View File

@@ -0,0 +1,25 @@
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<!-- Column Headings -->
<!ENTITY nameColumn.label "Name">
<!ENTITY emailColumn.label "Email">
<!-- LOCALIZATION NOTE (phoneColumn.label): "#" means "number" -->
<!ENTITY phoneColumn.label "Phone#">

View File

@@ -0,0 +1,40 @@
<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->
<!-- Title -->
<!ENTITY selectAddressWindow.title "Select Addresses">
<!-- Buttons -->
<!ENTITY toButton.label "To:">
<!ENTITY ccButton.label "Cc:">
<!ENTITY bccButton.label "Bcc:">
<!ENTITY stopButton.label ".Stop">
<!ENTITY searchButton.label ".Search...">
<!ENTITY newButton.label "New...">
<!ENTITY editButton.label "Edit...">
<!ENTITY viewButton.label ".View">
<!ENTITY removeButton.label "Remove">
<!ENTITY okButton.label "OK">
<!ENTITY cancelButton.label "Cancel">
<!ENTITY helpButton.label ".Help">
<!-- Toolbar items -->
<!ENTITY search.label "Show names containing:">

View File

@@ -0,0 +1,43 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..\..\..\..
include <$(DEPTH)\config\rules.mak>
DISTBROWSER=$(DIST)\bin\chrome\addressbook\locale\en-US
install::
$(MAKE_INSTALL) abAddressBookNameDialog.dtd $(DISTBROWSER)
$(MAKE_INSTALL) abCardOverlay.dtd $(DISTBROWSER)
$(MAKE_INSTALL) abCardViewOverlay.dtd $(DISTBROWSER)
$(MAKE_INSTALL) abDirTreeOverlay.dtd $(DISTBROWSER)
$(MAKE_INSTALL) abMainWindow.dtd $(DISTBROWSER)
$(MAKE_INSTALL) abNewCardDialog.dtd $(DISTBROWSER)
$(MAKE_INSTALL) abResultsTreeOverlay.dtd $(DISTBROWSER)
$(MAKE_INSTALL) abSelectAddressesDialog.dtd $(DISTBROWSER)
clobber::
rm -f $(DIST)\bin\chrome\addressbook\locale\en-US\abAddressBookNameDialog.dtd
rm -f $(DIST)\bin\chrome\addressbook\locale\en-US\abCardOverlay.dtd
rm -f $(DIST)\bin\chrome\addressbook\locale\en-US\abCardViewOverlay.dtd
rm -f $(DIST)\bin\chrome\addressbook\locale\en-US\abDirTreeOverlay.dtd
rm -f $(DIST)\bin\chrome\addressbook\locale\en-US\abMainWindow.dtd
rm -f $(DIST)\bin\chrome\addressbook\locale\en-US\abNewCardDialog.dtd
rm -f $(DIST)\bin\chrome\addressbook\locale\en-US\abResultsTreeOverlay.dtd
rm -f $(DIST)\bin\chrome\addressbook\locale\en-US\abSelectAddressesDialog.dtd

View File

@@ -0,0 +1,22 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..\..\..
DIRS= en-US
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,22 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..\..
DIRS= content locale skin
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,27 @@
# 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 local files which get copied to the res\mailnews\messenger directory
#
addressbook.css
newcard.gif
newlist.gif
property.gif
abnewmsg.gif
person.gif
list.gif
myaddrbk.gif

View File

@@ -0,0 +1,44 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
SAMPLES_DIR = $(DIST)/bin/chrome/addressbook/skin/default
EXPORT_RESOURCE_SAMPLES = \
addressbook.css \
newcard.gif \
newlist.gif \
property.gif \
abnewmsg.gif \
person.gif \
list.gif \
myaddrbk.gif \
$(NULL)
include $(topsrcdir)/config/rules.mk
GARBAGE += $(addprefix $(SAMPLES_DIR)/, $(EXPORT_RESOURCE_SAMPLES))
install::
$(INSTALL) $(addprefix $(srcdir)/, $(EXPORT_RESOURCE_SAMPLES)) $(SAMPLES_DIR)

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

View File

@@ -0,0 +1,78 @@
/*
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
*/
/* CardEdit styles - used in the Card Edit Dialog */
box[class="CardEditWidth"] {
width : 24.4em;
margin-left : 0px;
margin-right : 8px;
}
input[class="CardEdit"] {
width : 25em;
height : 1.5em;
margin : 0px;
padding : 0px;
padding-right : 0px;
min-height : 1.5em;
}
/* CardView styles - used in the Card View Pane*/
div[class="CardViewHeading"] {
padding: 1px;
padding-left: 5px;
color: white;
background-color: #5050ff;
font-weight: bold;
margin-top: 8px;
margin-bottom: 3px;
}
div[class="CardViewText"] {
padding-left: 20px;
padding-right: 2px;
color:inherit;
}
/* Custom Trees */
tree[class="abDirectory"] treeitem > treerow > treecell > .tree-icon {
list-style-image: url("chrome://addressbook/skin/myaddrbk.gif");
}
tree[class="abResults"] treeitem > treerow > treecell > .tree-icon {
list-style-image: url("chrome://addressbook/skin/person.gif");
}
/* Address Book specific style */
[hide] {
display: none;
}
titledbutton#Throbber
{
list-style-image:url(chrome://navigator/skin/animthrob_single.gif);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

View File

@@ -0,0 +1,43 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..\..\..
MODULE=addrbook
include <$(DEPTH)\config\rules.mak>
install::
$(MAKE_INSTALL) addressbook.css $(DIST)\bin\chrome\addressbook\skin\default
$(MAKE_INSTALL) newcard.gif $(DIST)\bin\chrome\addressbook\skin\default
$(MAKE_INSTALL) newlist.gif $(DIST)\bin\chrome\addressbook\skin\default
$(MAKE_INSTALL) property.gif $(DIST)\bin\chrome\addressbook\skin\default
$(MAKE_INSTALL) abnewmsg.gif $(DIST)\bin\chrome\addressbook\skin\default
$(MAKE_INSTALL) person.gif $(DIST)\bin\chrome\addressbook\skin\default
$(MAKE_INSTALL) list.gif $(DIST)\bin\chrome\addressbook\skin\default
$(MAKE_INSTALL) myaddrbk.gif $(DIST)\bin\chrome\addressbook\skin\default
clobber::
rm -f $(DIST)\chrome\addressbook\skin\default\addressbook.css
rm -f $(DIST)\chrome\addressbook\skin\default\newcard.gif
rm -f $(DIST)\chrome\addressbook\skin\default\newlist.gif
rm -f $(DIST)\chrome\addressbook\skin\default\property.gif
rm -f $(DIST)\chrome\addressbook\skin\default\abnewmsg.gif
rm -f $(DIST)\chrome\addressbook\skin\default\person.gif
rm -f $(DIST)\chrome\addressbook\skin\default\list.gif
rm -f $(DIST)\chrome\addressbook\skin\default\myaddrbk.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

View File

@@ -0,0 +1,20 @@
# 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 local files which get copied to the mozilla:dist:mailnews directory
#
nsDirPrefs.h

View File

@@ -0,0 +1,67 @@
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = addrbook
LIBRARY_NAME = addrbook_s
CPPSRCS = \
nsAddressBook.cpp \
nsAddrBookSession.cpp \
nsAbRDFDataSource.cpp \
nsAbRDFResource.cpp \
nsCardDataSource.cpp \
nsDirectoryDataSource.cpp \
nsAbCard.cpp \
nsAbDirectory.cpp \
nsAbCardProperty.cpp \
nsDirPrefs.cpp \
nsAddrDatabase.cpp \
nsAbDirProperty.cpp \
nsAbAutoCompleteSession.cpp \
nsAbAddressCollecter.cpp \
$(NULL)
EXPORTS = \
nsAddressBook.h \
nsAddrBookSession.h \
nsAbRDFDataSource.h \
nsAbRDFResource.h \
nsCardDataSource.h \
nsDirectoryDataSource.h \
nsAbCard.h \
nsAbDirectory.h \
nsAbCardProperty.h \
nsDirPrefs.h \
nsAddrDatabase.h \
nsAbDirProperty.h \
nsAbAutoCompleteSession.h \
nsAbAddressCollecter.h \
$(NULL)
# we don't want the shared lib, but we want to force the creation of a static lib.
override NO_SHARED_LIB=1
override NO_STATIC_LIB=
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,71 @@
#!nmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..\..
MODULE= addrbook
include <$(DEPTH)\config\config.mak>
################################################################################
## exports
EXPORTS= \
nsAddressBook.h \
nsAddrBookSession.h \
nsAbRDFDataSource.h \
nsAbRDFResource.h \
nsCardDataSource.h \
nsDirectoryDataSource.h \
nsAbCard.h \
nsAbDirectory.h \
nsAbCardProperty.h \
nsDirPrefs.h \
nsAddrDatabase.h \
nsAbDirProperty.h \
nsAbAutoCompleteSession.h \
nsAbAddressCollecter.h \
$(NULL)
################################################################################
## library
LIBRARY_NAME=addrbook_s
CPP_OBJS= \
.\$(OBJDIR)\nsAddressBook.obj \
.\$(OBJDIR)\nsAddrBookSession.obj \
.\$(OBJDIR)\nsAbRDFDataSource.obj \
.\$(OBJDIR)\nsAbRDFResource.obj \
.\$(OBJDIR)\nsCardDataSource.obj \
.\$(OBJDIR)\nsDirectoryDataSource.obj \
.\$(OBJDIR)\nsAbCard.obj \
.\$(OBJDIR)\nsAbDirectory.obj \
.\$(OBJDIR)\nsAbCardProperty.obj \
.\$(OBJDIR)\nsDirPrefs.obj \
.\$(OBJDIR)\nsAddrDatabase.obj \
.\$(OBJDIR)\nsAbDirProperty.obj \
.\$(OBJDIR)\nsAbAutoCompleteSession.obj \
.\$(OBJDIR)\nsAbAddressCollecter.obj \
$(NULL)
include <$(DEPTH)\config\rules.mak>
libs:: $(LIBRARY)
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
clobber::
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib

View File

@@ -0,0 +1,290 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* 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) 1999 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "msgCore.h" // for pre-compiled headers
#include "nsIServiceManager.h"
#include "nsIAbCard.h"
#include "nsAbBaseCID.h"
#include "nsAbAddressCollecter.h"
#include "nsIPref.h"
#include "nsIAddrBookSession.h"
#include "nsIMsgHeaderParser.h"
#include "nsIRDFService.h"
#include "nsRDFCID.h"
#include "nsXPIDLString.h"
// For the new pref API's
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
static NS_DEFINE_CID(kAbCardPropertyCID, NS_ABCARDPROPERTY_CID);
static NS_DEFINE_CID(kAddrBookSessionCID, NS_ADDRBOOKSESSION_CID);
static NS_DEFINE_CID(kAddressBookDBCID, NS_ADDRDATABASE_CID);
static NS_DEFINE_CID(kMsgHeaderParserCID, NS_MSGHEADERPARSER_CID);
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
NS_IMPL_ISUPPORTS(nsAbAddressCollecter, nsCOMTypeInfo<nsIAbAddressCollecter>::GetIID());
nsAbAddressCollecter::nsAbAddressCollecter()
{
NS_INIT_REFCNT();
}
nsAbAddressCollecter::~nsAbAddressCollecter()
{
if (m_historyAB)
{
m_historyAB->Commit(kSessionCommit);
m_historyAB->Close(PR_FALSE);
m_historyAB = null_nsCOMPtr();
}
}
NS_IMETHODIMP nsAbAddressCollecter::CollectAddress(const char *address)
{
nsresult rv;
PRBool collectAddresses = PR_TRUE;
NS_WITH_SERVICE(nsIPref, pPref, kPrefCID, &rv);
if (NS_FAILED(rv) || !pPref)
return NS_ERROR_FAILURE;
rv = pPref->GetBoolPref("mail.collect_email_address", &collectAddresses);
if (!NS_SUCCEEDED(rv) || !collectAddresses)
return rv;
if (!m_historyAB)
{
rv = OpenHistoryAB(getter_AddRefs(m_historyAB));
if (!NS_SUCCEEDED(rv) || !m_historyAB)
return rv;
}
// note that we're now setting the whole recipient list,
// not just the pretty name of the first recipient.
PRUint32 numAddresses;
char *names;
char *addresses;
nsCOMPtr<nsIMsgHeaderParser> pHeader;
nsresult res = nsComponentManager::CreateInstance(kMsgHeaderParserCID,
NULL, nsIMsgHeaderParser::GetIID(),
(void **) getter_AddRefs(pHeader));
if (NS_FAILED(res)) return res;
nsresult ret = pHeader->ParseHeaderAddresses (nsnull, address, &names, &addresses, &numAddresses);
if (ret == NS_OK)
{
char *curName = names;
char *curAddress = addresses;
char *excludeDomainList = nsnull;
for (PRUint32 i = 0; i < numAddresses; i++)
{
PRBool exclude;
rv = IsDomainExcluded(curAddress, pPref, &exclude);
if (NS_SUCCEEDED(rv) && !exclude)
{
nsCOMPtr <nsIAbCard> existingCard;
rv = m_historyAB->GetCardForEmailAddress(m_historyDirectory, curAddress, getter_AddRefs(existingCard));
if (!existingCard)
{
nsCOMPtr<nsIAbCard> senderCard;
rv = nsComponentManager::CreateInstance(kAbCardPropertyCID, nsnull, nsCOMTypeInfo<nsIAbCard>::GetIID(), getter_AddRefs(senderCard));
if (NS_SUCCEEDED(rv) && senderCard)
{
if (curName && nsCRT::strlen(curName) > 0)
{
SetNamesForCard(senderCard, curName);
}
else
{
nsAutoString senderFromEmail(curAddress);
PRInt32 atSignIndex = senderFromEmail.FindChar('@');
if (atSignIndex > 0)
{
senderFromEmail.Truncate(atSignIndex + 1);
senderCard->SetDisplayName((PRUnichar*)senderFromEmail.GetUnicode());
}
}
nsAutoString email(curAddress);
senderCard->SetPrimaryEmail((PRUnichar*)email.GetUnicode());
senderCard->AddCardToDatabase("abdirectory://history.mab");
}
}
else
{
SetNamesForCard(existingCard, curName);
existingCard->EditCardToDatabase("abdirectory://history.mab");
}
}
curName += strlen(curName) + 1;
curAddress += strlen(curAddress) + 1;
}
PR_FREEIF(addresses);
PR_FREEIF(names);
PR_FREEIF(excludeDomainList);
}
return NS_OK;
}
nsresult nsAbAddressCollecter::OpenHistoryAB(nsIAddrDatabase **aDatabase)
{
if (!aDatabase)
return NS_ERROR_NULL_POINTER;
nsresult rv = NS_OK;
nsFileSpec* dbPath = nsnull;
NS_WITH_SERVICE(nsIAddrBookSession, abSession, kAddrBookSessionCID, &rv);
if(NS_SUCCEEDED(rv))
abSession->GetUserProfileDirectory(&dbPath);
if (dbPath)
{
(*dbPath) += "history.mab";
NS_WITH_SERVICE(nsIAddrDatabase, addrDBFactory, kAddressBookDBCID, &rv);
if (NS_SUCCEEDED(rv) && addrDBFactory)
rv = addrDBFactory->Open(dbPath, PR_TRUE, aDatabase, PR_TRUE);
}
NS_WITH_SERVICE(nsIRDFService, rdfService, kRDFServiceCID, &rv);
if (NS_FAILED(rv))
return rv;
nsCOMPtr <nsIRDFResource> resource;
rv = rdfService->GetResource("abdirectory://history.mab", getter_AddRefs(resource));
if (NS_FAILED(rv))
return rv;
// query interface
m_historyDirectory = do_QueryInterface(resource, &rv);
return rv;
}
nsresult nsAbAddressCollecter::IsDomainExcluded(const char *address, nsIPref *pPref, PRBool *bExclude)
{
if (!bExclude)
return NS_ERROR_NULL_POINTER;
*bExclude = PR_FALSE;
nsXPIDLCString excludedDomainList;
nsresult rv = pPref->CopyCharPref("mail.address_collection_ignore_domain_list",
getter_Copies(excludedDomainList));
if (NS_FAILED(rv) || !excludedDomainList || !excludedDomainList[0])
return NS_OK;
nsCAutoString incomingDomain(address);
PRInt32 atSignIndex = incomingDomain.RFindChar('@');
if (atSignIndex > 0)
{
incomingDomain.Cut(0, atSignIndex + 1);
char *token = nsnull;
char *rest = NS_CONST_CAST(char*,(const char*)excludedDomainList);
nsCAutoString str;
token = nsCRT::strtok(rest, ",", &rest);
while (token && *token)
{
str = token;
str.StripWhitespace();
if (!str.IsEmpty())
{
if (str.Equals(incomingDomain))
{
*bExclude = PR_TRUE;
break;
}
}
str = "";
token = nsCRT::strtok(rest, ",", &rest);
}
}
return rv;
}
nsresult nsAbAddressCollecter::SetNamesForCard(nsIAbCard *senderCard, const char *fullName)
{
char *firstName = nsnull;
char *lastName = nsnull;
PRUnichar *unicodeStr = nsnull;
PRInt32 unicharLength = 0;
INTL_ConvertToUnicode((const char *)fullName, nsCRT::strlen(fullName), (void**)&unicodeStr, &unicharLength);
senderCard->SetDisplayName(unicodeStr);
PR_Free(unicodeStr);
nsresult rv = SplitFullName (fullName, &firstName, &lastName);
if (NS_SUCCEEDED(rv))
{
INTL_ConvertToUnicode((const char *)firstName, nsCRT::strlen(firstName), (void**)&unicodeStr, &unicharLength);
senderCard->SetFirstName(unicodeStr);
PR_Free(unicodeStr);
if (lastName) {
INTL_ConvertToUnicode((const char *)lastName, nsCRT::strlen(lastName), (void**)&unicodeStr, &unicharLength);
senderCard->SetLastName(unicodeStr);
PR_Free(unicodeStr);
}
}
PR_FREEIF(firstName);
PR_FREEIF(lastName);
return rv;
}
nsresult nsAbAddressCollecter::SplitFullName (const char *fullName, char **firstName, char **lastName)
{
if (fullName)
{
*firstName = nsCRT::strdup(fullName);
if (NULL == *firstName)
return NS_ERROR_OUT_OF_MEMORY;
char *plastSpace = *firstName;
char *walkName = *firstName;
char *plastName = nsnull;
while (walkName && *walkName)
{
if (*walkName == ' ')
{
plastSpace = walkName;
plastName = plastSpace + 1;
}
walkName++;
}
if (plastName)
{
*plastSpace = '\0';
*lastName = nsCRT::strdup (plastName);
}
}
return NS_OK;
}

View File

@@ -0,0 +1,50 @@
/* -*- 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) 1999 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef _nsAbAddressCollecter_H_
#define _nsAbAddressCollecter_H_
#include "nsIAbAddressCollecter.h"
#include "nsCOMPtr.h"
#include "nsIAbAddressCollecter.h"
#include "nsIAddrDatabase.h"
#include "nsAddrDatabase.h"
class nsIPref;
class nsAbAddressCollecter : public nsIAbAddressCollecter
{
public:
nsAbAddressCollecter();
virtual ~nsAbAddressCollecter();
NS_DECL_ISUPPORTS
NS_DECL_NSIABADDRESSCOLLECTER
nsresult OpenHistoryAB(nsIAddrDatabase **aDatabase);
nsresult IsDomainExcluded(const char *address, nsIPref *pPref, PRBool *bExclude);
nsresult SetNamesForCard(nsIAbCard *senderCard, const char *fullName);
nsresult SplitFullName (const char *fullName, char **firstName, char **lastName);
protected:
nsCOMPtr <nsIAddrDatabase> m_historyAB;
nsCOMPtr <nsIAbDirectory> m_historyDirectory;
};
#endif // _nsAbAddressCollecter_H_

View File

@@ -0,0 +1,231 @@
/* -*- 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) 1999 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "msgCore.h"
#include "nsAbAutoCompleteSession.h"
#include "nsString.h"
#include "nsIMsgHeaderParser.h"
#include "nsRDFCID.h"
#include "nsIRDFService.h"
#include "nsIAbDirectory.h"
#include "nsIAbCard.h"
#include "nsXPIDLString.h"
#include "nsMsgBaseCID.h"
#include "nsIMsgMailSession.h"
static NS_DEFINE_CID(kHeaderParserCID, NS_MSGHEADERPARSER_CID);
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
static NS_DEFINE_CID(kCMsgMailSessionCID, NS_MSGMAILSESSION_CID);
nsresult NS_NewAbAutoCompleteSession(const nsIID &aIID, void ** aInstancePtrResult)
{
/* note this new macro for assertions...they can take a string describing the assertion */
NS_PRECONDITION(nsnull != aInstancePtrResult, "nsnull ptr");
if (aInstancePtrResult)
{
nsAbAutoCompleteSession * abSession = new nsAbAutoCompleteSession();
if (abSession)
return abSession->QueryInterface(nsCOMTypeInfo<nsIAutoCompleteSession>::GetIID(), aInstancePtrResult);
else
return NS_ERROR_OUT_OF_MEMORY; /* we couldn't allocate the object */
}
else
return NS_ERROR_NULL_POINTER; /* aInstancePtrResult was NULL....*/
}
NS_IMPL_ISUPPORTS(nsAbAutoCompleteSession, nsCOMTypeInfo<nsIAutoCompleteSession>::GetIID())
nsAbAutoCompleteSession::nsAbAutoCompleteSession()
{
NS_INIT_REFCNT();
m_numEntries = 0;
m_tableInitialized = PR_FALSE;
// temporary hack to get the current identity
nsresult rv;
NS_WITH_SERVICE(nsIMsgMailSession, mailSession, kCMsgMailSessionCID, &rv);
if (NS_SUCCEEDED(rv))
{
nsCOMPtr<nsIMsgIdentity> identity;
rv = mailSession->GetCurrentIdentity(getter_AddRefs(identity));
if (NS_SUCCEEDED(rv))
{
char * email;
identity->GetEmail(&email);
if (email && *email)
m_domain = PL_strchr(email, '@');
PR_FREEIF(email);
}
}
}
nsresult nsAbAutoCompleteSession::PopulateTableWithAB(nsIEnumerator * aABCards)
{
nsresult rv = NS_OK;
if (!aABCards)
return rv;
rv = aABCards->First();
while (NS_SUCCEEDED(rv) && m_numEntries < MAX_ENTRIES)
{
m_searchNameCompletionEntryTable[m_numEntries].userName = nsnull;
m_searchNameCompletionEntryTable[m_numEntries].emailAddress = nsnull;
nsCOMPtr<nsISupports> i;
rv = aABCards->CurrentItem(getter_AddRefs(i));
if (NS_FAILED(rv)) break;
nsCOMPtr<nsIAbCard> card(do_QueryInterface(i, &rv));
if (NS_FAILED(rv)) break;
/* card holds unicode string, convert to utf8 String for autocomplete*/
nsXPIDLString pUnicodeStr;
PRInt32 unicharLength = 0;
rv=card->GetDisplayName(getter_Copies(pUnicodeStr));
if (NS_FAILED(rv)) break;
unicharLength = nsCRT::strlen(pUnicodeStr);
INTL_ConvertFromUnicode(pUnicodeStr, unicharLength, (char**)&m_searchNameCompletionEntryTable[m_numEntries].userName);
rv=card->GetPrimaryEmail(getter_Copies(pUnicodeStr));
if (NS_FAILED(rv)) break;
unicharLength = nsCRT::strlen(pUnicodeStr);
INTL_ConvertFromUnicode(pUnicodeStr, unicharLength, (char**)&m_searchNameCompletionEntryTable[m_numEntries].emailAddress);
rv = aABCards->Next();
m_numEntries++;
m_tableInitialized = PR_TRUE;
if (m_numEntries == MAX_ENTRIES)
break;
}
return NS_OK;
}
nsresult nsAbAutoCompleteSession::InitializeTable()
{
#ifdef DEBUG_seth
fprintf(stderr,"initializing autocomplete table\n");
#endif
nsresult rv = NS_OK;
NS_WITH_SERVICE(nsIRDFService, rdfService, kRDFServiceCID, &rv);
if (NS_FAILED(rv)) return rv;
nsCOMPtr <nsIRDFResource> resource;
rv = rdfService->GetResource("abdirectory://abook.mab", getter_AddRefs(resource));
if (NS_FAILED(rv)) return rv;
// query interface
nsCOMPtr<nsIAbDirectory> directory(do_QueryInterface(resource, &rv));
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIEnumerator> cards;
rv = directory->GetChildCards(getter_AddRefs(cards));
if (NS_FAILED(rv)) return rv;
rv = PopulateTableWithAB(cards);
if (NS_FAILED(rv)) return rv;
// now if we have any left over space, populate the table with the history address book
rv = rdfService->GetResource("abdirectory://history.mab", getter_AddRefs(resource));
if (NS_FAILED(rv)) return rv;
directory = do_QueryInterface(resource, &rv);
if (NS_FAILED(rv)) return rv;
rv = directory->GetChildCards(getter_AddRefs(cards));
if (NS_FAILED(rv)) return rv;
rv = PopulateTableWithAB(cards);
if (NS_FAILED(rv)) return rv;
return NS_OK; // always return success??
}
nsAbAutoCompleteSession::~nsAbAutoCompleteSession()
{
PRInt32 i;
for (i=0;i<m_numEntries;i++) {
PR_FREEIF(m_searchNameCompletionEntryTable[i].userName);
m_searchNameCompletionEntryTable[i].userName = nsnull;
PR_FREEIF(m_searchNameCompletionEntryTable[i].emailAddress);
m_searchNameCompletionEntryTable[i].emailAddress = nsnull;
}
}
NS_IMETHODIMP nsAbAutoCompleteSession::AutoComplete(nsISupports *aParam, const PRUnichar *aSearchString, nsIAutoCompleteListener *aResultListener)
{
// mscott - right now I'm not even going to bother to make this synchronous...
// I'll beef it up with some test data later but we want to see if this idea works for right now...
nsresult rv = NS_OK;
if (!m_tableInitialized) {
rv = InitializeTable();
if (NS_FAILED(rv)) return rv;
}
if (aResultListener)
{
PRUint32 searchStringLen = nsCRT::strlen(aSearchString);
PRBool matchFound = PR_FALSE;
PRInt32 nIndex;
for (nIndex = 0; nIndex < m_numEntries && !matchFound; nIndex++)
{
if (nsCRT::strncasecmp(aSearchString, m_searchNameCompletionEntryTable[nIndex].userName, searchStringLen) == 0
|| nsCRT::strncasecmp(aSearchString, m_searchNameCompletionEntryTable[nIndex].emailAddress,searchStringLen) == 0)
{
matchFound = PR_TRUE; // so we kick out of the loop
// get a mime header parser to generate a valid address
nsCOMPtr<nsIMsgHeaderParser> parser;
nsComponentManager::CreateInstance(kHeaderParserCID,
nsnull,
nsCOMTypeInfo<nsIMsgHeaderParser>::GetIID(),
getter_AddRefs(parser));
char * fullAddress = nsnull;
if (parser)
parser->MakeFullAddress(nsnull, m_searchNameCompletionEntryTable[nIndex].userName,
m_searchNameCompletionEntryTable[nIndex].emailAddress, &fullAddress);
nsString searchResult(fullAddress);
// iterate over the table looking for a match
rv = aResultListener->OnAutoCompleteResult(aParam, aSearchString, searchResult.GetUnicode());
break;
}
}
if (!matchFound)
{
//Does the search string has a domain name?
nsString searchResult(aSearchString);
PRInt32 atSignIndex = searchResult.FindChar('@');
if (atSignIndex < 0)
{
searchResult += m_domain;
rv = aResultListener->OnAutoCompleteResult(aParam, aSearchString, searchResult.GetUnicode());
}
}
}
else
rv = NS_ERROR_NULL_POINTER;
return rv;
}

View File

@@ -0,0 +1,60 @@
/* -*- 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) 1999 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsAbAutoCompleteSession_h___
#define nsAbAutoCompleteSession_h___
#include "nsIAutoCompleteSession.h"
#include "nsIAutoCompleteListener.h"
#include "nsCOMPtr.h"
#include "msgCore.h"
typedef struct
{
char * userName;
char * emailAddress;
} nsAbStubEntry;
#define MAX_ENTRIES 100
class nsAbAutoCompleteSession : public nsIAutoCompleteSession
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIAUTOCOMPLETESESSION
nsAbAutoCompleteSession();
virtual ~nsAbAutoCompleteSession();
protected:
nsresult InitializeTable();
nsresult PopulateTableWithAB(nsIEnumerator * aABCards); // enumerates through the cards and adds them to the table
nsCOMPtr<nsIAutoCompleteListener> m_resultListener;
PRBool m_tableInitialized;
nsAbStubEntry m_searchNameCompletionEntryTable[MAX_ENTRIES];
PRInt32 m_numEntries;
nsString m_domain;
};
// factory method
extern nsresult NS_NewAbAutoCompleteSession(const nsIID &aIID, void ** aInstancePtrResult);
#endif /* nsAbAutoCompleteSession_h___ */

View File

@@ -0,0 +1,146 @@
/* -*- Mode: C++; tab-width: 2; 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 "nsAbCard.h"
#include "nsIRDFService.h"
#include "nsIServiceManager.h"
#include "nsRDFCID.h"
#include "nsIFileSpec.h"
#include "nsIFileLocator.h"
#include "nsFileLocations.h"
#include "nsXPIDLString.h"
#include "nsCOMPtr.h"
#include "nsAbBaseCID.h"
#include "prmem.h"
#include "prlog.h"
#include "nsAddrDatabase.h"
#include "nsIAddrBookSession.h"
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
static NS_DEFINE_CID(kAddrBookSessionCID, NS_ADDRBOOKSESSION_CID);
nsAbCard::nsAbCard(void)
: nsAbRDFResource(), mListeners(nsnull)
{
}
nsAbCard::~nsAbCard(void)
{
if (mCardDatabase)
{
nsIAddrDBListener* listener = this;
mCardDatabase->RemoveListener(listener);
mCardDatabase = null_nsCOMPtr();
}
if (mListeners)
{
PRInt32 i;
for (i = mListeners->Count() - 1; i >= 0; --i)
mListeners->RemoveElementAt(i);
delete mListeners;
}
}
NS_IMPL_ISUPPORTS_INHERITED(nsAbCard, nsAbRDFResource, nsIAbCard)
////////////////////////////////////////////////////////////////////////////////
NS_IMETHODIMP nsAbCard::OnCardEntryChange
(PRUint32 abCode, nsIAbCard *card, nsIAddrDBListener *instigator)
{
if (abCode == AB_NotifyPropertyChanged && card)
{
PRUint32 tableID;
PRUint32 rowID;
card->GetDbTableID(&tableID);
card->GetDbRowID(&rowID);
if (m_dbTableID == tableID && m_dbRowID == rowID)
{
nsXPIDLString pDisplayName;
card->GetDisplayName(getter_Copies(pDisplayName));
if (pDisplayName)
NotifyPropertyChanged("DisplayName", nsnull,
NS_CONST_CAST(PRUnichar*, (const PRUnichar*)pDisplayName));
nsXPIDLString pEmail;
card->GetPrimaryEmail(getter_Copies(pEmail));
if (pEmail)
NotifyPropertyChanged("PrimaryEmail", nsnull,
NS_CONST_CAST(PRUnichar*, (const PRUnichar*)pEmail));
nsXPIDLString pWorkPhone;
card->GetWorkPhone(getter_Copies(pWorkPhone));
if (pWorkPhone)
NotifyPropertyChanged("WorkPhone", nsnull,
NS_CONST_CAST(PRUnichar*, (const PRUnichar*)pWorkPhone));
}
}
return NS_OK;
}
nsresult nsAbCard::NotifyPropertyChanged(char *property, PRUnichar* oldValue, PRUnichar* newValue)
{
nsCOMPtr<nsISupports> supports;
if(NS_SUCCEEDED(QueryInterface(nsCOMTypeInfo<nsISupports>::GetIID(), getter_AddRefs(supports))))
{
//Notify listeners who listen to every folder
nsresult rv;
NS_WITH_SERVICE(nsIAddrBookSession, abSession, kAddrBookSessionCID, &rv);
if(NS_SUCCEEDED(rv))
abSession->NotifyItemPropertyChanged(supports, property, oldValue, newValue);
}
return NS_OK;
}
nsresult nsAbCard::AddSubNode(nsAutoString name, nsIAbCard **childCard)
{
if(!childCard)
return NS_ERROR_NULL_POINTER;
nsresult rv = NS_OK;
NS_WITH_SERVICE(nsIRDFService, rdf, kRDFServiceCID, &rv);
if(NS_FAILED(rv))
return rv;
nsAutoString uri;
uri.Append(mURI);
uri.Append('/');
uri.Append(name);
char* uriStr = uri.ToNewCString();
if (uriStr == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
nsCOMPtr<nsIRDFResource> res;
rv = rdf->GetResource(uriStr, getter_AddRefs(res));
if (NS_FAILED(rv))
return rv;
nsCOMPtr<nsIAbCard> card(do_QueryInterface(res, &rv));
if (NS_FAILED(rv))
return rv;
delete[] uriStr;
*childCard = card;
NS_IF_ADDREF(*childCard);
return rv;
}

View File

@@ -0,0 +1,62 @@
/* -*- Mode: C++; tab-width: 2; 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.
*/
/********************************************************************************************************
Interface for representing Address Book Directory
*********************************************************************************************************/
#ifndef nsAbCard_h__
#define nsAbCard_h__
#include "nsAbCardProperty.h"
#include "nsAbRDFResource.h"
#include "nsISupportsArray.h"
#include "nsVoidArray.h"
#include "nsCOMPtr.h"
#include "nsIAddrDBListener.h"
#include "nsIAddrDatabase.h"
/*
* Address Book Directory
*/
class nsAbCard: public nsAbRDFResource, public nsAbCardProperty
{
public:
NS_DECL_ISUPPORTS_INHERITED
nsAbCard(void);
virtual ~nsAbCard(void);
// nsIAddrDBListener methods:
NS_IMETHOD OnCardEntryChange(PRUint32 abCode, nsIAbCard *card, nsIAddrDBListener *instigator);
protected:
nsresult NotifyPropertyChanged(char *property, PRUnichar* oldValue, PRUnichar* newValue);
nsresult AddSubNode(nsAutoString name, nsIAbCard **childDir);
protected:
nsVoidArray *mListeners;
};
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,113 @@
/* -*- Mode: C++; tab-width: 2; 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.
*/
/********************************************************************************************************
Interface for representing Address Book Person Card Property
*********************************************************************************************************/
#ifndef nsAbCardProperty_h__
#define nsAbCardProperty_h__
#include "nsIAbCard.h"
#include "nsISupportsArray.h"
#include "nsVoidArray.h"
#include "nsCOMPtr.h"
#include "nsIAddrDatabase.h"
/*
* Address Book Card Property
*/
class nsAbCardProperty: public nsIAbCard
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIABCARD
nsAbCardProperty(void);
virtual ~nsAbCardProperty(void);
// nsIAbCard methods:
protected:
nsresult GetCardDatabase(const char *uri);
nsresult GetAttributeName(PRUnichar **aName, nsString& value);
nsresult SetAttributeName(const PRUnichar *aName, nsString& arrtibute);
nsresult RemoveAnonymousList(nsVoidArray* pArray);
nsresult SetAnonymousAttribute(nsVoidArray** pAttrAray,
nsVoidArray** pValueArray, void *attrname, void *value);
nsString m_FirstName;
nsString m_LastName;
nsString m_DisplayName;
nsString m_NickName;
nsString m_PrimaryEmail;
nsString m_SecondEmail;
nsString m_WorkPhone;
nsString m_HomePhone;
nsString m_FaxNumber;
nsString m_PagerNumber;
nsString m_CellularNumber;
nsString m_HomeAddress;
nsString m_HomeAddress2;
nsString m_HomeCity;
nsString m_HomeState;
nsString m_HomeZipCode;
nsString m_HomeCountry;
nsString m_WorkAddress;
nsString m_WorkAddress2;
nsString m_WorkCity;
nsString m_WorkState;
nsString m_WorkZipCode;
nsString m_WorkCountry;
nsString m_JobTitle;
nsString m_Department;
nsString m_Company;
nsString m_WebPage1;
nsString m_WebPage2;
nsString m_BirthYear;
nsString m_BirthMonth;
nsString m_BirthDay;
nsString m_Custom1;
nsString m_Custom2;
nsString m_Custom3;
nsString m_Custom4;
nsString m_Note;
PRUint32 m_LastModDate;
PRBool m_bSendPlainText;
PRUint32 m_dbTableID;
PRUint32 m_dbRowID;
nsCOMPtr<nsIAddrDatabase> mCardDatabase;
nsVoidArray* m_pAnonymousStrAttributes;
nsVoidArray* m_pAnonymousStrValues;
nsVoidArray* m_pAnonymousIntAttributes;
nsVoidArray* m_pAnonymousIntValues;
nsVoidArray* m_pAnonymousBoolAttributes;
nsVoidArray* m_pAnonymousBoolValues;
};
#endif

View File

@@ -0,0 +1,198 @@
/* -*- Mode: C++; tab-width: 2; 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 "nsAbDirProperty.h"
#include "nsIRDFService.h"
#include "nsIRDFResource.h"
#include "nsIServiceManager.h"
#include "nsRDFCID.h"
#include "nsXPIDLString.h"
#include "nsCOMPtr.h"
#include "nsAbBaseCID.h"
#include "nsAbCard.h"
#include "nsAddrDatabase.h"
#include "nsIAbListener.h"
#include "nsIAddrBookSession.h"
#include "mdb.h"
#include "prlog.h"
#include "prprf.h"
#include "prmem.h"
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
static NS_DEFINE_CID(kAbCardCID, NS_ABCARD_CID);
static NS_DEFINE_CID(kAddressBookDBCID, NS_ADDRDATABASE_CID);
static NS_DEFINE_CID(kAddrBookSessionCID, NS_ADDRBOOKSESSION_CID);
nsAbDirProperty::nsAbDirProperty(void)
: m_DirName(""), m_LastModifiedDate(0),
m_DbPath(nsnull), m_Server(nsnull)
{
NS_INIT_REFCNT();
}
nsAbDirProperty::~nsAbDirProperty(void)
{
PR_FREEIF(m_DbPath);
// m_Server will free with the list
}
NS_IMPL_ADDREF(nsAbDirProperty)
NS_IMPL_RELEASE(nsAbDirProperty)
NS_IMETHODIMP nsAbDirProperty::QueryInterface(REFNSIID aIID, void** aResult)
{
if (aResult == NULL)
return NS_ERROR_NULL_POINTER;
if (aIID.Equals(nsCOMTypeInfo<nsIAbDirectory>::GetIID()) ||
aIID.Equals(nsCOMTypeInfo<nsISupports>::GetIID())) {
*aResult = NS_STATIC_CAST(nsIAbDirectory*, this);
NS_ADDREF_THIS();
return NS_OK;
}
return NS_NOINTERFACE;
}
////////////////////////////////////////////////////////////////////////////////
NS_IMETHODIMP nsAbDirProperty::GetDirFilePath(char **dbPath)
{
if (m_Server && m_Server->fileName)
{
nsresult rv = NS_OK;
nsFileSpec* dbFile = nsnull;
NS_WITH_SERVICE(nsIAddrBookSession, abSession, kAddrBookSessionCID, &rv);
if(NS_SUCCEEDED(rv))
abSession->GetUserProfileDirectory(&dbFile);
(*dbFile) += m_Server->fileName;
char* file = PL_strdup(dbFile->GetCString());
*dbPath = file;
return NS_OK;
}
return NS_ERROR_FAILURE;
}
////////////////////////////////////////////////////////////////////////////////
NS_IMETHODIMP nsAbDirProperty::GetDirName(PRUnichar **aDirName)
{
if (aDirName)
{
*aDirName = m_DirName.ToNewUnicode();
if (!(*aDirName))
return NS_ERROR_OUT_OF_MEMORY;
else
return NS_OK;
}
else
return NS_ERROR_NULL_POINTER;
}
NS_IMETHODIMP nsAbDirProperty::SetDirName(const PRUnichar * aDirName)
{
if (aDirName)
m_DirName = aDirName;
return NS_OK;
}
NS_IMETHODIMP nsAbDirProperty::GetLastModifiedDate(PRUint32 *aLastModifiedDate)
{
if (aLastModifiedDate)
{
*aLastModifiedDate = m_LastModifiedDate;
return NS_OK;
}
else
return NS_RDF_NO_VALUE;
}
NS_IMETHODIMP nsAbDirProperty::SetLastModifiedDate(PRUint32 aLastModifiedDate)
{
if (aLastModifiedDate)
{
m_LastModifiedDate = aLastModifiedDate;
}
return NS_OK;
}
NS_IMETHODIMP nsAbDirProperty::GetServer(DIR_Server * *aServer)
{
if (aServer)
{
*aServer = m_Server;
return NS_OK;
}
else
return NS_ERROR_NULL_POINTER;
}
NS_IMETHODIMP nsAbDirProperty::SetServer(DIR_Server * aServer)
{
m_Server = aServer;
return NS_OK;
}
NS_IMETHODIMP
nsAbDirProperty::GetChildNodes(nsIEnumerator **childList)
{ return NS_OK; }
NS_IMETHODIMP
nsAbDirProperty::GetChildCards(nsIEnumerator **childCards)
{ return NS_OK; }
NS_IMETHODIMP
nsAbDirProperty::AddChildCards(const char *uriName, nsIAbCard **childCard)
{ return NS_OK; }
NS_IMETHODIMP
nsAbDirProperty::AddDirectory(const char *uriName, nsIAbDirectory **childDir)
{ return NS_OK; }
NS_IMETHODIMP
nsAbDirProperty::DeleteDirectories(nsISupportsArray *dierctories)
{ return NS_OK; }
NS_IMETHODIMP
nsAbDirProperty::DeleteCards(nsISupportsArray *cards)
{ return NS_OK; }
NS_IMETHODIMP
nsAbDirProperty::HasCard(nsIAbCard *cards, PRBool *hasCard)
{ return NS_OK; }
NS_IMETHODIMP
nsAbDirProperty::HasDirectory(nsIAbDirectory *dir, PRBool *hasDir)
{ return NS_OK; }
NS_IMETHODIMP
nsAbDirProperty::GetMailingList(nsIEnumerator **mailingList)
{ return NS_OK; }
NS_IMETHODIMP
nsAbDirProperty::CreateNewDirectory(const PRUnichar *dirName, const char *fileName)
{ return NS_OK; }
NS_IMETHODIMP
nsAbDirProperty::GetDirUri(char **uri)
{ return NS_OK; }

View File

@@ -0,0 +1,56 @@
/* -*- Mode: C++; tab-width: 2; 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.
*/
/********************************************************************************************************
Interface for representing Address Book Directory
*********************************************************************************************************/
#ifndef nsAbDirProperty_h__
#define nsAbDirProperty_h__
#include "nsIAbDirectory.h" /* include the interface we are going to support */
#include "nsAbRDFResource.h"
#include "nsIAbCard.h"
#include "nsISupportsArray.h"
#include "nsCOMPtr.h"
#include "nsDirPrefs.h"
#include "nsIAbBase.h"
/*
* Address Book Directory
*/
class nsAbDirProperty: public nsIAbDirectory
{
public:
nsAbDirProperty(void);
virtual ~nsAbDirProperty(void);
NS_DECL_ISUPPORTS
NS_DECL_NSIABDIRECTORY
protected:
nsString m_DirName;
PRUint32 m_LastModifiedDate;
nsFileSpec* m_DbPath;
DIR_Server* m_Server;
};
#endif

Some files were not shown because too many files have changed in this diff Show More