Compare commits

..

484 Commits

Author SHA1 Message Date
alecf%netscape.com
639f4e8d86 one more case to call getService()
git-svn-id: svn://10.0.0.236/branches/alecf_module_branch@51557 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-22 21:03:57 +00:00
alecf%netscape.com
1796b42d7d add to branch for platform testing
git-svn-id: svn://10.0.0.236/branches/alecf_module_branch@50643 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 01:55:47 +00:00
alecf%netscape.com
7bfaa8ffa0 add to branch for platform testing
git-svn-id: svn://10.0.0.236/branches/alecf_module_branch@50641 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 01:44:21 +00:00
alecf%netscape.com
d364dabc06 add to branch for platform testing
git-svn-id: svn://10.0.0.236/branches/alecf_module_branch@50638 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 01:34:52 +00:00
(no author)
b71cf9b55d This commit was manufactured by cvs2svn to create branch
'alecf_module_branch'.

git-svn-id: svn://10.0.0.236/branches/alecf_module_branch@50557 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 04:26:02 +00:00
alecf%netscape.com
35b53ff925 do module work
git-svn-id: svn://10.0.0.236/branches/alecf_module_branch@50542 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-13 01:40:00 +00:00
alecf%netscape.com
b6e49afc62 fix with init methods
git-svn-id: svn://10.0.0.236/branches/alecf_module_branch@50410 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-12 02:05:34 +00:00
alecf%netscape.com
eb1eb295e6 prep for module so I can test on windows/mac
git-svn-id: svn://10.0.0.236/branches/alecf_module_branch@50303 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-09 03:19:52 +00:00
alecf%netscape.com
11a676f105 add nsgetmodule
git-svn-id: svn://10.0.0.236/branches/alecf_module_branch@50259 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-08 21:46:50 +00:00
alecf%netscape.com
4a927a0ef3 get rid of old cruft, use new macros
git-svn-id: svn://10.0.0.236/branches/alecf_module_branch@50258 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-08 21:30:05 +00:00
alecf%netscape.com
f23957990f use new macros
git-svn-id: svn://10.0.0.236/branches/alecf_module_branch@50179 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-08 00:25:11 +00:00
alecf%netscape.com
c5dbbcd088 try out macro for NS_IMPL_NSGETMODULE
git-svn-id: svn://10.0.0.236/branches/alecf_module_branch@50175 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-08 00:01:46 +00:00
alecf%netscape.com
2ac3dfbb5a rearrange headers and implement everything
git-svn-id: svn://10.0.0.236/branches/alecf_module_branch@50174 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-08 00:00:45 +00:00
alecf%netscape.com
45aff89642 using new macros
git-svn-id: svn://10.0.0.236/branches/alecf_module_branch@50118 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 20:38:56 +00:00
(no author)
20d06560f4 This commit was manufactured by cvs2svn to create branch
'alecf_module_branch'.

git-svn-id: svn://10.0.0.236/branches/alecf_module_branch@50105 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 14:28:55 +00:00
bienvenu%netscape.com
28bab47569 fix mork factory r=mscott 12326
git-svn-id: svn://10.0.0.236/trunk@50104 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 14:28:54 +00:00
bienvenu%netscape.com
391cdf28f4 fix mork factory r=waterson 12326
git-svn-id: svn://10.0.0.236/trunk@50103 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 14:27:50 +00:00
jefft%netscape.com
a2221d154c fixed bug 10801 -- [Featuure] Save Messages, bug 14794 - message sent from unsent folder display as raw message; we need to pay attention to where we want to save the message as template, if the message goes to the local mail folder we have to add the dummy envelope header plus the x mozilla status lines; when sending unsent messages we need to set from/sender information to pass the sanity check at the send time; reviewed by rhp
git-svn-id: svn://10.0.0.236/trunk@50102 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 14:27:11 +00:00
bienvenu%netscape.com
571b348058 use nsIModule for Mork r=mscott no bug
git-svn-id: svn://10.0.0.236/trunk@50101 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 14:26:15 +00:00
rods%netscape.com
af37c61c55 removed unused result to remove warning r=pinkerton
git-svn-id: svn://10.0.0.236/trunk@50100 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 13:47:43 +00:00
waterson%netscape.com
f958803974 Bug 13910. Make sure to update element map for XUL (as well as HTML) elements when changing 'id' or 'ref' attributes.
git-svn-id: svn://10.0.0.236/trunk@50099 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 10:09:17 +00:00
waterson%netscape.com
4bac26a215 Bug 13910. Make sure to add elements to the map by 'ref' attribute, as well.
git-svn-id: svn://10.0.0.236/trunk@50098 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 10:08:14 +00:00
sspitzer%netscape.com
834be86386 more clean up for #15402. disable the rename, delete and start buttons
if no profile is selected, and enable them when a profile is selected.
turn dumps into alerts to tell the user why something failed.


git-svn-id: svn://10.0.0.236/trunk@50097 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 09:41:33 +00:00
sspitzer%netscape.com
01e635a3a6 last touches to finally get Cancel (from the Create Profile Wizard) and Exit
(from the Profile Manager) to work properly.


git-svn-id: svn://10.0.0.236/trunk@50096 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 09:15:25 +00:00
sspitzer%netscape.com
4d9fe202fe fix my comment
git-svn-id: svn://10.0.0.236/trunk@50095 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 09:12:27 +00:00
sspitzer%netscape.com
faac109667 minor cleanup of the profile js. #15402
git-svn-id: svn://10.0.0.236/trunk@50094 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 09:03:07 +00:00
sspitzer%netscape.com
7ef56b5288 minor tweak on the way to getting Cancel / Exit to behave properly in the
Profile Manager UI.  they both set the current profile to "".


git-svn-id: svn://10.0.0.236/trunk@50093 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 09:01:23 +00:00
sspitzer%netscape.com
bde00ceef7 add documentation and fixes from Ben Goodger <rgoodger@ihug.co.nz>
also add the mozilla license.  r=sspitzer.


git-svn-id: svn://10.0.0.236/trunk@50092 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 08:47:16 +00:00
rickg%netscape.com
ac6276e5cd fixed leak using patch from beard; verified in purify. r=rgess; bug=15751
git-svn-id: svn://10.0.0.236/trunk@50090 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 07:22:57 +00:00
sspitzer%netscape.com
13d46b9f86 more fixes for #15402, general cleanup of the profile code. Close button is now Exit. remove GetSingleProfile(), use GetFirstProfile() instead. Add ForgetCurrentProfile() for use in getting cancel to work properly.
git-svn-id: svn://10.0.0.236/trunk@50089 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 06:57:38 +00:00
sspitzer%netscape.com
c0b38598d6 GetSingleProfile() is going away. use GetFirstProfile now.
git-svn-id: svn://10.0.0.236/trunk@50088 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 06:55:59 +00:00
sspitzer%netscape.com
c959c10bfc fix for #15735, r=waterson. fix the JS error by re-writing the C style
fancy logic.


git-svn-id: svn://10.0.0.236/trunk@50087 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 06:37:32 +00:00
warren%netscape.com
1e7a6bdb4d Fixed warnings.
git-svn-id: svn://10.0.0.236/trunk@50086 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 04:10:12 +00:00
neeti%netscape.com
7425479597 Converted to use nsIModule to prepare for memory leaks fixing. Bug# 14034. r=dveditz
git-svn-id: svn://10.0.0.236/trunk@50085 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 03:39:36 +00:00
rhp%netscape.com
9cdcbef4af Fixing a test program makefile. THIS IS NOT PART OF ANY BUILD!
git-svn-id: svn://10.0.0.236/trunk@50084 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 03:39:02 +00:00
rhp%netscape.com
9eb3c904c6 Fixing a test program. THIS IS NOT PART OF ANY BUILD!
git-svn-id: svn://10.0.0.236/trunk@50083 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 03:38:42 +00:00
sspitzer%netscape.com
94a677a8af fix for bug #15402. exit if we get past the profile manager without a current profile. this can happen.
git-svn-id: svn://10.0.0.236/trunk@50082 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 03:10:18 +00:00
beard%netscape.com
9d922a368f First Checked In.
git-svn-id: svn://10.0.0.236/trunk@50081 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 03:03:36 +00:00
morse%netscape.com
1424e84e14 fix bug 15721, cookies not persistent, r=jar nsAppRunner.cpp
git-svn-id: svn://10.0.0.236/trunk@50080 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 02:48:27 +00:00
ramiro%netscape.com
f2333c7dab Added mozilla/tools/leaky to SeaMonkeyCore. r=leaf.
git-svn-id: svn://10.0.0.236/trunk@50079 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 02:39:56 +00:00
beard%netscape.com
a57d0470d2 First Checked In.
git-svn-id: svn://10.0.0.236/trunk@50078 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 02:11:44 +00:00
varada%netscape.com
dc0146ae24 have made error dialog box systemmodal bug #15339
git-svn-id: svn://10.0.0.236/trunk@50077 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 02:07:23 +00:00
rjc%netscape.com
1978802be8 Add in CTOR/DTOR stuff for leak detection. Review: hyatt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@50076 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 01:51:30 +00:00
kipp%netscape.com
51e85831e8 r=peterl; fixed a regression that I regrettably caused; had the test for success backwards
git-svn-id: svn://10.0.0.236/trunk@50075 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 01:44:16 +00:00
varada%netscape.com
0a87564964 %Root% is a global variable that contains the value of the current working directory - so we can use it in an inifile to resolve the relative root locations
git-svn-id: svn://10.0.0.236/trunk@50074 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 01:39:34 +00:00
harishd%netscape.com
946d742a4d In reference to bug # 12415
Added assertion ( per warrne's request ) to detect null char occasionally appearing in the input
stream provided by necko
R=pollmann


git-svn-id: svn://10.0.0.236/trunk@50073 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 01:30:56 +00:00
akkana%netscape.com
bc8b6d116e 13750,13753,14075,15293,13873,12551:
- Rewrite wrapping logic for plaintext output sink,
  and run all output through the wrapping/formatting Write method
  (which now has logic to determine when we should be wrapping).
- Handle blockquote type=cite mail quotes.
- Write several new regression tests for plaintext output bugs,
  and include those tests and their expected output into the
  automated output test.
r=sfraser,harishd


git-svn-id: svn://10.0.0.236/trunk@50072 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 01:10:32 +00:00
mcafee%netscape.com
0a81ee7839 Cleaning up whitespace so I can edit this file with a clue.
git-svn-id: svn://10.0.0.236/trunk@50071 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 01:07:41 +00:00
slamm%netscape.com
52995d7ec4 Remove call to sidebarOverlayInit(). This is already called in sidebarOverlay.js when sidebarOverlay.xul loads. Fixes bug #15719, 'Sidebar panels get added twice'. r=waterson.
git-svn-id: svn://10.0.0.236/trunk@50070 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 01:03:19 +00:00
sspitzer%netscape.com
deecdfd350 add an alert if there is no profile name. bug #15402
git-svn-id: svn://10.0.0.236/trunk@50069 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 00:55:51 +00:00
kipp%netscape.com
5fc1175eb9 Fixed a memory leak in the sizeof-handler logic (blush)
git-svn-id: svn://10.0.0.236/trunk@50068 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 00:49:40 +00:00
harishd%netscape.com
b84b2685ff Mapping nsDTDMode to eParseMode (in mozilla/htmlparser/src/nsIDTD.h)
R=pollmann


git-svn-id: svn://10.0.0.236/trunk@50067 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 00:35:16 +00:00
kipp%netscape.com
99aaa55232 Updated SizeOf methods for html content objects to be more accurate; implemented MOZ_DECL_CTOR_COUNTER for all html content objects
git-svn-id: svn://10.0.0.236/trunk@50066 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 00:35:04 +00:00
kipp%netscape.com
4e6e50c103 Tweaked call of log_release
git-svn-id: svn://10.0.0.236/trunk@50065 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 00:32:25 +00:00
kipp%netscape.com
b17c92e839 Added some atoms to support SizeOf metrics
git-svn-id: svn://10.0.0.236/trunk@50064 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 00:31:41 +00:00
kipp%netscape.com
d5ce80751a Work around a crash by stubbing out some pointers that are weak links that are not to be used during shutdown
git-svn-id: svn://10.0.0.236/trunk@50063 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 00:31:21 +00:00
kipp%netscape.com
b87e5bb00d Don't forget to remove the observer when dtor is running (fixes a sometimes crash in viewer); also fixed a memory leak of a style context
git-svn-id: svn://10.0.0.236/trunk@50062 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 00:30:20 +00:00
kipp%netscape.com
a72c992c6f Eliminate a memory leak of a style context (which ends up leaking all the stylecontexts upward)
git-svn-id: svn://10.0.0.236/trunk@50061 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 00:29:28 +00:00
harishd%netscape.com
080879ab10 Bug 13647
In nsXIFConverter::BeginContainer(const nsString& aTag)
newline was getting appended by default at the end of a tag.
Setting the default value to PR_FALSE to avoid newline insertion
at the end of a tag.
R=akkana


git-svn-id: svn://10.0.0.236/trunk@50060 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 00:28:58 +00:00
kipp%netscape.com
78b500998c Eliminate a warning
git-svn-id: svn://10.0.0.236/trunk@50059 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 00:28:41 +00:00
sspitzer%netscape.com
7097d190f2 bulletproofing for bug #15728, r=alecf
if there are no panels, just return.


git-svn-id: svn://10.0.0.236/trunk@50058 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 00:28:24 +00:00
sspitzer%netscape.com
f49a6fc3a9 workaround fix for #15728. r=alecf. prevent crashing when I click on the tab in the create profile wizard.
git-svn-id: svn://10.0.0.236/trunk@50057 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 00:24:44 +00:00
varada%netscape.com
9299843cda change customization to configs directory in checklist.ini in some files
git-svn-id: svn://10.0.0.236/trunk@50056 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 00:15:35 +00:00
varada%netscape.com
0925de79f3 changed customizations directory to Configs in wizardmachine.cp as well as in the checklist.ini
git-svn-id: svn://10.0.0.236/trunk@50055 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 00:11:01 +00:00
rogerl%netscape.com
b1873070a7 More errors-as-exceptions stuff
git-svn-id: svn://10.0.0.236/trunk@50054 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 23:55:33 +00:00
mcafee%netscape.com
5b962a0f3c Adding option for modeless pref dialog, ifdef'd off by default. r=akkana
git-svn-id: svn://10.0.0.236/trunk@50053 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 23:54:47 +00:00
sgehani%netscape.com
6b11a987a4 *** NOT PART OF BUILD ***
DEBUG symbolic constant renamed to MIW_DEBUG.


git-svn-id: svn://10.0.0.236/trunk@50052 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 23:52:08 +00:00
sgehani%netscape.com
d016fe35cc *** NOT PART OF BUILD ***
DEBUG symbolic constant changed from DEBUG to MIW_DEBUG.


git-svn-id: svn://10.0.0.236/trunk@50051 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 23:51:14 +00:00
sgehani%netscape.com
be68b07064 *** NOT PART OF BUILD ***
Cleanup of inflation routines.


git-svn-id: svn://10.0.0.236/trunk@50050 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 23:50:10 +00:00
sgehani%netscape.com
c45dd4d212 *** NOT PART OF BUILD ***
Disable back button on welcome window preventing user from returning to the license window.


git-svn-id: svn://10.0.0.236/trunk@50049 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 23:49:16 +00:00
sgehani%netscape.com
3600061916 *** NOT PART OF BUILD ***
Disk space checking is now accurate for "Custom Install".


git-svn-id: svn://10.0.0.236/trunk@50048 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 23:48:09 +00:00
sgehani%netscape.com
f7d9ac0919 *** NOT PART OF BUILD ***
Detect and don't download pre-existing .xpi files. Fixes bug 15695.


git-svn-id: svn://10.0.0.236/trunk@50047 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 23:47:02 +00:00
sgehani%netscape.com
542eeddaf1 *** NOT PART OF BUILD ***
Mouse over component now highlights and updates long description: fixes bug 14322.


git-svn-id: svn://10.0.0.236/trunk@50046 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 23:45:49 +00:00
harishd%netscape.com
0b8b118754 Cleaned up warnings. R=rickg
git-svn-id: svn://10.0.0.236/trunk@50044 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 23:24:28 +00:00
sspitzer%netscape.com
4c88fb3ec4 whoops, checked in dos formatted text files from a unix box. ran dos2unix on them to fix it. part of fix for #15402. these new files come from Ben Goodger <rgoodger@ihug.co.nz> r=sspitzer
git-svn-id: svn://10.0.0.236/trunk@50042 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 23:19:53 +00:00
troy%netscape.com
75bf4aa54d b=11971, r=peterl@netscape,karnaze@netscape.com
Changed ContentInserted() to use GetFrameFor() so we target the table cell's
area frame


git-svn-id: svn://10.0.0.236/trunk@50041 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 23:17:28 +00:00
pavlov%netscape.com
88babc4d7b final step to make menus dismiss on unix r=hyatt
git-svn-id: svn://10.0.0.236/trunk@50040 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 23:00:53 +00:00
akkana%netscape.com
ada22baf14 15712: Fix gtk double-click events. r=pavlov
git-svn-id: svn://10.0.0.236/trunk@50039 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 22:57:00 +00:00
vidur%netscape.com
d46c14654b Added window.scrollBy/scrollTo/scrollX/scrollY. Scopus bug 361046. R=troy
git-svn-id: svn://10.0.0.236/trunk@50038 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 22:07:42 +00:00
sspitzer%netscape.com
578092310a remove references to xul.css, as it is no longer needed.
git-svn-id: svn://10.0.0.236/trunk@50037 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 22:07:29 +00:00
troy%netscape.com
032742ad4c Moved space manager to block frame and changed it the space manager is
temporary only during the reflow process
r=kipp@netscape.com


git-svn-id: svn://10.0.0.236/trunk@50036 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 22:05:23 +00:00
kmcclusk%netscape.com
7c76fd51f5 r=rods; bug=15478; Added WS_EX_TOOLWINDOW extended style for popup windows
to prevent popups from creating empty task bar buttons.
bug=6061; NS_DISPLAYCHANGE event is now generated when the display depth changes
on WIN32.


git-svn-id: svn://10.0.0.236/trunk@50035 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 21:54:49 +00:00
norris%netscape.com
48f3a0603c More license wrangling: fix the release date (1999, not 1998).
git-svn-id: svn://10.0.0.236/trunk@50031 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 21:52:17 +00:00
sspitzer%netscape.com
20945ad3ee remove unused code, now that CreateNewProfile() takes two arguments
git-svn-id: svn://10.0.0.236/trunk@50030 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 21:52:02 +00:00
rpotts%netscape.com
b286c0c010 Removed dead code inside of #if 0 blocks...
git-svn-id: svn://10.0.0.236/trunk@50026 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 21:43:21 +00:00
sspitzer%netscape.com
9c68bc61cc fix the create profile wizard ui.
this work was done by the almighty Ben Goodger <rgoodger@ihug.co.nz>
r=sspitzer
I did a little clean up, and made it so show the native file path


git-svn-id: svn://10.0.0.236/trunk@50025 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 21:36:59 +00:00
jband%netscape.com
cd534a023e - the rest of the fix for bug 14738 - detect JSErrors with
JSErrorReports when thrown as exceptions. Extract JSErrorReport
and convert to an xpcexception. This restores functionality that
was whacked when JS errors-as-exceptions was enabled in the JS
engine.
- add conversion support for string-with-length as part of array
support mentioned in bug 13420. All the array stuff is basically
in with minimal testcases. More comprehensive tests need to be
written to verify and tune the code.
- fix a broken #undef
- switch to using PR_Alloc/PR_Free internally in nsjsid where we
were using new/delete before. This is prompted by warren's change
to nsID::ToString that uses PR_Alloc were before it used new.
This fixes an alloc/delete mismatch detected by Purify.
r=mccabe


git-svn-id: svn://10.0.0.236/trunk@50024 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 21:35:27 +00:00
sspitzer%netscape.com
ac743ecce8 fix for #15197 (and a whole bunch of duplicates).
fix by vidur, r=rogerl


git-svn-id: svn://10.0.0.236/trunk@50023 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 21:31:34 +00:00
neeti%netscape.com
68ccc3d94a updating status. Not part of the build
git-svn-id: svn://10.0.0.236/trunk@50022 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 21:13:38 +00:00
norris%netscape.com
cedec739aa Fix another portion of 13192 Mozilla is "oversecured" and does not allow access to documents in the same domain
Reviewed by vidur.


git-svn-id: svn://10.0.0.236/trunk@50021 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 21:13:37 +00:00
norris%netscape.com
cd59845c25 Fix 15618 [CRASH] JS assertion on table regression test
Reviewed by rogerl@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@50020 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 21:12:21 +00:00
waterson%netscape.com
84fb96cb65 Bug 13910. Fix flash panel style rules, XUL, and JS so that flashes start to display again. r=slamm.
git-svn-id: svn://10.0.0.236/trunk@50019 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 21:08:50 +00:00
neeti%netscape.com
6b2d99d685 updating status. Not part of the build
git-svn-id: svn://10.0.0.236/trunk@50018 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 21:07:30 +00:00
beard%netscape.com
e6c61c5ffe added EcmaError.java, NativeError.java
git-svn-id: svn://10.0.0.236/trunk@50017 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 21:07:04 +00:00
neeti%netscape.com
b84f7a78de updating status. Not part of the build
git-svn-id: svn://10.0.0.236/trunk@50016 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 21:05:25 +00:00
neeti%netscape.com
f6d3593b2e updating status. Not part of the build
git-svn-id: svn://10.0.0.236/trunk@50015 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 20:58:41 +00:00
sspitzer%netscape.com
d6ec571916 make sure we save the prefs when we exit. will fix a bunch of problems, including #15705. r=alecf, a=leaf
git-svn-id: svn://10.0.0.236/trunk@50014 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 20:52:50 +00:00
gagan%netscape.com
a378b87978 Partial checkins for fixing bug # 10333. Added the nsIStatusCodeEventSink for conveying status codes to the UI thread from the socket ones. r=mscott,a=don
git-svn-id: svn://10.0.0.236/trunk@50013 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 20:50:12 +00:00
norris%netscape.com
734f2fb55c Update contributors, add some license text.
git-svn-id: svn://10.0.0.236/trunk@50012 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 20:50:04 +00:00
cbegle%netscape.com
4cdb11b194 tests for javascript errors as exceptions, a feature that was recently
added to the javascript engine.

not part of the build.


git-svn-id: svn://10.0.0.236/trunk@50011 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 20:45:44 +00:00
gagan%netscape.com
7258a74fc0 added files: mozilla/netwerk/base/public/nsIStatusCodeEventSink.idl
git-svn-id: svn://10.0.0.236/trunk@50010 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 20:44:23 +00:00
terry%mozilla.org
944a16f933 Wow. Turns out this stuff would only handle 10 products. Did the
cheap fix that lets it handle 1000 products.


git-svn-id: svn://10.0.0.236/trunk@50009 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 20:37:37 +00:00
neeti%netscape.com
3b3d0e4e1b updating status. Not part of the build
git-svn-id: svn://10.0.0.236/trunk@50008 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 20:36:28 +00:00
vidur%netscape.com
f614c92aba Added document.width/document.height to nsIDOMNSDocument. Bug 961. R: troy
git-svn-id: svn://10.0.0.236/trunk@50007 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 20:33:58 +00:00
vidur%netscape.com
e16887dc96 Implemented document.width/document.height by looking at the dimensions of the view of the frame of the document element. Bug 961. R: troy
git-svn-id: svn://10.0.0.236/trunk@50006 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 20:32:49 +00:00
putterman%netscape.com
12980882c5 Added constructor/destructor counting macros for various mailnews
classes.  reviewed by bienvenu.  no bug.


git-svn-id: svn://10.0.0.236/trunk@50005 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 20:32:25 +00:00
buster%netscape.com
1e0b48570c fixed some space leaks reported by kipp. no bug #, r=tague
added some assertions and error checking to nsEditor::Do, no bug #, r=kin
fixed bug 14898 (implemented type-in state for any context), r=jfrancis


git-svn-id: svn://10.0.0.236/trunk@50004 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 20:27:41 +00:00
ramiro%netscape.com
3412f4f935 Take myself out of the "you suck" list. r=dp
git-svn-id: svn://10.0.0.236/trunk@50003 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 20:22:23 +00:00
mscott%netscape.com
9baa358bf2 No Bug #.......removing an obsolete file that isn't part of the build
r=valeski


git-svn-id: svn://10.0.0.236/trunk@50002 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 20:21:35 +00:00
bienvenu%netscape.com
9b0345f34f fix leak of accounts, mail session r=scottip bug 000
git-svn-id: svn://10.0.0.236/trunk@50000 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 20:00:27 +00:00
jfrancis%netscape.com
0209785bbb revised rules system api to include "handled" parameter and ceased to overload the meaning of the "cancel" parameter; added TypedText() method to editor, editorshell, and logging, so that logging will work properly with typing; coallesce deletions for undo purposes r=buster@netscape.com
git-svn-id: svn://10.0.0.236/trunk@49999 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 19:34:09 +00:00
srinivas%netscape.com
7ef083b590 Backed out previous checkin.
git-svn-id: svn://10.0.0.236/trunk@49996 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 19:33:52 +00:00
srinivas%netscape.com
97336400bc Previous change backed out.
git-svn-id: svn://10.0.0.236/trunk@49995 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 19:31:17 +00:00
srinivas%netscape.com
a633fa30b6 Backout previous change.
git-svn-id: svn://10.0.0.236/trunk@49994 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 19:30:01 +00:00
dmose%mozilla.org
52a561a9c0 removing obsolete doc file; a=leaf@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@49993 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 19:17:56 +00:00
terry%mozilla.org
45c9c2b5a6 Missing some whitespace that may be vital.
git-svn-id: svn://10.0.0.236/trunk@49991 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 19:07:38 +00:00
srinivas%netscape.com
ea30288c1f Fixed bug in previous checkin - initialize variables before use.
git-svn-id: svn://10.0.0.236/trunk@49990 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 19:07:19 +00:00
harishd%netscape.com
77f9635cce Fix for Bugs
13640, 13736 - Memory leaks - R=rickg
1312 - Hooked up XHTML DOCTYPE - R=rickg
7590 - Prematuredly closing <SCRIPT> on seeing </SCRIPTERR>
2749 - Strict comment handling for noquirks mode - R=rickg
14955 - LEGEND inside FIELDSET was causing infinite looping - R=rickg,pollmann
14952 - LABEL got closed on seeing SPAN (LABEL can contain SPAN ) - R=pollmann
15381 - comment handling for XIF and HTML - R=akkana
15346 - Stray end tag caused loading blank document - R=rickg,pollmann


git-svn-id: svn://10.0.0.236/trunk@49988 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 19:04:29 +00:00
neeti%netscape.com
3963f45810 updating status
git-svn-id: svn://10.0.0.236/trunk@49987 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 19:01:51 +00:00
mgleeson1%netscape.com
210400fa8f r=waterson enums used in structs must be public members for HPUX
git-svn-id: svn://10.0.0.236/trunk@49986 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 18:56:03 +00:00
mgleeson1%netscape.com
9d0be77836 r=kipp removed unnecessary include for dlfcn.h
git-svn-id: svn://10.0.0.236/trunk@49985 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 18:53:41 +00:00
waterson%netscape.com
223352ad77 Comment out '_dead' renaming to get context menus working again. r=law
git-svn-id: svn://10.0.0.236/trunk@49984 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 18:53:32 +00:00
srinivas%netscape.com
852ba0f2aa Fixed typo in previous checkin. Also, the correct bug # is 15680.
git-svn-id: svn://10.0.0.236/trunk@49983 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 18:49:27 +00:00
rhp%netscape.com
58d7842b20 Changes for Bug #13512 - Reviewer: Bienvenu
git-svn-id: svn://10.0.0.236/trunk@49982 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 18:35:16 +00:00
srinivas%netscape.com
bf992aac1f Add the SO_BROADCAST option. Bug #365862.
git-svn-id: svn://10.0.0.236/trunk@49981 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 18:31:22 +00:00
bienvenu%netscape.com
ba3a9ad68c use nsIModule for factory, r=rhp bug 000
git-svn-id: svn://10.0.0.236/trunk@49980 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 18:30:35 +00:00
norris%netscape.com
522636a5de Make sure creation of class loader is inside a try block to handle security exceptions.
git-svn-id: svn://10.0.0.236/trunk@49979 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 17:39:48 +00:00
valeski%netscape.com
6f9ef9e6d4 r=warren, 15457. Added file extension attribute to URL implementations
git-svn-id: svn://10.0.0.236/trunk@49977 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 14:36:22 +00:00
pavlov%netscape.com
a1c9b6dcaa get CaptureRollupEvents working properly on unix. Fix focus problem that was being caused by grabbing the focus via SetFocus(). Fix potential crash in OnRealize(). fixes 15169, 15537, 15470 r=rods (for focus parts) r=blizzard@redhat.com (for all of it)
git-svn-id: svn://10.0.0.236/trunk@49974 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 14:04:05 +00:00
pavlov%netscape.com
743ccfad5b ifdef out the call to CaptureMouse since it is no longer needed r=rods
git-svn-id: svn://10.0.0.236/trunk@49973 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 13:36:39 +00:00
warren%netscape.com
055d89c0e3 Updating xpcom registry usage as per edburns@acm.org and dp's suggestions.
git-svn-id: svn://10.0.0.236/trunk@49972 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 09:57:50 +00:00
brendan%mozilla.org
3188df57a2 Fix Object.prototype.toSource so it parenthesizes outermost-toSource literals for eval roundtrips.
git-svn-id: svn://10.0.0.236/trunk@49971 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 09:09:31 +00:00
warren%netscape.com
bf35f71ce1 Fixed nsCOMPtr bustage.
git-svn-id: svn://10.0.0.236/trunk@49970 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 09:03:43 +00:00
warren%netscape.com
49e47e3066 Fixed build warnings.
git-svn-id: svn://10.0.0.236/trunk@49969 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 08:51:48 +00:00
warren%netscape.com
30cf63de80 Added AsyncOpen to nsIChannel for URL dispatching. Added ContentLength to InputStreamChannel. (r=rpotts,valeski)
git-svn-id: svn://10.0.0.236/trunk@49968 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 08:26:01 +00:00
dougt%netscape.com
3e9e75feec Fix for 11812. Reordered the clean up so that deletion of the "real" object
happens after NS_RELEASE of the proxy object.  This is a test program.

reviewed by gagan.


git-svn-id: svn://10.0.0.236/trunk@49967 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 08:17:04 +00:00
warren%netscape.com
ccc05991a3 added files: mozilla/netwerk/base/public/nsIFileSystem.idl
git-svn-id: svn://10.0.0.236/trunk@49966 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 08:16:48 +00:00
gagan%netscape.com
c39e2405d9 An event sink to transfer status codes to a consumer of necko.
This is not in the build as yet.


git-svn-id: svn://10.0.0.236/trunk@49965 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 07:49:32 +00:00
mcafee%netscape.com
478e94b19b Removing unnecessary label rule that was making prefs look like crap. Thanks to pavlov for this fix. r=pavlov,myself
git-svn-id: svn://10.0.0.236/trunk@49964 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 07:45:05 +00:00
warren%netscape.com
541b381b71 Added nsIFileSystem interface for new file transport implementation.
git-svn-id: svn://10.0.0.236/trunk@49963 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 07:27:22 +00:00
ftang%netscape.com
0851c72b83 fix bug 15647 r=sdagley. Swap progid base between ENCODER/DECODER
git-svn-id: svn://10.0.0.236/trunk@49962 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 07:11:40 +00:00
pavlov%netscape.com
644f5864a9 initial work on unix installer
git-svn-id: svn://10.0.0.236/trunk@49961 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 06:59:20 +00:00
waterson%netscape.com
c4175bcb0e Fix incorrect use of CBufDescriptor that was causing persistence to flake.
git-svn-id: svn://10.0.0.236/trunk@49960 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 06:42:27 +00:00
waterson%netscape.com
58cd4c0ef8 Suppress assertions with context menus for now.
git-svn-id: svn://10.0.0.236/trunk@49959 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 06:40:06 +00:00
brendan%mozilla.org
a17b679975 Top-level ToSource function for primitive type roundtrips.
git-svn-id: svn://10.0.0.236/trunk@49958 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 06:37:55 +00:00
brendan%mozilla.org
e8d09fd3a6 Fix two multi-threaded GC-rooting bugs:
- js_NewFunction wasn't initializing (clearing) JSFunction members before it
  linked the JSFunction to a JSObject that the GC could reach from a root.
- Make sure frame.scopeChain is cleared before linking frame via cx->fp, even
  though we set frame.scopeChain to some object later (another signal that we
  should rework js_Invoke to inline it and otherwise optimize it).


git-svn-id: svn://10.0.0.236/trunk@49957 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 06:29:43 +00:00
mscott%netscape.com
ccf2994b95 (not part of the build!)
just add a new line to the end of the file....


git-svn-id: svn://10.0.0.236/trunk@49956 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 06:21:40 +00:00
mscott%netscape.com
7277b119b3 Bug #15655 --> new file for mime to use nsIModule. This is not part of the build and has not been reviewed yet. The review will happen
when I land all the rest of the changes related to converting mime to use nsIModule.


git-svn-id: svn://10.0.0.236/trunk@49955 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 06:00:40 +00:00
rpotts%netscape.com
c0d2a0e2f2 bug #15605. Reviewed by nisheeth. Check the return code from GoToAnchor(...) :-)
git-svn-id: svn://10.0.0.236/trunk@49954 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 05:15:13 +00:00
jefft%netscape.com
347134e10d fixed bug 15291 - Pop3 local mail folder message lines not ended with platform specific line endings; replacing CRLF with platform specific MSG_LINEBREAK; reviewed by bienvenu, mscott
git-svn-id: svn://10.0.0.236/trunk@49953 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 04:56:02 +00:00
neeti%netscape.com
2eb2dcca67 updating status
git-svn-id: svn://10.0.0.236/trunk@49952 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 04:47:08 +00:00
bienvenu%netscape.com
9446096dca fix ref count tracing for composite data source bug 666 n/a r=waterson
git-svn-id: svn://10.0.0.236/trunk@49951 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 04:45:14 +00:00
neeti%netscape.com
7362f1b13f Converted wallet.dll and wlltvwrs.dll to use nsIModule to prepare for memory leaks fixing. Bug# 14034. r=morse
git-svn-id: svn://10.0.0.236/trunk@49950 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 04:42:59 +00:00
troy%netscape.com
148aeb9479 Space issue. r=kipp@netscape.com
Replaced hash table which used lots of memory with simple linked list of
FrameInfo* structs


git-svn-id: svn://10.0.0.236/trunk@49949 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 04:22:51 +00:00
karnaze%netscape.com
89bd8c3bc9 fixed assertion in viewer sample 4. AdjustForCollapsingCols was incorrectly counting as columns frames which were not of display type NS_STYLE_DISPLAY_TABLE_COLUMN and something must have changed elsewhere to tickle this.
git-svn-id: svn://10.0.0.236/trunk@49948 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 03:59:07 +00:00
ramiro%netscape.com
f3bc03de75 Im an idiot, i applied the same patch twice. Sorry. Backout my last change.
git-svn-id: svn://10.0.0.236/trunk@49947 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 03:38:49 +00:00
rjc%netscape.com
d69298a9d2 Fix broken XUL. Review: sdagley
git-svn-id: svn://10.0.0.236/trunk@49946 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 03:33:28 +00:00
mscott%netscape.com
417b06f591 Bug #000 (no bug needed). Remove nsIStreamConverter2.idl.
r=valeski


git-svn-id: svn://10.0.0.236/trunk@49945 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 03:27:55 +00:00
mscott%netscape.com
9fce7b0c15 Bug #0000 (no bug # needed) remove nsIStreamConverter2.idl
r=valeski


git-svn-id: svn://10.0.0.236/trunk@49944 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 03:27:15 +00:00
mscott%netscape.com
e7538bfe37 bug #000 (no bug # needed). removing obsolete file from the build
nsIStreamconverter2.idl
r=valeski


git-svn-id: svn://10.0.0.236/trunk@49943 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 03:21:44 +00:00
mscott%netscape.com
9c726938af Bug #000 (no bug number needed) remove an obsolete file from the build (nsIStreamConverter2.idl)
r=valeski


git-svn-id: svn://10.0.0.236/trunk@49942 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 03:20:39 +00:00
rjc%netscape.com
bed7f86409 Update leak docs. (Not part of build.)
git-svn-id: svn://10.0.0.236/trunk@49941 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 03:00:06 +00:00
valeski%netscape.com
7a33492452 r=sdagley, 15654 was deleting a void * which is a no-no on hp.
git-svn-id: svn://10.0.0.236/trunk@49940 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 02:54:49 +00:00
sfraser%netscape.com
08f88ab066 Fix the file creator code so that the library gets the nice pretty icon. r=sdagley
git-svn-id: svn://10.0.0.236/trunk@49939 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 02:38:35 +00:00
sdagley%netscape.com
9fc68e8c6c Add documentation comments for Mac library loading. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@49937 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 02:37:14 +00:00
dmose%mozilla.org
a81253b229 new version of LICENSE; not part of the build
git-svn-id: svn://10.0.0.236/trunk@49936 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 02:14:51 +00:00
waterson%netscape.com
0d44d897c3 Fix leaking rowgroup frame. r=hyatt.
git-svn-id: svn://10.0.0.236/trunk@49935 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 01:50:14 +00:00
mgleeson1%netscape.com
8e1de98ab5 r=kipp changed illegal escape \{ to {
git-svn-id: svn://10.0.0.236/trunk@49934 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 01:41:38 +00:00
varada%netscape.com
011f173694 fix to bug #15327 adding MinLen field to the edit widget
git-svn-id: svn://10.0.0.236/trunk@49933 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 01:38:02 +00:00
rjc%netscape.com
2ffbb4f583 Bug #14034: Convert to nsIModule to prepare for memory leak fixing. Also fix leak of search stream listener. Review: sdagley@netscape.com
git-svn-id: svn://10.0.0.236/trunk@49932 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 01:37:47 +00:00
hangas%netscape.com
6563efab51 Porkjocky: .xul file troubleshooting. Removed duplicate references to css files within the same windows for performance. Wrapped another tree in a <div> to avoid scrolling issues. r=davidm
git-svn-id: svn://10.0.0.236/trunk@49931 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 01:35:36 +00:00
varada%netscape.com
c70061dbb3 Bug fix for #15327 - determination of length of edit fields
git-svn-id: svn://10.0.0.236/trunk@49930 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 01:32:00 +00:00
sfraser%netscape.com
a591a0e509 Fix access paths to not look for lib/xp. r=sdagley
git-svn-id: svn://10.0.0.236/trunk@49929 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 01:21:23 +00:00
sfraser%netscape.com
6dd1042b5d Don't export headers in lib/mac/MacMemoryAllocator any more. NSPR no longer needs the one that was being exported. r=sdagley
git-svn-id: svn://10.0.0.236/trunk@49928 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 01:20:44 +00:00
sfraser%netscape.com
b98dbfaa02 Fixed access paths to remove lib/xp, and mozilla/include. xp_regexp.h is now exported, and found in dist. r=sdagley
git-svn-id: svn://10.0.0.236/trunk@49927 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 01:19:58 +00:00
sfraser%netscape.com
3e38e2ea2a Export xp_regexp.h, for libjar. r=sdagley
git-svn-id: svn://10.0.0.236/trunk@49926 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 01:19:18 +00:00
sfraser%netscape.com
cb8f332910 Changed to export using the .exp file, to reduce link warnings. r=sdagley
git-svn-id: svn://10.0.0.236/trunk@49924 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 01:17:56 +00:00
sfraser%netscape.com
32644723fe First Checked In.
git-svn-id: svn://10.0.0.236/trunk@49923 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 01:17:19 +00:00
dp%netscape.com
25f4419ba0 updating status
git-svn-id: svn://10.0.0.236/trunk@49920 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 01:09:54 +00:00
sfraser%netscape.com
c4429f5066 Change Mac library loading to load using the FSSpec. r=dp
git-svn-id: svn://10.0.0.236/trunk@49919 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 01:09:13 +00:00
sdagley%netscape.com
15caf3db1c New calls to load code fragments by name or index, and utility routines for getting fragment names from the 'cfrg' resource. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@49918 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 01:07:15 +00:00
sdagley%netscape.com
d89dab4e33 Added #define NSPR_AS_SHARED_LIB to avoid (never called) MacInitializeMemory. This is just tidy up. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@49917 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 01:06:27 +00:00
sdagley%netscape.com
6e8fa75abe New implementations of PR_LoadNamedFragment and PR_LoadIndexedFragment, which now allow loading libraries by FSSpec. Mac only. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@49916 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 01:05:33 +00:00
sdagley%netscape.com
b9147e6fd2 Added prlink_mac.h, r=sfraser
git-svn-id: svn://10.0.0.236/trunk@49915 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 01:04:06 +00:00
sdagley%netscape.com
35708ce998 Included some new header files, so that building with 'require function prototypes' works better. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@49914 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 01:03:00 +00:00
waterson%netscape.com
d48f50c349 Fix dumb leak.
git-svn-id: svn://10.0.0.236/trunk@49913 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 01:02:11 +00:00
sdagley%netscape.com
190716d4ac First Checked In.
git-svn-id: svn://10.0.0.236/trunk@49912 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 01:00:58 +00:00
rogerl%netscape.com
74e6cc86a3 Added version 150, changed version testing in regexp
git-svn-id: svn://10.0.0.236/trunk@49911 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 00:10:27 +00:00
waqar%netscape.com
b576ab2cb5 # 9777
r vidur
d When splitText has an index error, it used to send NS_ERROR not it sends
  the proper DOM index size error.


git-svn-id: svn://10.0.0.236/trunk@49910 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 00:06:53 +00:00
tao%netscape.com
c9f9d5ee25 Add flags to selectively build subdirectories.
git-svn-id: svn://10.0.0.236/trunk@49909 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 00:03:37 +00:00
kipp%netscape.com
3a0fa24595 Cleanup special viewers too
git-svn-id: svn://10.0.0.236/trunk@49908 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-06 00:00:18 +00:00
kipp%netscape.com
be0faff780 Implement ShowContentSize; fixed a bug where we weren't removing the browser window as a doc-loader observer which sometimes triggers a crash when the -f argument to the viewer is used
git-svn-id: svn://10.0.0.236/trunk@49907 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:59:59 +00:00
cata%netscape.com
7b445faf02 added files: mozilla/intl/uconv/ucvtw2/nsUCvTw2Module.cpp, removed files: mozilla/intl/uconv/ucvtw2/nsUCvTW2Dll.cpp
git-svn-id: svn://10.0.0.236/trunk@49906 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:58:49 +00:00
morse%netscape.com
3f799e031d fix bug 15572, clean up build warnings, reviewed slamm
git-svn-id: svn://10.0.0.236/trunk@49905 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:58:45 +00:00
kipp%netscape.com
71408231d2 Tweaked refcnt munging to better support refcnt tracking
git-svn-id: svn://10.0.0.236/trunk@49904 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:58:32 +00:00
kipp%netscape.com
3a3369076f Fixed a memory leak of widgets triggered when the close box for a window is hit
git-svn-id: svn://10.0.0.236/trunk@49903 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:57:57 +00:00
cata%netscape.com
934632fc76 added files: mozilla/intl/uconv/ucvtw/nsUCvTwModule.cpp, removed files: mozilla/intl/uconv/ucvtw/nsUCvTWDll.cpp
git-svn-id: svn://10.0.0.236/trunk@49902 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:57:29 +00:00
kipp%netscape.com
bdf07b5f16 Work around a flaw in the doc-loader not handling a RemoveObserver call during an observer notification
git-svn-id: svn://10.0.0.236/trunk@49901 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:57:20 +00:00
morse%netscape.com
f082f7eb5e fix bug 15572, fix up build warnings, reviewed slamm
git-svn-id: svn://10.0.0.236/trunk@49900 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:56:59 +00:00
kipp%netscape.com
2f507e7b3c Improved printouts so that addref/release tracing always shows the old/new refcnts in decimal instead of old in decimal and new in hex
git-svn-id: svn://10.0.0.236/trunk@49899 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:56:33 +00:00
cata%netscape.com
b18dd56b44 added files: mozilla/intl/uconv/ucvlatin/nsUCvLatinModule.cpp, removed files: mozilla/intl/uconv/ucvlatin/nsUCvLatinDll.cpp
git-svn-id: svn://10.0.0.236/trunk@49898 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:56:08 +00:00
cata%netscape.com
bfa9612c50 Converting library to Module. Bug 15589. Reviewed by dp.
git-svn-id: svn://10.0.0.236/trunk@49897 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:54:18 +00:00
kipp%netscape.com
71a5f24ba3 Implemented suggested change so that leak info is printed if an env variable is used
git-svn-id: svn://10.0.0.236/trunk@49896 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:54:08 +00:00
cata%netscape.com
b8d939ca6e added files: mozilla/intl/uconv/ucvko/nsUCvKoModule.cpp, removed files: mozilla/intl/uconv/ucvko/nsUCvKODll.cpp
git-svn-id: svn://10.0.0.236/trunk@49895 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:53:21 +00:00
cata%netscape.com
28fb79fcef added files: mozilla/intl/uconv/ucvja/nsUCvJaModule.cpp, removed files: mozilla/intl/uconv/ucvja/nsUCVJADll.cpp
git-svn-id: svn://10.0.0.236/trunk@49894 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:51:46 +00:00
ducarroz%netscape.com
869cfacaf7 related to bug 14561, fix some other case where we didn't bring back errors while sending message. R=rhp
git-svn-id: svn://10.0.0.236/trunk@49893 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:48:40 +00:00
dmose%mozilla.org
79a8db9e5d updating NPL boilerplate to 1.1; only comments changed
git-svn-id: svn://10.0.0.236/trunk@49892 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:48:08 +00:00
kipp%netscape.com
53b538cfc8 Support SizeOf methods
git-svn-id: svn://10.0.0.236/trunk@49891 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:47:46 +00:00
hangas%netscape.com
efca1f8c77 Fix bug 13729 for putterman/hyatt. Tree headers not always displaying on Mac/Linux. Commented out optimization in Reflow(). r=hyatt.
git-svn-id: svn://10.0.0.236/trunk@49890 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:46:16 +00:00
mcafee%netscape.com
28e1dfd154 removing redundant xul: tags, minor whitespace stuff. r=slamm
git-svn-id: svn://10.0.0.236/trunk@49889 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:44:41 +00:00
pollmann%netscape.com
1c6394c2d0 Bug 15170: Implement onchange notification for list boxes
git-svn-id: svn://10.0.0.236/trunk@49888 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:43:06 +00:00
mcafee%netscape.com
4518901d71 xul: is redundant in xul files. r=slamm
git-svn-id: svn://10.0.0.236/trunk@49887 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:40:07 +00:00
rjc%netscape.com
31eba671e2 Bug # 14034: Convert to nsIModule to prepare for memory leak fixing. Review: dp@netscape.com
git-svn-id: svn://10.0.0.236/trunk@49886 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:39:48 +00:00
danm%netscape.com
08ffd64c70 Release XP menu rollup listener before menu is executed. This restores normal event handling earlier. Fixes bug 15596. r:hyatt
git-svn-id: svn://10.0.0.236/trunk@49884 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:31:06 +00:00
selmer%netscape.com
149b556a40 new fn definitions
git-svn-id: svn://10.0.0.236/trunk@49883 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:18:35 +00:00
selmer%netscape.com
12bc995595 Removed temporary 'NewConfig' fix in favor of real fix
git-svn-id: svn://10.0.0.236/trunk@49882 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:18:12 +00:00
selmer%netscape.com
ab205b541a Fix dialogs a little (more required) and fix handling of GlobalArrayIndex
git-svn-id: svn://10.0.0.236/trunk@49881 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:17:07 +00:00
selmer%netscape.com
b51d6a324e Updates to make all functions go through 'command' except generatelist and installbuilder (fix those later)
git-svn-id: svn://10.0.0.236/trunk@49880 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:15:49 +00:00
ramiro%netscape.com
f037c3b791 Fix for bug 15245. Rearrange the inclusion of system headers to unbreak
some unix compilers.  Patch provided by tor@cs.brown.edu and reviewed by me.


git-svn-id: svn://10.0.0.236/trunk@49879 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 23:08:19 +00:00
varada%netscape.com
040d9254e3 moving branding_page4.ini to the page before the installer page bug 11342
git-svn-id: svn://10.0.0.236/trunk@49878 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 22:57:18 +00:00
cata%netscape.com
230b7ea144 Fix my Unix breakage.
git-svn-id: svn://10.0.0.236/trunk@49877 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 22:33:09 +00:00
waterson%netscape.com
495ac5394c Fix crasher when loading XUL in viewer and no localstore is present.
git-svn-id: svn://10.0.0.236/trunk@49876 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 22:22:40 +00:00
rhp%netscape.com
3924a3e115 Fix for my screw up...sorry about this.
git-svn-id: svn://10.0.0.236/trunk@49875 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 22:15:43 +00:00
rogerl%netscape.com
ac914fc99e Bug #14545 - get array length exceptions working with non-Number array
contructor arguments.


git-svn-id: svn://10.0.0.236/trunk@49874 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 22:11:57 +00:00
waterson%netscape.com
33cab018e9 Bug 13910. Make sure we push the 'NC:description' attribute. r=dougt
git-svn-id: svn://10.0.0.236/trunk@49873 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 22:11:44 +00:00
morse%netscape.com
e03ce189b4 fix bug 14889, lazy initialization of wallet, r=sfraser
git-svn-id: svn://10.0.0.236/trunk@49872 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 22:11:22 +00:00
mscott%netscape.com
b605bcf7c8 Bug #15583 --> fix warning (unused variable)
r=sspitzer


git-svn-id: svn://10.0.0.236/trunk@49871 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 22:03:50 +00:00
sspitzer%netscape.com
2e1f51d842 fix for #15617. always save prefs after migration. not sure why prefs aren't being saved anymore, but this is a good idea. r=mscott
git-svn-id: svn://10.0.0.236/trunk@49870 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 22:02:58 +00:00
cata%netscape.com
e532cb3ce3 added files: mozilla/intl/uconv/ucvcn/nsUCvCnModule.cpp, removed files: mozilla/intl/uconv/ucvcn/nsUCvCnDll.cpp
git-svn-id: svn://10.0.0.236/trunk@49869 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 21:26:47 +00:00
cata%netscape.com
6278c9cdb6 Converting library to Module. Bug 15589. Reviewed by dp.
git-svn-id: svn://10.0.0.236/trunk@49868 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 21:25:47 +00:00
dougt%netscape.com
08e25e2af2 1) Adding an eventsinkgetter interface so that when 13894 become unblocked (when gagan
checks in his protocol messages)  we will automatically get onStatus and onProgress
notification.  reviewed by dveditz.


git-svn-id: svn://10.0.0.236/trunk@49867 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 21:18:48 +00:00
rhp%netscape.com
9230e0bd2b Fix for #14120 - Reviewer - bienvenu
git-svn-id: svn://10.0.0.236/trunk@49866 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 21:17:17 +00:00
dougt%netscape.com
f10ff94359 Change pref name
Added Preferences for software notification timer (see 14729) r. samir g.


git-svn-id: svn://10.0.0.236/trunk@49865 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 21:15:30 +00:00
dougt%netscape.com
699606d62a set software notification timer to once per week. 14729 R. sgehani
Update pref name


git-svn-id: svn://10.0.0.236/trunk@49864 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 21:14:13 +00:00
waterson%netscape.com
b4e6b84fea Bug 15301. Remove RDF graph from XUL content model construction. Landed XUL_19991005_BRANCH; see branch comments for detailed checkin information. r=shaver,hyatt.
git-svn-id: svn://10.0.0.236/trunk@49863 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 21:13:55 +00:00
jband%netscape.com
32816676db the JS engine part of the fix for bug 14738. This does two things: 1) expose the JSClass for JSError so that it is possible to detect from the outside if a given JSObject is of that JSError class, and 2) expose an api call via which the JSErrorReport can be extracted from a JSError (if present). This change required renaming the JSClass used for JSError, so many lines were touched
git-svn-id: svn://10.0.0.236/trunk@49861 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 21:07:23 +00:00
mscott%netscape.com
dfe61b8c0c Bug #0000 (no bug number necessary). remove old STREAM_CONVERTER_HACK #ifdef code because we no longer need this.
This was the hack we used before we had a stream converter service to load rfc822 data into a webshell and get it
converted to html.
r=warren


git-svn-id: svn://10.0.0.236/trunk@49856 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 20:54:03 +00:00
neeti%netscape.com
23d28fee69 Not part of the build. Took some more dlls for conversion to use nsImodule
git-svn-id: svn://10.0.0.236/trunk@49855 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 20:49:20 +00:00
sspitzer%netscape.com
185c444bad fix for #15610, alert on failure to rename or delete a profile. r=mscott
git-svn-id: svn://10.0.0.236/trunk@49854 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 20:49:09 +00:00
hangas%netscape.com
bb00d4e082 Fixing bug 13443 (crash scrolling results pane of address book), added <html:div> around the trees as per Hyatt's suggestion which Scottip reminded me of today. r=scottip
git-svn-id: svn://10.0.0.236/trunk@49853 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 20:49:08 +00:00
mscott%netscape.com
bc20c13bee Bug #14739 --> fix use of unitiailized variable.
r=sspitzer


git-svn-id: svn://10.0.0.236/trunk@49852 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 20:48:37 +00:00
sspitzer%netscape.com
0685d4013e remove work around for #15458. that bug has been fixed.
gayatrib and I both tested it.


git-svn-id: svn://10.0.0.236/trunk@49851 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 20:47:41 +00:00
varada%netscape.com
6c0dabbcc9 Validation for .nci in the entry field during creation of NCI files
git-svn-id: svn://10.0.0.236/trunk@49849 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 20:30:20 +00:00
rogerl%netscape.com
51378fb74f Errors as exceptions working from generated code.
git-svn-id: svn://10.0.0.236/trunk@49848 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 19:44:24 +00:00
sspitzer%netscape.com
ae215e19d6 fix for #15578, r=mscott, a=granrose, fix crash on startup.
not sure why we don't have a webshell here...


git-svn-id: svn://10.0.0.236/trunk@49846 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 18:13:15 +00:00
sspitzer%netscape.com
2aa4acab95 fix for #15578, r=mscott, a=granrose
properly migrate the bookmarks file on windows.


git-svn-id: svn://10.0.0.236/trunk@49845 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 18:10:20 +00:00
kipp%netscape.com
8626b336eb Added ctor/dtor counting to the parser tokens
git-svn-id: svn://10.0.0.236/trunk@49842 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 15:00:05 +00:00
kipp%netscape.com
feff21ed38 r=jband; fixed a memory leak
git-svn-id: svn://10.0.0.236/trunk@49841 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 14:56:41 +00:00
kipp%netscape.com
ebce0e90ac Renamed the ctor/dtor counting macros to make more sense
git-svn-id: svn://10.0.0.236/trunk@49840 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 14:54:05 +00:00
kipp%netscape.com
a87258a834 Added in ctor/dtor counting
git-svn-id: svn://10.0.0.236/trunk@49839 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 14:53:40 +00:00
kipp%netscape.com
bcb12509a4 r=dp; Added in ctor/dtor counting
git-svn-id: svn://10.0.0.236/trunk@49838 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 14:53:20 +00:00
kipp%netscape.com
54966bf91e r=beard; Added in ctor/dtor counting
git-svn-id: svn://10.0.0.236/trunk@49837 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 14:52:53 +00:00
kipp%netscape.com
011094c243 r=peterl; Added in ctor/dtor counting
git-svn-id: svn://10.0.0.236/trunk@49836 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 14:52:20 +00:00
jefft%netscape.com
dc5a959bfb fixed bug 15556 - treat forward quoted as inline; default to forward as attachment if get pref failed; reviewed rhp
git-svn-id: svn://10.0.0.236/trunk@49835 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 14:52:19 +00:00
kipp%netscape.com
8fdcb733f6 Removed static ctors
git-svn-id: svn://10.0.0.236/trunk@49834 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 14:51:56 +00:00
kipp%netscape.com
a4aa98059e r=troy; Added in ctor/dtor counting
git-svn-id: svn://10.0.0.236/trunk@49833 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 14:51:12 +00:00
kipp%netscape.com
beb412d2f0 r=troy; Added some atoms to help eliminate global ctors
git-svn-id: svn://10.0.0.236/trunk@49832 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 14:51:02 +00:00
kipp%netscape.com
cd7adcfa5b r=troy; Removed some of my own debug noise
git-svn-id: svn://10.0.0.236/trunk@49831 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 14:50:30 +00:00
kipp%netscape.com
ddfb13e8bd whitespace noise
git-svn-id: svn://10.0.0.236/trunk@49830 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 14:50:06 +00:00
kipp%netscape.com
6455b470d5 Whitespace tweak
git-svn-id: svn://10.0.0.236/trunk@49829 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 14:48:58 +00:00
kipp%netscape.com
2e0f295a75 Added in a way to shutdown the image manager
git-svn-id: svn://10.0.0.236/trunk@49828 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 14:48:44 +00:00
kipp%netscape.com
0fe83f199b Remove some compiler warnings
git-svn-id: svn://10.0.0.236/trunk@49827 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 14:48:01 +00:00
jefft%netscape.com
3bf966446e fixed bug 9540, 10827, 11991 - copy news article failed on certain platforms; replacing CRLF to platform specific MSG_LINEBREAK; reviewed by mscott
git-svn-id: svn://10.0.0.236/trunk@49823 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 14:20:15 +00:00
jefft%netscape.com
d280db659f fixed bug 9540, 10827, 11991 - copy news article failed on certain platforms; replacing CRLF to platform specific MSG_LINEBREAK; reviewed by mscott
git-svn-id: svn://10.0.0.236/trunk@49822 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 14:15:04 +00:00
rpotts%netscape.com
52fa2d449f Added a missing lock to nsSocketTransport::OnFull... reviewed by warren.
git-svn-id: svn://10.0.0.236/trunk@49820 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 08:41:37 +00:00
rpotts%netscape.com
bd2b8bbb50 bug #14181. Reviewed by pnunn. Fixed crash when loading large (or slow) animated GIF images on linux.
git-svn-id: svn://10.0.0.236/trunk@49819 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 08:36:43 +00:00
mscott%netscape.com
9540a1b2bb fix vc5.0 build......include nsISupportsArray before using a com ptr on it.
git-svn-id: svn://10.0.0.236/trunk@49818 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 06:56:12 +00:00
dp%netscape.com
a4303afba6 Fixed build bustage caused by undefined min()
git-svn-id: svn://10.0.0.236/trunk@49817 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 06:28:17 +00:00
mscott%netscape.com
3f98b22adb Bug #0000 --> (no bug necessary)....add a #ifdef guard around this header file
so we don't try to include the contents multiple times!!
r=sspitzer


git-svn-id: svn://10.0.0.236/trunk@49816 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 05:53:31 +00:00
rickg%netscape.com
3f9c7372e6 no changes made; just forcing a recompile
git-svn-id: svn://10.0.0.236/trunk@49815 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 05:52:12 +00:00
mscott%netscape.com
628723cd09 Bug #11837 use NS_GENERIC_FACTORY_CONSTRUCTOR, remove NS_New**
r=sspitzer


git-svn-id: svn://10.0.0.236/trunk@49813 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 05:46:20 +00:00
mscott%netscape.com
d84901b036 Bug #11837 use NS_GENERIC_FACTORY_CONSTRUCTOR for our components
the factory should cache nsIGenericFactory objects for each
component we know how to produce.
r=sspitzer


git-svn-id: svn://10.0.0.236/trunk@49812 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 05:45:07 +00:00
mscott%netscape.com
c12b68d3bc Bug #11837 --> in order to use NS_GENERIC_FACTORY_CONSTRUCTOR the
class declaration needs to be in the header file. Removing old NS_New*
method in favor of NS_GENERIC_FACTORY_CONSTRUCTOR.
r=sspitzer


git-svn-id: svn://10.0.0.236/trunk@49811 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 05:44:41 +00:00
sspitzer%netscape.com
7159500167 added files: mozilla/profile/src/nsProfileFactory.cpp
git-svn-id: svn://10.0.0.236/trunk@49810 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 05:20:58 +00:00
sspitzer%netscape.com
8c517b89c5 fix for #15262, r=mscott
break apart the profile factory from nsProfile.cpp and put it into nsProfileFactory.cpp
also, apply dp's patch to use nsIModule.  r=sspitzer


git-svn-id: svn://10.0.0.236/trunk@49809 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 05:20:45 +00:00
pavlov%netscape.com
489535b9e0 fix bugs in find dialog and make it use the dialog overlay. make it not resizeable, fixed style rules on the windows and buttons. r=sfraser
git-svn-id: svn://10.0.0.236/trunk@49808 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 05:20:29 +00:00
rjc%netscape.com
0899d7c171 Fix bug # 15435: prevent long ( > 255) URL corruption. Also convert over to a nsIModule. Review: dp@netscape.com
git-svn-id: svn://10.0.0.236/trunk@49807 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 05:11:09 +00:00
rpotts%netscape.com
2c951d67c1 Fixed up broken test case while investigating bug #14181...
git-svn-id: svn://10.0.0.236/trunk@49806 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 05:02:56 +00:00
rickg%netscape.com
685d8d596e fixed bug 15290; eliminated a leak; r=kmcclusk
git-svn-id: svn://10.0.0.236/trunk@49805 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 04:54:53 +00:00
radha%netscape.com
ac0f716288 Fix for bug #13329 . Back and forward not consistent all the time.
Fix already checked in to the M10 branch. Merging changes to tip.


git-svn-id: svn://10.0.0.236/trunk@49804 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 04:49:58 +00:00
rickg%netscape.com
4a9749eec3 bugs 13038 and 14920; also improved comments. r=kmcclusk
git-svn-id: svn://10.0.0.236/trunk@49803 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 04:47:19 +00:00
jband%netscape.com
37f1655b17 xpidl compiler was failing to complain that it is an error to use [shared] with 'inout' params. (no bug was filed) r=mccabe
git-svn-id: svn://10.0.0.236/trunk@49802 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 04:23:35 +00:00
karnaze%netscape.com
aa9be56cfa bug 14818 - made standard mode like NavQuirks when handling colspans exceeding the number of columns.
git-svn-id: svn://10.0.0.236/trunk@49801 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 04:21:00 +00:00
putterman%netscape.com
b4b00ba592 Fix bug 15479 - crash when mousing over folder pane scrollbar. Also, fix 12645 - assertion
when using folder pane scrollbar.  Also, make 3pane menu and toolbar look normal.  various
parts reviewed by hyatt and hangas.


git-svn-id: svn://10.0.0.236/trunk@49800 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 04:14:26 +00:00
sspitzer%netscape.com
41337e7380 a bunch of changes, all reviewed by mscott.
fix some bugs with next, back, and cancel in the profile manager.
(#15223, #15271)
re-write all callers of nsProfile::GetCurrentProfileDir() to use the file locator.
(#15063)
more profile code clean up. (#15042)
rename the old 4.x history.dat file.  it's called history.dat in 5.0, but the file
formats are different.  (binary in 4.x, vs mork in 5.0)


git-svn-id: svn://10.0.0.236/trunk@49797 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 04:12:58 +00:00
norris%netscape.com
3c9599e418 Fix 15458 "onLoadHandler does not work"
Reviewed by mstoltz.


git-svn-id: svn://10.0.0.236/trunk@49796 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 04:08:14 +00:00
rpotts%netscape.com
fa598b6cae bug #15341 and bug #15344. Use the documentloader observer instead of a stream observer.
git-svn-id: svn://10.0.0.236/trunk@49795 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 04:04:16 +00:00
sgehani%netscape.com
ff7384e823 Added Mac alias creation feature for install script writers using XPInstall: bugs 9363, 14345, 15503; r=ssu.
Fixed nsFileSpec<->nsInstall error translation in File operations exposed to install script writers: bug 15486; r=ssu.


git-svn-id: svn://10.0.0.236/trunk@49794 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 04:04:01 +00:00
tao%netscape.com
9c58478520 Add makefiles for Unix.
git-svn-id: svn://10.0.0.236/trunk@49793 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 03:55:45 +00:00
mccabe%netscape.com
1664bd1228 Initial checkin of TestScan.java, a simple driver for generating and printing various kinds of parse trees, and for profiling scanning, parsing and compiling.
git-svn-id: svn://10.0.0.236/trunk@49792 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 03:47:04 +00:00
alecf%netscape.com
455a608f47 add new findServer() method and javadoc comments
r=sspitzer
#15140


git-svn-id: svn://10.0.0.236/trunk@49791 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 03:29:42 +00:00
waterson%netscape.com
0db46fd24d Bug 15511. Make sure container element sets 'parent' backpointer to null before releasing child; prevents dangling references if child is still referenced from elsewhere. r=vidur
git-svn-id: svn://10.0.0.236/trunk@49790 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 03:20:57 +00:00
sfraser%netscape.com
2306c86ff9 Use CR for line termination on Macintosh, and don't call flush() for an endl. r dougt.
git-svn-id: svn://10.0.0.236/trunk@49788 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 03:00:13 +00:00
troy%netscape.com
9598e1278f Checked in workaround for tree-view/apprunner problem of assert in GetColumnWidth()
git-svn-id: svn://10.0.0.236/trunk@49787 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 02:41:36 +00:00
selmer%netscape.com
016eba860a Most of CopyDir ready
git-svn-id: svn://10.0.0.236/trunk@49786 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 02:22:36 +00:00
kipp%netscape.com
e62c5f3e87 backed out dps erroneous fix
git-svn-id: svn://10.0.0.236/trunk@49785 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 01:44:35 +00:00
kipp%netscape.com
8aa6b7aa38 Fixed build wastage
git-svn-id: svn://10.0.0.236/trunk@49784 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 01:43:34 +00:00
dmose%mozilla.org
de7b2e5e74 update license boilerplate to NPL dual w/GPL, r=norris@netscape,a=norris@netscape.com
git-svn-id: svn://10.0.0.236/trunk@49783 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 01:42:01 +00:00
shawnp%earthling.net
17b2b4cace To determine what gfx toolkit is being used at runtime, I added the
following functions to the nsIUnixToolkitService interface:
SetWidgetToolkitName(), SetGfxToolkitName(), IsValidWidgetToolkit(),
IsValidGfxToolkit(), GetWidgetToolkitName(), GetGfxToolkitName(). I also
added the implementation for these functions. Reviewed by
ramiro@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@49782 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 01:35:21 +00:00
shawnp%earthling.net
0b401a86ba Improved info that is logged. Only bother to do something in OnPaint() if there
is a pixmap to copy from. Reviewed by ramiro@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@49781 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 01:31:56 +00:00
shawnp%earthling.net
8fff423963 Implemented stub CaptureRollupEvents() and SetTitle() functions. Now handle
both Qt and Xlib gfx toolkits at runtime. Fixed a bug in SetCursor(). Can now
track cursor movement when no mouse button is pressed. Got rid of flickering
when repainting web pages. Reviewed by ramiro@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@49780 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 01:31:18 +00:00
shawnp%earthling.net
4046113676 Now use separate PR_LOG module for scrolling. Stopped generation of double
scroll events. Reviewed by ramiro@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@49779 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 01:30:23 +00:00
shawnp%earthling.net
f6d25e7c68 Added mouse enter/exit event. Added focus in/out event. Now use seperate PR_LOG
modules for events. Combined MousePressedEvent() and MouseReleasedEvent() into
MouseButtonEvent(). Reviewed by ramiro@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@49778 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 01:29:07 +00:00
despotdaemon%netscape.com
90d52f24b4 Pseudo-automatic update of changes made by dmose@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@49777 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 01:28:52 +00:00
shawnp%earthling.net
14a4b48d16 Added constructor needed for integration with Xlib gfx toolkit. Reviewed by
ramiro@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@49776 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 01:28:24 +00:00
shawnp%earthling.net
5475d74886 Implemented stub SetCheckboxType() and GetCheckboxType() functions.
Reviewed by ramiro@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@49775 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 01:27:44 +00:00
shawnp%earthling.net
aa82528d79 Implemented stub GetEnabled() and IsHelpMenu() functions. Reviewed by
ramiro@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@49774 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 01:26:39 +00:00
kipp%netscape.com
2359272160 Disabled leak cleanup until other reviews come in
git-svn-id: svn://10.0.0.236/trunk@49773 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 01:26:14 +00:00
dp%netscape.com
1d765d463d Fixing build bustage.
git-svn-id: svn://10.0.0.236/trunk@49772 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 01:25:55 +00:00
shawnp%earthling.net
fc4c559faa Updated to better match values used by the gtk widget toolkit (assuming
those are more correct values). Reviewed by ramiro@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@49771 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 01:24:46 +00:00
shawnp%earthling.net
af2c5a6328 Added a static function to determine at runtime what gfx toolkit is being
used. Reviewed by ramiro@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@49770 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 01:23:47 +00:00
shawnp%earthling.net
66f0536716 Now link in libxlibgrb.so when building libwidgetqt.so so that Qt can work
with the Xlib gfx toolkit. Reviewed by ramiro@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@49769 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 01:22:48 +00:00
shawnp%earthling.net
cdbe7612ce Added missing entries to the menus. Added key accessors for menu items that
were missing them. Reviewed by ramiro@netscape.com.


git-svn-id: svn://10.0.0.236/trunk@49768 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 01:21:29 +00:00
jband%netscape.com
0afa0bedfe NOT PART OF BUILD updating status page
git-svn-id: svn://10.0.0.236/trunk@49767 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 00:53:26 +00:00
dmose%mozilla.org
239d60872d update license boilerplate to NPL dual w/GPL, r=norris@netscape,a=norris@netscape.com
git-svn-id: svn://10.0.0.236/trunk@49766 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 00:44:05 +00:00
kipp%netscape.com
74b117887f Found another type of symbol that indicates the presence of a static ctor
git-svn-id: svn://10.0.0.236/trunk@49765 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 00:39:48 +00:00
troy%netscape.com
eb8deb8c1b Removed unused data member
git-svn-id: svn://10.0.0.236/trunk@49764 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 00:32:07 +00:00
kipp%netscape.com
f0a6db6e3e r=ramiro; fix uninitialized refcnt bug that triggers an assertion when you're lucky
git-svn-id: svn://10.0.0.236/trunk@49763 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 00:31:55 +00:00
briano%netscape.com
1192ec6846 Automated update
git-svn-id: svn://10.0.0.236/trunk@49762 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 00:31:43 +00:00
alecf%netscape.com
d721125978 add detection for broken mmap()/write() behavior
contributed by jim_nance@yahoo.com
r=alecf


git-svn-id: svn://10.0.0.236/trunk@49761 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 00:29:09 +00:00
rogerl%netscape.com
4c19332cbb First cut at errors as exceptions - These changes should be benign since
the errors are being wrapped by runtime exceptions and still need to be
explicitly caught (this is happening in the interpreter, but not in
generated code).


git-svn-id: svn://10.0.0.236/trunk@49760 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 00:21:07 +00:00
waterson%netscape.com
4fa6ebaa6d Bug 15460. Expose XML element creation via nsIXMLElementFactory interface. r=kipp.
git-svn-id: svn://10.0.0.236/trunk@49759 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 00:12:21 +00:00
kipp%netscape.com
c9603305c7 r=dp; more leak tracking hooks added
git-svn-id: svn://10.0.0.236/trunk@49758 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 00:08:41 +00:00
waterson%netscape.com
9145c77cc4 Bug 15367. Dump 'class' instead of 'file/line' for NS_LOG_REFCNT. r=shaver,dp
git-svn-id: svn://10.0.0.236/trunk@49757 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 00:07:54 +00:00
kipp%netscape.com
eaaefb2093 r=dp; cleanup xpcom library too during shutdown to reduce global leaks
git-svn-id: svn://10.0.0.236/trunk@49756 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 00:07:39 +00:00
kipp%netscape.com
59997b00eb r=vidur; fixed a memory of a script content object
git-svn-id: svn://10.0.0.236/trunk@49755 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 00:05:38 +00:00
rhp%netscape.com
55b9838dc4 Fixes for bug #15363 and #14675 - reviewer bienvenu
git-svn-id: svn://10.0.0.236/trunk@49754 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-05 00:03:20 +00:00
kipp%netscape.com
81d2477caa r=troy; missed checkin from last weeks module carpool
git-svn-id: svn://10.0.0.236/trunk@49753 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 23:56:57 +00:00
alecf%netscape.com
40b89da05b exorcism of net.h from IMAP
r=mscott


git-svn-id: svn://10.0.0.236/trunk@49752 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 23:53:56 +00:00
alecf%netscape.com
0ce90ca711 Combined checkin:
- convert Compose enums to IDL #13261
- exorcise net.h from compose and mime
r=ducarroz and rhp on both


git-svn-id: svn://10.0.0.236/trunk@49751 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 23:50:56 +00:00
nhotta%netscape.com
c34375d22a Bug fix 15017, reviewed by akkana. Override SetDocumentCharacterSet for HTMLEditor to update META charset tag if exists.
git-svn-id: svn://10.0.0.236/trunk@49750 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 23:50:27 +00:00
kipp%netscape.com
d2eaa239f7 r=ramiro; fixed memory leak of a font-metrics object; also added in ctor/dtor counting for leak debugging
git-svn-id: svn://10.0.0.236/trunk@49749 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 23:48:55 +00:00
troy%netscape.com
4f1bf46f5d Space optimization for nsTableFrame. r=karnaze@netscape.com
- changed mBorderEdges to be heap allocated (only needed for collapsing border model)
- made the 8 boolean data members into bitfields
- changed mColumnWidths to be as small as necessary instead of defaulting its size to 100 elements


git-svn-id: svn://10.0.0.236/trunk@49748 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 23:48:05 +00:00
troy%netscape.com
7eedfae1ee Made sure mOutsideEdge is initizlied
git-svn-id: svn://10.0.0.236/trunk@49747 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 23:44:44 +00:00
ducarroz%netscape.com
03b778a6f7 Fix for bug 14561, Already checked in the M10 BRANCH. Error must have negative value. A=choffman, R=mscott
git-svn-id: svn://10.0.0.236/trunk@49746 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 23:43:57 +00:00
troy%netscape.com
6311b52e3d Performance optimizations. r=kmcclusk@netscape.com
I made the commonly accessed stock objects global, and I optimized the
SetupSolidPen() code


git-svn-id: svn://10.0.0.236/trunk@49745 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 23:42:28 +00:00
kipp%netscape.com
a3570edb7f r=dp; tidy up exit logic to release more global junk (space team work)
git-svn-id: svn://10.0.0.236/trunk@49744 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 23:41:53 +00:00
kipp%netscape.com
9246660bae r=dp,vidur,beard; close up some memory leaks related to shutdown of the viewer
git-svn-id: svn://10.0.0.236/trunk@49743 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 23:41:25 +00:00
kipp%netscape.com
db15162105 r=dp; implement some macros to help track memory leaks
git-svn-id: svn://10.0.0.236/trunk@49742 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 23:36:18 +00:00
kipp%netscape.com
af9cdee1dc r=brendan; applied changes recommended by brendan
git-svn-id: svn://10.0.0.236/trunk@49741 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 23:35:51 +00:00
peterl%netscape.com
50c6f531fe fixed leak of undisplayed content map nodes (which leak style contexts)
r=kipp


git-svn-id: svn://10.0.0.236/trunk@49740 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 23:33:23 +00:00
valeski%netscape.com
3b535ab2ef NOT part of the build.
git-svn-id: svn://10.0.0.236/trunk@49739 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 23:13:11 +00:00
valeski%netscape.com
3e9e763bae NOT part of the build.
git-svn-id: svn://10.0.0.236/trunk@49738 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 23:12:02 +00:00
norris%netscape.com
288c2fdcfb Fix up makefiles; previous patch was mis-applied.
git-svn-id: svn://10.0.0.236/trunk@49733 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 21:31:21 +00:00
morse%netscape.com
66a3fad9de oops -- I carelessly left out a carriage return in my last checkin
git-svn-id: svn://10.0.0.236/trunk@49732 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 21:07:01 +00:00
morse%netscape.com
6558fcffeb fix profile-manager bustage in todays build, checked in by request of leaf
git-svn-id: svn://10.0.0.236/trunk@49731 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 20:59:16 +00:00
kipp%netscape.com
ef2c286317 Fixed uninitialized members in the TreeNode struct
git-svn-id: svn://10.0.0.236/trunk@49729 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 20:25:53 +00:00
norris%netscape.com
19a71ea13f Fix bug found by Andrew Wason (see below).
Problem was that one transformation of a node to GETVAR wasn't protected by a check of inWithStatement().

======================================
Subject:
        multiple scopes
   Date:
        Fri, 01 Oct 1999 12:39:14 -0400
   From:
        Andrew Wason <aw@softcom.com>
     To:
        norris@netscape.com
    CC:
        Howard Lin <howard@softcom.com>




When I create two scopes, and one scope evaulates a string in the other
scope, it works.  However, if I do this while handling an exception thrown
within a JavaAdapter method, it fails with an exception.

Run the attached Java program with the two script files.  scope1.js
evaluates a string "printMessage" in the scope of scope2.js.  This returns
a function object which is then invoked.  This works in 3 cases, but fails
in the 4th (in the catch in the JavaAdapter).  Even in the 4th case where
it fails, printing the function object looks normal.

Am I doing something wrong, or is there a bug here?

java CrossScope scope1.js scope2.js

Outside of JavaAdapter
works before exception
works after exception
Inside of JavaAdapter
works before exception
Caught exception
pma=
function printMessage(msg) {
     java.lang.System.out.println(msg);
}

Exception in thread "main" org.mozilla.javascript.JavaScriptException:
org.mozilla.javascript.EvaluatorException: The undefined value has no
properties.
         at
org.mozilla.javascript.JavaScriptException.wrapException(JavaScriptException
.java:61)
         at
org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java,
Compiled Code)
         at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1256)
         at org.mozilla.javascript.Interpreter.interpret(Interpreter.java,
Compiled Code)
         at
org.mozilla.javascript.InterpretedScript.call(InterpretedScript.java:49)
         at
org.mozilla.javascript.InterpretedScript.exec(InterpretedScript.java:37)
         at org.mozilla.javascript.Context.evaluateReader(Context.java:697)
         at CrossScope.<init>(CrossScope.java:30)
         at CrossScope.main(CrossScope.java:10)


Thanks,
Andrew

import java.io.*;
import org.mozilla.javascript.*;

public class CrossScope {
	private Context m_jsContext;
	private Scriptable m_scope1;
	private Scriptable m_scope2;

	public static void main(String args[]) throws Exception {
		new CrossScope(args[0], args[1]);
	}

	private CrossScope(String strFile1, String strFile2) throws Exception {
		// Associate Context with main thread
		m_jsContext = Context.enter();
                m_jsContext.setOptimizationLevel(-1);

		// Init scope1, expose Scope object
  		m_scope1 = m_jsContext.initStandardObjects(new ImporterTopLevel());
		m_scope1.put("Scope", m_scope1, this);

		// Init scope2
		m_scope2 = m_jsContext.initStandardObjects(new ImporterTopLevel());

		// Run script in scope2
		Reader r2 = new FileReader(strFile2);
		m_jsContext.evaluateReader(m_scope2, r2, strFile2, 1, null);

		// Eval input JS in scope1 - it can in turn eval JS over in scope2
		Reader r1 = new FileReader(strFile1);
		Object obj = m_jsContext.evaluateReader(m_scope1, r1, strFile1, 1, null);
		if (obj instanceof Throwable)
			((Throwable)obj).printStackTrace();

		m_jsContext.exit();
	}

	public Object scope1Eval(String str) throws JavaScriptException {
			Context cx = Context.enter(m_jsContext);
			Object objResult = cx.evaluateString(m_scope1, str, "scope1EvalString", 1, null);
			cx.exit();
			return objResult;
	}

	public Object scope2Eval(String str) throws JavaScriptException {
			Context cx = Context.enter(m_jsContext);
			Object objResult = cx.evaluateString(m_scope2, str, "scope2EvalString", 1, null);
			cx.exit();
			return objResult;
	}
}


// Scope1

importPackage(java.lang);

System.out.println("Outside of JavaAdapter");

try {
	var pm = Scope.scope2Eval("printMessage");
	pm("works before exception");
	System.arraycopy(null, 5, null, 5, 100);
} catch (e) {
	var pma = Scope.scope2Eval("printMessage");
	pma("works after exception");
}

var obj = new Runnable() {
	run: function() {
		System.out.println("Inside of JavaAdapter");
		try {
			var pm = Scope.scope2Eval("printMessage");
			pm("works before exception");
			System.arraycopy(null, 5, null, 5, 100);
		} catch (e) {
			System.out.println("Caught exception");
			var pma = Scope.scope2Eval("printMessage");
			System.out.println("pma=" + pma);
			pma("works after exception");
		}
	}
};

obj.run();



// Scope2

function printMessage(msg) {
	java.lang.System.out.println(msg);
}


git-svn-id: svn://10.0.0.236/trunk@49726 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 18:27:30 +00:00
endico%mozilla.org
36e083362c make file searches case insentive
git-svn-id: svn://10.0.0.236/trunk@49725 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 18:11:27 +00:00
tao%netscape.com
d2b440e23a First checkin of da-DK files (from Henrik) into l10n/lang.
git-svn-id: svn://10.0.0.236/trunk@49724 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 18:01:19 +00:00
valeski%netscape.com
1c2b2f6390 adding keyword protocol handler to tree. this code is NOT in the build yet.
git-svn-id: svn://10.0.0.236/trunk@49722 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 16:34:45 +00:00
kipp%netscape.com
86725c9808 Added -R flag and logic for managing refcnt dumping better
git-svn-id: svn://10.0.0.236/trunk@49721 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 16:32:03 +00:00
neeti%netscape.com
0cb4e10e77 cookie module conversion done
git-svn-id: svn://10.0.0.236/trunk@49720 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 14:34:54 +00:00
neeti%netscape.com
1c9d47ade0 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@49719 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 14:08:52 +00:00
rods%netscape.com
ff1ff17b9d fixes bug #15265, changes reviewed by kmcclusk. Changes in the way it used the computed values
git-svn-id: svn://10.0.0.236/trunk@49718 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 13:49:00 +00:00
colin%theblakes.com
2eb916adb2 Don't link against xptinfo - its not needed. r=ramiro
git-svn-id: svn://10.0.0.236/trunk@49717 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 10:44:49 +00:00
colin%theblakes.com
41dd85d37f Make mkdepend lines shorter (OpenVMS only). r=ramiro
git-svn-id: svn://10.0.0.236/trunk@49716 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 10:43:28 +00:00
duncan%be.com
d0d0e41c47 Hack into compileable shape.
git-svn-id: svn://10.0.0.236/trunk@49715 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 08:52:17 +00:00
karnaze%netscape.com
c3e71c904f column allocation does fixed and adjusted fixed (colspans) in separate steps. Simplified AllocateConstrained. Fixed bug 14332.
git-svn-id: svn://10.0.0.236/trunk@49714 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 05:19:32 +00:00
ramiro%netscape.com
b6cc6b0ab0 Fix for xlib build bustage.
git-svn-id: svn://10.0.0.236/trunk@49713 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 04:49:45 +00:00
karnaze%netscape.com
399a1319c0 regression test changes
git-svn-id: svn://10.0.0.236/trunk@49712 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 04:48:13 +00:00
dp%netscape.com
77b37126c4 bug# 15433 Fixed call to NS_ADDREF() that would cause double
evaluation when MOZ_REFCNT is defined. Fixed checking for
OUT_OF_MEMORY condition. r=hyatt


git-svn-id: svn://10.0.0.236/trunk@49711 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 02:27:09 +00:00
leaf%mozilla.org
240237eba0 adding mozilla/gc/boehm to SeaMonkeyCore as per patrick beard's request
git-svn-id: svn://10.0.0.236/trunk@49710 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 01:17:58 +00:00
mscott%netscape.com
2e4127024c Bug #14680...migrating this bug from the M10 branch. make input and output stream for the converter pipe non-blocking.
r=ducarroz


git-svn-id: svn://10.0.0.236/trunk@49709 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 01:01:48 +00:00
mscott%netscape.com
322798e844 Bug #11837 --> rewrite the imap factory to use nsIModule. This meant adding appropriate factory methods to the components.
r=bienvenu


git-svn-id: svn://10.0.0.236/trunk@49708 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 00:29:18 +00:00
mscott%netscape.com
94f2a23952 Bug #11837 --> rewrite the imap factory to use nsIModule.
r=bienvenu


git-svn-id: svn://10.0.0.236/trunk@49707 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 00:27:42 +00:00
mscott%netscape.com
18a7fb8d42 Bug #15192 --> build the pab before the history ab for name completion.
r=bienvenu.


git-svn-id: svn://10.0.0.236/trunk@49706 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 00:26:10 +00:00
mscott%netscape.com
b36e29928a Bug #000...trivial fix so no bug # filed. Fix a leak of nsIURI by using nsCOMPtr.
r=bienvenu.


git-svn-id: svn://10.0.0.236/trunk@49705 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-04 00:25:12 +00:00
beard%netscape.com
9a1b140b6b First Checked In.
git-svn-id: svn://10.0.0.236/trunk@49702 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 23:28:33 +00:00
beard%netscape.com
90cd1e6284 File Removed.
git-svn-id: svn://10.0.0.236/trunk@49701 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 23:26:57 +00:00
beard%netscape.com
9f5a8b5090 breakage fixing, gc_stdout -> GC_stdout
git-svn-id: svn://10.0.0.236/trunk@49700 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 22:30:35 +00:00
sdagley%netscape.com
6c3f751156 changed from directly using "MSL ShLibRuntime.Lib" to using "NSLibraryStartup.o" to enable GC leak detector. r=beard
git-svn-id: svn://10.0.0.236/trunk@49699 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 22:04:08 +00:00
sdagley%netscape.com
e9dac37427 using __NSTerminate() rather than __terminate, for GC leak detector. r=beard
git-svn-id: svn://10.0.0.236/trunk@49698 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 22:04:07 +00:00
beard%netscape.com
bc66d4807f removed pulling of mozilla/gc/boehm, no longer building NStdLibGC target. r=smfr
git-svn-id: svn://10.0.0.236/trunk@49697 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 21:51:39 +00:00
beard%netscape.com
508a0c5b7d Added GC exports, so Stubs target will generate them.
git-svn-id: svn://10.0.0.236/trunk@49696 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 21:49:41 +00:00
beard%netscape.com
795fab8784 removed NSStdLibGC target, and .exp file. Moved exports to the one true NSStdLib.exp, so that Stubs target will see them. r=smfr
git-svn-id: svn://10.0.0.236/trunk@49695 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 21:48:57 +00:00
beard%netscape.com
3ecbfc5cdf added more GC stub functions, so that NSStdLib can export them. r=smfr
git-svn-id: svn://10.0.0.236/trunk@49694 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 21:47:11 +00:00
beard%netscape.com
f038869d64 fixed breakage, until mozilla/gc/boehm gets added to the default module.
git-svn-id: svn://10.0.0.236/trunk@49693 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 21:31:43 +00:00
beard%netscape.com
0c2f0d51f9 calling __NSInitialize/__NSTerminate to enable GC leak detector. r=smfr
git-svn-id: svn://10.0.0.236/trunk@49692 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 20:53:11 +00:00
beard%netscape.com
75c8c9cd12 changed from directly using "MSL ShLibRuntime.Lib" to using "NSLibraryStartup.o" to enable GC leak detector. r=smfr
git-svn-id: svn://10.0.0.236/trunk@49691 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 20:47:12 +00:00
beard%netscape.com
da97767078 changed from directly using "MSL DropInRuntime.Lib" to using "NSComponentStartup.o" to enable GC leak detector. r=smfr
git-svn-id: svn://10.0.0.236/trunk@49690 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 20:46:23 +00:00
beard%netscape.com
eaf44edde8 changed from directly using "MSL AppRuntime.Lib" to using "NSAppStartup.o" to enable GC leak detector. r=smfr
git-svn-id: svn://10.0.0.236/trunk@49689 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 20:43:01 +00:00
beard%netscape.com
ed2580f15a changed from directly using "MSL ShLibRuntime.Lib" to using "NSLibraryStartup.o" to enable GC leak detector. r=smfr
git-svn-id: svn://10.0.0.236/trunk@49688 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 20:37:53 +00:00
beard%netscape.com
cd941313ec changed from directly using "MSL ShLibRuntime.Lib" to using "NSLibraryStartup.o" to enable GC leak detector. r=smfr
git-svn-id: svn://10.0.0.236/trunk@49686 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 20:23:01 +00:00
beard%netscape.com
f25b9d367d changed from directly using "MSL DropInRuntime.Lib" to using "NSLibraryStartup.o" to enable GC leak detector. r=smfr
git-svn-id: svn://10.0.0.236/trunk@49685 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 20:13:50 +00:00
beard%netscape.com
da4024048d changed from directly using "MSL AppRuntime.Lib" to using "NSAppStartup.o" to enable GC leak detector. r=smfr
git-svn-id: svn://10.0.0.236/trunk@49684 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 20:11:44 +00:00
beard%netscape.com
a50c5f3df5 changed from directly using "MSL ShLibRuntime.Lib" to using "NSLibraryStartup.o" to enable GC leak detector. r=smfr
git-svn-id: svn://10.0.0.236/trunk@49683 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 20:08:40 +00:00
beard%netscape.com
4133a2fff5 added pulling of mozilla/gc/boehm, conditionally building gc.mcp if $GC_LEAK_DETECTOR is true, and building MemAllocator.mcp[MemAllocatorGC.o], NSStdLib.mcp[NSStdLibGC.shlb] if $GC_LEAK_DETECTOR is true. r=smfr
git-svn-id: svn://10.0.0.236/trunk@49682 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 20:06:10 +00:00
beard%netscape.com
50068fd6e0 Added $GC_LEAK_DETECTOR. r=smfr
git-svn-id: svn://10.0.0.236/trunk@49681 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 20:03:39 +00:00
beard%netscape.com
7835dfb07e added GC_LEAK_DETECTOR variable. r=smfr
git-svn-id: svn://10.0.0.236/trunk@49680 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 20:01:48 +00:00
tonyr%fbdesigns.com
86f12df7f4 Update progID's from component://netscape/* to component://mozilla/*
git-svn-id: svn://10.0.0.236/trunk@49679 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 18:02:22 +00:00
tonyr%fbdesigns.com
9895a33add Fix bustage caused by new account manager API's
git-svn-id: svn://10.0.0.236/trunk@49678 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 18:00:23 +00:00
tonyr%fbdesigns.com
90b1f42534 Update to use nsIModule
git-svn-id: svn://10.0.0.236/trunk@49677 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 17:59:09 +00:00
tonyr%fbdesigns.com
0534ba836d Updated to use nsIModule
git-svn-id: svn://10.0.0.236/trunk@49676 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 17:55:56 +00:00
mcafee%netscape.com
1193314ab4 Better variable names for readability.
git-svn-id: svn://10.0.0.236/trunk@49675 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 08:13:41 +00:00
mcafee%netscape.com
3c1923f753 Adding text to debug pref UI documenting how the debugPaintFlashing pref works with the caps-lock key. r=braddr@portland.puremagic.com
git-svn-id: svn://10.0.0.236/trunk@49674 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 06:56:43 +00:00
beard%netscape.com
e5cdcb3d9a Modernized to use NSComponentStartup.o. Not part of build.
git-svn-id: svn://10.0.0.236/trunk@49673 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 02:58:48 +00:00
beard%netscape.com
1917b8abfe added access path to find Sample.idl. Not part of build.
git-svn-id: svn://10.0.0.236/trunk@49672 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 02:58:20 +00:00
hyatt%netscape.com
9060bb7e6c Fixing apprunner startup bustage on mac. r=beard
git-svn-id: svn://10.0.0.236/trunk@49671 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 01:41:06 +00:00
beard%netscape.com
ac349d4f71 Now that mozilla/lib/mac/NSStartup has been added to the modules file, SeaMonkeyEditor, reenabled building NSStartup.mcp. Converted building JSLoader.mcp into Components, per shaver's permission. r=smfr
git-svn-id: svn://10.0.0.236/trunk@49670 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 00:37:19 +00:00
leaf%mozilla.org
ef523b7bc1 adding mozilla/lib/mac/NSStartup
git-svn-id: svn://10.0.0.236/trunk@49669 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-03 00:12:49 +00:00
rjc%netscape.com
b928008ea2 Fix problem with nsSecurityManagerFactory conversion to be a nsIModule. Patch from peterl@netscape.com. Review: me.
git-svn-id: svn://10.0.0.236/trunk@49668 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 20:19:23 +00:00
peterl%netscape.com
8d9a25274c Don't access undisplayed content map if it isn't there...
git-svn-id: svn://10.0.0.236/trunk@49667 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 19:45:18 +00:00
rjc%netscape.com
dc26a2c638 Temporarily turning off the changes to nsSecurityManagerFactory to make it a nsIModule due to problem at startup.
git-svn-id: svn://10.0.0.236/trunk@49666 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 19:24:05 +00:00
morse%netscape.com
7eed8aaa95 add some new concatenation rules
git-svn-id: svn://10.0.0.236/trunk@49665 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 16:36:53 +00:00
rbs%maths.uq.edu.au
7f3f2e7069 Adding remaining MathML hooks. r:peterl.
git-svn-id: svn://10.0.0.236/trunk@49664 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 11:05:49 +00:00
rbs%maths.uq.edu.au
5022c51b04 Adding remaining MathML hooks
git-svn-id: svn://10.0.0.236/trunk@49663 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 11:01:41 +00:00
rbs%maths.uq.edu.au
1b6a18b9e4 Adding remaining MathML hooks and changing ifdef INCLUDE_MATHML to ifdef MOZ_MATHML to avoid thinking autoconf-related. r:peterl
git-svn-id: svn://10.0.0.236/trunk@49662 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 10:41:40 +00:00
rbs%maths.uq.edu.au
d3baf5491f Change of the IID for the nsIMathMLFrame interface. The previous IID was taken while the MathML code was awaiting to land.
git-svn-id: svn://10.0.0.236/trunk@49661 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 09:14:57 +00:00
rbs%maths.uq.edu.au
ef0e29ec51 Taking an interface ID for the nsIMathMLFrame interface
git-svn-id: svn://10.0.0.236/trunk@49660 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 09:00:39 +00:00
rbs%maths.uq.edu.au
142225cef1 Adding relative path to external DTD
git-svn-id: svn://10.0.0.236/trunk@49659 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 06:53:41 +00:00
rbs%maths.uq.edu.au
1a870b97f1 Initializing a variable to zero
git-svn-id: svn://10.0.0.236/trunk@49658 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 06:50:38 +00:00
rbs%maths.uq.edu.au
e1737fe531 Update to match recent changes in the nsIFrame API.
git-svn-id: svn://10.0.0.236/trunk@49657 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 06:20:30 +00:00
briano%netscape.com
712d5c7659 Added some tweaks and support for UnixWare 7.
git-svn-id: svn://10.0.0.236/trunk@49656 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 06:00:33 +00:00
peterl%netscape.com
b72d84c381 added hooks to track content that doesn't get a frame
Fix for bug 9013 (and any dynamic change from display:none) r=troy


git-svn-id: svn://10.0.0.236/trunk@49655 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 04:27:40 +00:00
peterl%netscape.com
5da81c87c7 Added ability to track changes to content without frame
Fix for bug 9013 (and any dynamic change from display:none) r=troy


git-svn-id: svn://10.0.0.236/trunk@49654 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 04:26:53 +00:00
peterl%netscape.com
f47d01c612 added API to track content that didn't get a frame
Fix for bug 9013 (and any dynamic change from display:none) r=troy


git-svn-id: svn://10.0.0.236/trunk@49653 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 04:26:24 +00:00
peterl%netscape.com
86ee025299 added multimap to track content that didn't get a frame
Fix for bug 9013 (and any dynamic change from display:none) r=troy


git-svn-id: svn://10.0.0.236/trunk@49652 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 04:25:29 +00:00
peterl%netscape.com
f6d5221996 removing dead style change code
r=troy


git-svn-id: svn://10.0.0.236/trunk@49651 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 04:24:20 +00:00
peterl%netscape.com
07e158b4cf removing dead style change code and refereneces to dead style change code
r=troy


git-svn-id: svn://10.0.0.236/trunk@49650 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 04:23:48 +00:00
peterl%netscape.com
39323d24e7 fixed fix to bug 15373. Now it won't crash on EOF conditions
git-svn-id: svn://10.0.0.236/trunk@49649 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 04:23:00 +00:00
scc%netscape.com
16b1141bdf Fixing Mac build bustage by backing out (actually commenting out) beards previous change. The project he cites isn't in the module (or something) and isn't getting checked out. Ergo, errors when you try to find it to build. Couldn't find anyone to review or approve and there is no bug number ... but it has to be done. I guess I'm going to hell.
git-svn-id: svn://10.0.0.236/trunk@49648 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 03:41:52 +00:00
norris%netscape.com
c3494a9ffb Fix the following bugs:
14443 "Same origin" security policy may be circumvented using docu
14820 Fixing up the relationship between nsCodeBasePrincipal and n
14919 Crash in JS MM code
Reviewed by mstoltz, approved by scc.


git-svn-id: svn://10.0.0.236/trunk@49647 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 03:41:37 +00:00
troy%netscape.com
bd5ca95ced Added SizeOf() handler for floater information maintained by the
line box


git-svn-id: svn://10.0.0.236/trunk@49644 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 02:51:03 +00:00
briano%netscape.com
612bb1db4c Added support for SCO UnixWare 7.
git-svn-id: svn://10.0.0.236/trunk@49643 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 02:49:32 +00:00
beard%netscape.com
e912c2233e added mozilla/lib/mac/NSStartup/NSStartup.mcp to the build. This will create NSAppStartup.o, NSComponentStartup.o, and NSLibraryStartup.o, and will permit conditional use of the GC leak detector. r=sdagley
git-svn-id: svn://10.0.0.236/trunk@49642 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 02:21:17 +00:00
beard%netscape.com
200e34d9af First Checked In.
git-svn-id: svn://10.0.0.236/trunk@49640 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 01:52:41 +00:00
hyatt%netscape.com
ca4aac906f Resolving apprunner bustage in an unfortunate way. r=danm
git-svn-id: svn://10.0.0.236/trunk@49639 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 01:48:59 +00:00
peterl%netscape.com
3dfcb47c99 removed leak of atom
git-svn-id: svn://10.0.0.236/trunk@49638 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 01:32:38 +00:00
selmer%netscape.com
c571661492 Major rework on interpreting commands
git-svn-id: svn://10.0.0.236/trunk@49637 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 01:28:27 +00:00
hyatt%netscape.com
4efb5b42d5 Fixing the problem with chrome skin initialization in viewer and apprunner.
git-svn-id: svn://10.0.0.236/trunk@49634 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 00:55:57 +00:00
rjc%netscape.com
e2b731d7df Update leak docs. (Not part of build.)
git-svn-id: svn://10.0.0.236/trunk@49633 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 00:52:49 +00:00
troy%netscape.com
67890faf02 Added SizeOf() handler for space manager
git-svn-id: svn://10.0.0.236/trunk@49632 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 00:52:01 +00:00
rjc%netscape.com
741f87253e Bug # 14034: Convert to nsIModule to prepare for memory leak fixing. Review: dp@netscape.com
git-svn-id: svn://10.0.0.236/trunk@49631 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 00:48:02 +00:00
gagan%netscape.com
ff2d0533a2 Fix for 14772. r-rjc/a-self. Removed the pragma no-cache header being sent to proxy requests.
git-svn-id: svn://10.0.0.236/trunk@49630 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 00:43:10 +00:00
av%netscape.com
8c170e98ee Fixing #13783 (garbage-pointer dereference)
git-svn-id: svn://10.0.0.236/trunk@49629 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 00:41:03 +00:00
kmcclusk%netscape.com
0a6c37218a r=rods;bug=14867 put in style rule to disable file selector button
bug=15328 put in disable rules for button label
bug=12227 To remove combobox reflows, changed padding settings for select's active
button to match non-active state. Also changed padding+border to match between
button's with focus and active buttons drawn with focus. Added gif for active state
of combo box to indicate that it is depressed.


git-svn-id: svn://10.0.0.236/trunk@49628 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 00:28:37 +00:00
frankm%eng.sun.com
7a48580674 To compile on Linux, renamed 'jarray' to 'theJarray' (jarray is a JNI type), and made sure all paths in xpjd_GetInterfaceInfoNative() return a jboolean (bug 15279).
Updated genproxy usage message, and moved printf within cmdline parsing code (bug 15386).
r=edburns@acm.org,akhil.arora@sun.com perm=scc


git-svn-id: svn://10.0.0.236/trunk@49626 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 00:18:02 +00:00
kmcclusk%netscape.com
e1b393609a r=rods; bug=15312 nsIWidget::GetParent now stops at the top of the widget hierarchy on WIN32
r=rods; bug=13644 Dropdown on WIN32 no longer causes parent window to change z-order or activation


git-svn-id: svn://10.0.0.236/trunk@49625 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 00:13:23 +00:00
tao%netscape.com
61705e7f39 makefile for lang.
git-svn-id: svn://10.0.0.236/trunk@49624 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 00:04:22 +00:00
briano%netscape.com
59b25d549c Automated update
git-svn-id: svn://10.0.0.236/trunk@49623 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 00:03:06 +00:00
troy%netscape.com
4e1923d3ad Hooked up SizeOf() for cell map and table layout strategies. Also added in
some table frame data that was missed


git-svn-id: svn://10.0.0.236/trunk@49622 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 00:02:54 +00:00
briano%netscape.com
42184097f4 Fix for HP-UX 11 problem trying to use libc_r when it shouldn't be.
git-svn-id: svn://10.0.0.236/trunk@49621 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-02 00:02:35 +00:00
valeski%netscape.com
285283e32e 15300 r=warren. Changed NS_NewThread api to default to PR_UNJOINABLE_THREAD, also added new NS_NewThread() function so you don't have to combine the runnable w/ thread creation. added threads to xpcom init so you can create them w/ the com mgr. 15298 r=gagan, FTP threads are now synched w/ ftp handler shutdown, removed extraneous buffer work, added ftp authentication, and ftp channel content length
git-svn-id: svn://10.0.0.236/trunk@49618 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 23:32:12 +00:00
valeski%netscape.com
780e7132fd 15300 r=warren. Changed NS_NewThread api to default to PR_UNJOINABLE_THREAD, also added new NS_NewThread() function so you don't have to combine the runnable w/ thread creation. added threads to xpcom init so you can create them w/ the com mgr.
git-svn-id: svn://10.0.0.236/trunk@49617 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 23:30:06 +00:00
dougt%netscape.com
1f12de6f96 adding hostname to socket provider. (r) warren.
git-svn-id: svn://10.0.0.236/trunk@49616 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 23:23:49 +00:00
briano%netscape.com
64c2d4fe86 Fix for AIX 4.2, specifically, but should help other platforms with shared library difficulties.
git-svn-id: svn://10.0.0.236/trunk@49614 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 23:07:38 +00:00
norris%netscape.com
69ec6c9b26 Contribution from Andrew Wason:
Subject:
        optimizer Makefiles
   Date:
        Fri, 01 Oct 1999 14:50:05 -0400
   From:
        Andrew Wason <aw@softcom.com>
     To:
        norris@netscape.com
    CC:
        Howard Lin <howard@softcom.com>




Norris,

Here are patches to the Rhino Makefiles to build the optimizer package and
the jsc compiler.  They also fix a problem with "gmake clean".

Andrew
--
Andrew Wason
SoftCom, Inc.
aw@softcom.com


git-svn-id: svn://10.0.0.236/trunk@49613 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 22:58:48 +00:00
norris%netscape.com
34f7a63ece \t doesn't work on Windows.
git-svn-id: svn://10.0.0.236/trunk@49612 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 22:56:30 +00:00
dp%netscape.com
aed86d7f55 Eliminating 3 leaks to servicemanager when running for the first time.
bug# 15387 r=law


git-svn-id: svn://10.0.0.236/trunk@49610 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 22:39:20 +00:00
dbragg%netscape.com
e42eb9313a Initial checkin of mac xpi build files. Approval=trudelle, Reviewer=ssu
git-svn-id: svn://10.0.0.236/trunk@49609 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 22:31:46 +00:00
hyatt%netscape.com
ac3d91fcff Restructuring ua.css.
git-svn-id: svn://10.0.0.236/trunk@49608 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 21:57:32 +00:00
hyatt%netscape.com
ade56298bb Restructuring ua.css to use html.css
git-svn-id: svn://10.0.0.236/trunk@49607 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 21:57:01 +00:00
Jerry.Kirk%Nexwarecorp.com
26bb29ed10 Photon Only...
Added ConsumeEvents parameter to CaptureRollupEvents
r=Michael.Kedl@Nexwarecorp.com


git-svn-id: svn://10.0.0.236/trunk@49606 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 21:54:47 +00:00
tao%netscape.com
a981cb2868 Add new makefile to hook up lang/ directory.
git-svn-id: svn://10.0.0.236/trunk@49605 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 21:54:30 +00:00
hyatt%netscape.com
2c843652fd Fixing bustage.
git-svn-id: svn://10.0.0.236/trunk@49604 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 21:47:17 +00:00
pierre%netscape.com
bf6316462c Fixed #14416 "GFX combo boxes cause zombie windows": there was a memory leak in WidgetToScreen and ScreenToWidget. r=dcone/sfraser
Fixed #14775 "Crash removing delete observer when closing windows": reshuffled nsToolkit and added nsMacFocusHandler to nsMacEventHandler. r=dcone/sfraser


git-svn-id: svn://10.0.0.236/trunk@49603 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 21:40:22 +00:00
pierre%netscape.com
a8c2a315be Fixed #14775 "Crash removing delete observer when closing windows": reshuffled nsToolkit and added nsMacFocusHandler to nsMacEventHandler. r=dcone/sfraser
git-svn-id: svn://10.0.0.236/trunk@49602 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 21:40:04 +00:00
fur%netscape.com
da2095c0dc Updated API
git-svn-id: svn://10.0.0.236/trunk@49601 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 21:30:53 +00:00
briano%netscape.com
2f25a96f14 Fixed the typo that broke the Unix builds.
git-svn-id: svn://10.0.0.236/trunk@49600 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 21:19:14 +00:00
Jerry.Kirk%Nexwarecorp.com
24cefa52e6 Photon Only changes...
remove bogus call to nsIAppShell->GetNativeData since it isn't used
Added code for menu RollUp
Change Invalidate Code  not to when widget is not Realized
Changed mUpdateArea from nsRect to nsIRegion
Moved the HandleEvent code from nsWindow to nsWidget
r=Michael.Kedl@Nexwarecorp.com


git-svn-id: svn://10.0.0.236/trunk@49599 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 21:06:43 +00:00
hyatt%netscape.com
deebca4e10 Adding skin.css
git-svn-id: svn://10.0.0.236/trunk@49598 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 21:01:24 +00:00
akkana%netscape.com
163649cbd0 Automated tests of output. Not part of apprunner, not built by default.
Fix Compare() function;
add lots of before and after files for testing various regressions;
add a TestOutSinks script which tests the known cases.


git-svn-id: svn://10.0.0.236/trunk@49596 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 20:55:01 +00:00
hyatt%netscape.com
04637210d9 Splitting xul.css into two files and making them load automatically at startup. R=danm@netscape.com
git-svn-id: svn://10.0.0.236/trunk@49595 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 20:49:07 +00:00
danm%netscape.com
2e268f54e5 making copacetic for AIX
git-svn-id: svn://10.0.0.236/trunk@49593 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 20:27:45 +00:00
valeski%netscape.com
7c54ad976a 15296 r=gagan. Added .txt extension to the MIME type extension resolver.
git-svn-id: svn://10.0.0.236/trunk@49592 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 20:25:38 +00:00
pavlov%netscape.com
4d36473556 remove files since we have idl files for both of these r=pinkerton
git-svn-id: svn://10.0.0.236/trunk@49591 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 20:16:36 +00:00
dp%netscape.com
bb72e03927 Using NS_ENSURE and NS_GET_IID()
git-svn-id: svn://10.0.0.236/trunk@49590 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 20:13:55 +00:00
kipp%netscape.com
90f49df885 r=peterl; bug=15373; Fixed atom memory leaky
git-svn-id: svn://10.0.0.236/trunk@49589 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 20:13:39 +00:00
av%netscape.com
f6b2303084 Fixing dereferencing null-pointer. Caused crash, #14496
git-svn-id: svn://10.0.0.236/trunk@49588 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 20:10:39 +00:00
dp%netscape.com
055feb1f4f Converter to nsIModule to prepare for memory leaks fixing.
Bug# 14034 r=waterson


git-svn-id: svn://10.0.0.236/trunk@49587 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 20:04:34 +00:00
kin%netscape.com
2471a39269 Fix VC5 build bustage with (T*) cast.
git-svn-id: svn://10.0.0.236/trunk@49583 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 16:23:17 +00:00
danm%netscape.com
f8f515a025 event handler holds weak reference to frame. fixes bug 14885. r:buster
git-svn-id: svn://10.0.0.236/trunk@49582 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 15:04:15 +00:00
dcone%netscape.com
1cfea69ffd added background fix.. commented out for now until other platforms are tested
git-svn-id: svn://10.0.0.236/trunk@49581 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 14:35:20 +00:00
rods%netscape.com
8da5559e0f Added new method to tell the listcontrolframe it is about to be rolled up by the combobox
this enables it to unset any temporary selections and restore the actual selection


git-svn-id: svn://10.0.0.236/trunk@49580 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 14:30:33 +00:00
rods%netscape.com
f6ec8c8015 ifdef'd out the new code that handles the computed size and ifdef'ed in the old code for Linux
git-svn-id: svn://10.0.0.236/trunk@49579 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 14:28:25 +00:00
rods%netscape.com
f896ef768d ifdef out a debug statement
git-svn-id: svn://10.0.0.236/trunk@49578 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 14:26:40 +00:00
rods%netscape.com
457fc28670 removed noisy printf
git-svn-id: svn://10.0.0.236/trunk@49577 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 14:20:45 +00:00
troy%netscape.com
3dc6e05d82 Optimized rendering context setup and solid brush handling
git-svn-id: svn://10.0.0.236/trunk@49576 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 14:19:36 +00:00
valeski%netscape.com
830f8c1257 15352 r=jevering. regular pointers to com ptrs changeover, as well as more initialization of a PRExplodedTime struct.
git-svn-id: svn://10.0.0.236/trunk@49575 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 14:10:02 +00:00
valeski%netscape.com
31bda0647d 12748 r=Andreas. Completely removed the GetHostByAddr() call so we no longer do any reverse lookups
git-svn-id: svn://10.0.0.236/trunk@49574 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 13:38:46 +00:00
valeski%netscape.com
7c49c9f9ea 15297 r=gagan. Condensed Enumerate() Reset() call combinations to overloaded Reset()
git-svn-id: svn://10.0.0.236/trunk@49573 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 13:37:11 +00:00
kin%netscape.com
698d1ed095 Fix for bug #12195: [DOGFOOD] caret cruft left after a backspace at end of line
Added code to DrawCaretWithContext() that makes sure that the caret
doesn't hang outiside the left edge of a frame.
r=sfraser@netscape.com


git-svn-id: svn://10.0.0.236/trunk@49572 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 13:16:30 +00:00
ramiro%netscape.com
6ee88bb33f fix build bustage.
git-svn-id: svn://10.0.0.236/trunk@49567 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-01 12:21:33 +00:00
996 changed files with 31493 additions and 141569 deletions

View File

@@ -22,9 +22,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
ifdef ENABLE_TESTS
DIRS = widget scribble
endif
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

@@ -1,4 +1,4 @@
#!nmake
#!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
@@ -16,40 +16,34 @@
# Reserved.
DEPTH=..\..\..
MODULE=addrbook
################################################################################
## exports
EXPORTS= \
nsAbBaseCID.h \
$(NULL)
MAKE_OBJ_TYPE = EXE
PROGRAM = .\$(OBJDIR)\scribble.exe
#RESFILE = scribble.res
################################################################################
## library
OBJS = \
.\$(OBJDIR)\main.obj \
.\$(OBJDIR)\Scribble.obj \
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)
LINCS=-I$(PUBLIC)\raptor -I$(PUBLIC)\xpcom
LLIBS= \
$(DIST)\lib\xpcom.lib \
$(LIBNSPR) \
$(DIST)\lib\raptorgfxwin.lib \
$(DIST)\lib\widgetsupport_s.lib \
$(DIST)\lib\raptorwidget.lib \
!ifdef NECKO
!else
$(DIST)\lib\netlib.lib\
!endif
$(NULL)
LLFLAGS=-SUBSYSTEM:CONSOLE
include <$(DEPTH)\config\rules.mak>
install:: $(PROGRAM)
$(MAKE_INSTALL) $(PROGRAM) $(DIST)\bin
clobber::
rm -f $(DIST)\bin\scribble.exe
$(PROGRAM):: $(OBJS) $(MYLIBS)
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.

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* -*- 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
@@ -16,6 +16,6 @@
* Reserved.
*/
#define MAC_STATIC 1
#include "Widget.prefix"
#include "MacPrefix.h"

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* -*- 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
@@ -16,6 +16,6 @@
* Reserved.
*/
#define MAC_STATIC 1
#include "WidgetDebug.prefix"
#include "MacPrefix_debug.h"

View File

@@ -14,8 +14,9 @@
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..
DIRS=xpwidgets windows support build
DIRS=public src prefs build resources
include <$(DEPTH)\config\rules.mak>

View File

@@ -22,7 +22,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = toolkit_service
DIRS = resources
include $(topsrcdir)/config/rules.mk

View File

@@ -17,7 +17,6 @@
DEPTH=..\..\..
DIRS = windows
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

@@ -15,31 +15,23 @@
# Reserved.
#
DEPTH = ../../..
DEPTH = ../../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
PROGRAM = widget
SAMPLES_DIR = $(DIST)/bin/chrome/addressbook/content/default
CPPSRCS = \
main.cpp \
nsWidgetTest.cpp \
$(NULL)
LIBS = \
$(MOZ_TIMER_LIBS) \
$(MOZ_WIDGET_SUPPORT_LIBS) \
-lxpcom \
-lmozjs \
-lraptorgfx \
$(NSPR_LIBS) \
$(TK_LIBS) \
EXPORT_RESOURCE_SAMPLES = \
pref-addressing.xul \
$(NULL)
include $(topsrcdir)/config/rules.mk
CXXFLAGS += $(MOZ_TOOLKIT_REGISTRY_CFLAGS)
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

@@ -15,14 +15,14 @@
# Reserved.
#
DEPTH = ../..
DEPTH = ../../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public src
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

@@ -15,9 +15,8 @@
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..
DEPTH=..\..\..\..\..
DIRS=public timer src
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

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

View File

@@ -22,17 +22,22 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
LIBRARY_NAME = widgetsupport_s
MODULE = addrbook
CPPSRCS = nsWidgetSupport.cpp
EXPORTS = nsWidgetSupport.h
# 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=
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
CXXFLAGS += $(TK_CFLAGS)

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

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* -*- 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
@@ -12,18 +12,17 @@
*
* 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
* Copyright (C) 1999 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef viewerMenu_h_
#define viewerMenu_h_
typedef void (*MenuCallbackProc)(
int
);
void CreateViewerMenus(Widget aParent, MenuCallbackProc aCallback);
#include "nsISupports.idl"
#endif // viewerMenu_h_
[scriptable, uuid(fe04c8e6-501e-11d3-a527-0060b0fc04b7)]
interface nsIAbAddressCollecter : nsISupports {
void CollectAddress(in string address);
};

View File

@@ -15,31 +15,21 @@
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef nsObject_h__
#define nsObject_h__
#include "nsISupports.h"
/**
* nsObject is the base class for all native widgets
*/
class nsObject : public nsISupports
{
public:
nsObject();
virtual ~nsObject();
NS_DECL_ISUPPORTS
protected:
public:
#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);
};
#endif // nsObject_h__

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

@@ -16,24 +16,14 @@
* Reserved.
*/
#ifndef __nsSound_h__
#define __nsSound_h__
#include "nsISupports.idl"
#include "nsIEnumerator.idl"
#include "nsISound.h"
[scriptable, uuid(1920E484-0709-11d3-A2EC-001083003D0C)]
interface nsIAbListener : nsISupports {
class BSimpleGameSound;
class nsSound : public nsISound {
public:
nsSound();
virtual ~nsSound();
NS_DECL_ISUPPORTS
NS_DECL_NSISOUND
BSimpleGameSound *mSound;
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);
};
#endif /* __nsSound_h__ */

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

@@ -16,30 +16,22 @@
* Reserved.
*/
#ifndef nsTextAreaWidget_h__
#define nsTextAreaWidget_h__
#include "nsISupports.idl"
#include "nsIAbCard.idl"
#include "nsTextHelper.h"
#include "nsITextAreaWidget.h"
interface nsIAddrDBListener;
/**
* Native GTK+ multi-line edit control wrapper.
*/
[scriptable, uuid(A4186D8A-1DD0-11d3-A303-001083003D0C)]
interface nsIAddrDBAnnouncer : nsISupports {
class nsTextAreaWidget : public nsTextHelper
{
void AddListener(in nsIAddrDBListener listener);
void RemoveListener(in nsIAddrDBListener listener);
public:
nsTextAreaWidget();
virtual ~nsTextAreaWidget();
void NotifyCardAttribChange(in unsigned long abCode,
in nsIAddrDBListener instigator);
void NotifyCardEntryChange (in unsigned long abCode,
in nsIAbCard card,
in nsIAddrDBListener instigator);
NS_DECL_ISUPPORTS_INHERITED
virtual void SetFontNative(GdkFont *aFont);
protected:
NS_METHOD CreateNative(GtkWidget *parentWindow);
void NotifyAnnouncerGoingAway();
};
#endif // nsTextAreaWidget_h__

View File

@@ -15,32 +15,18 @@
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsISupports.idl"
#include "nsIAbCard.idl"
#ifndef nsTextWidget_h__
#define nsTextWidget_h__
interface nsIAddrDBAnnouncer;
#include "nsTextHelper.h"
[scriptable, uuid(A4186D89-1DD0-11d3-A303-001083003D0C)]
interface nsIAddrDBListener : nsISupports {
#include "nsITextWidget.h"
/**
* Native GTK+ single line edit control wrapper.
*/
class nsTextWidget : public nsTextHelper
{
public:
nsTextWidget();
virtual ~nsTextWidget();
NS_DECL_ISUPPORTS_INHERITED
#ifdef USE_XIM
PRBool OnKey(nsKeyEvent &aEvent);
#endif
protected:
NS_IMETHOD CreateNative(GtkWidget *parentWindow);
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);
};
#endif // nsTextWidget_h__

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

@@ -12,15 +12,15 @@
*
* 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
* Copyright (C) 1999 Netscape Communications Corporation. All Rights
* Reserved.
*/
/*
* Used for Logging in the widget/src/photon directory.
*/
#include <prlog.h>
#include <signal.h>
#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);
};
extern PRLogModuleInfo *PhWidLog;

View File

@@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* -*- 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
@@ -12,26 +12,17 @@
*
* 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
* Copyright (C) 1999 Netscape Communications Corporation. All Rights
* Reserved.
*/
#ifndef __nsSound_h__
#define __nsSound_h__
#include "nsISupports.idl"
#include "nsrootidl.idl"
#include "nsISound.h"
#include <gtk/gtk.h>
class nsSound : public nsISound {
public:
nsSound();
virtual ~nsSound();
NS_DECL_ISUPPORTS
NS_DECL_NSISOUND
interface nsIAutoCompleteListener;
[scriptable, uuid(CA2A6B07-3625-11d3-988E-001083010E9B)]
interface nsIAutoCompleteSession : nsISupports {
void AutoComplete(in nsISupports aParam, in wstring aSearchString, in nsIAutoCompleteListener aResultListener);
};
#endif /* __nsSound_h__ */

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,257 @@
// functions needed from abMainWindow and abSelectAddresses
// Controller object for Results Pane
var ResultsPaneController =
{
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 =
{
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 )
widget.controller = DirPaneController;
// results pane
widget = document.getElementById('resultsTree');
if ( widget )
widget.controller = ResultsPaneController;
}
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

@@ -15,14 +15,14 @@
# Reserved.
#
DEPTH = ..
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public src
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

@@ -15,30 +15,26 @@
# Reserved.
#
DEPTH = ../../../..
DEPTH = ../../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
LIBRARY_NAME = xlib_window_service
IS_COMPONENT = 1
REQUIRES = xpcom
CPPSRCS = \
nsXlibWindowService.cpp \
nsXlibWindowServiceFactory.cpp \
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)
EXPORTS = nsIXlibWindowService.h
EXTRA_DSO_LDOPTS = $(TOOLKIT_TK_LIBS)
include $(topsrcdir)/config/rules.mk
DEFINES += -D_IMPL_NS_TIMER
CXXFLAGS += $(TK_CFLAGS)
INCLUDES += $(TK_CFLAGS) -I$(srcdir)/.. -I$(srcdir)/../../xpwidgets
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 "resource:/res/toolbar/TB_Stop.gif">
<!ENTITY stopButton.label ".Stop">
<!ENTITY searchButton.img "resource:/res/toolbar/TB_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

@@ -15,8 +15,8 @@
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH=..\..
DEPTH=..\..\..\..
DIRS= public src
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

@@ -22,23 +22,23 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
LIBRARY_NAME = toolkit_service
IS_COMPONENT = 1
SAMPLES_DIR = $(DIST)/bin/chrome/addressbook/skin/default
REQUIRES = xpcom
CPPSRCS = \
nsUnixToolkitService.cpp \
nsUnixToolkitServiceFactory.cpp \
EXPORT_RESOURCE_SAMPLES = \
addressbook.css \
newcard.gif \
newlist.gif \
property.gif \
abnewmsg.gif \
person.gif \
list.gif \
myaddrbk.gif \
$(NULL)
EXPORTS = nsIUnixToolkitService.h
EXTRA_DSO_LDOPTS = $(TOOLKIT_TK_LIBS)
include $(topsrcdir)/config/rules.mk
DEFINES += -D_IMPL_NS_TIMER
CXXFLAGS += $(TK_CFLAGS)
INCLUDES += $(TK_CFLAGS) -I$(srcdir)/.. -I$(srcdir)/../../xpwidgets
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

@@ -15,40 +15,53 @@
# Reserved.
#
DEPTH = ../../../../..
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
LIBRARY_NAME = timer_$(TIMER_SUFFIX)
REQUIRES = xpcom
MODULE = addrbook
LIBRARY_NAME = addrbook_s
CPPSRCS = \
moc_nsTimerEventHandler.cpp \
nsTimerEventHandler.cpp \
nsTimerQt.cpp \
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)
ifndef MOZ_MONOLITHIC_TOOLKIT
TIMER_SUFFIX = qt
IS_COMPONENT = 1
CPPSRCS += nsTimerQtFactory.cpp
EXTRA_DSO_LDOPTS = $(MOZ_QT_LDFLAGS)
else
TIMER_SUFFIX = s
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=
endif
include $(topsrcdir)/config/rules.mk
ifndef MOZ_MONOLITHIC_TOOLKIT
INCLUDES += $(MOZ_QT_CFLAGS) -I$(srcdir)/..
else
CXXFLAGS += $(TK_CFLAGS)
INCLUDES += $(TK_CFLAGS) -I$(srcdir)/..
endif

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,289 @@
/* -*- 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);
}
}
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,148 @@
/* -*- 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->Close(PR_TRUE);
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

@@ -16,57 +16,41 @@
* Reserved.
*/
/********************************************************************************************************
Interface for representing Address Book Directory
*********************************************************************************************************/
#include "nscore.h"
#include "nsIAllocator.h"
#include "plstr.h"
#include "stdio.h"
#ifndef nsAbDirProperty_h__
#define nsAbDirProperty_h__
#include "nsSound.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
*/
NS_IMPL_ISUPPORTS(nsSound, nsCOMTypeInfo<nsISound>::GetIID());
////////////////////////////////////////////////////////////////////////
nsSound::nsSound()
class nsAbDirProperty: public nsIAbDirectory
{
NS_INIT_REFCNT();
}
public:
nsAbDirProperty(void);
virtual ~nsAbDirProperty(void);
nsSound::~nsSound()
{
NS_DECL_ISUPPORTS
NS_DECL_NSIABDIRECTORY
}
protected:
nsresult NS_NewSound(nsISound** aSound)
{
NS_PRECONDITION(aSound != nsnull, "null ptr");
if (! aSound)
return NS_ERROR_NULL_POINTER;
*aSound = new nsSound();
if (! *aSound)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*aSound);
return NS_OK;
}
nsString m_DirName;
PRUint32 m_LastModifiedDate;
nsFileSpec* m_DbPath;
DIR_Server* m_Server;
};
// not currently used.. may go away
NS_METHOD nsSound::Init(void)
{
return NS_OK;
}
NS_METHOD nsSound::Beep()
{
::SysBeep(1);
return NS_OK;
}
NS_METHOD nsSound::Play(nsIFileSpec *filespec)
{
NS_NOTYETIMPLEMENTED("nsSound::Play");
return NS_OK;
}
#endif

View File

@@ -0,0 +1,494 @@
/* -*- 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 "nsAbDirectory.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 "nsIFileSpec.h"
#include "nsIFileLocator.h"
#include "nsFileLocations.h"
#include "mdb.h"
#include "prlog.h"
#include "prprf.h"
#include "prmem.h"
/* The definition is nsAddressBook.cpp */
extern const char *kDirectoryDataSourceRoot;
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(kFileLocatorCID, NS_FILELOCATOR_CID);
static NS_DEFINE_CID(kAddrBookSessionCID, NS_ADDRBOOKSESSION_CID);
nsAbDirectory::nsAbDirectory(void)
: nsAbRDFResource(),
mInitialized(PR_FALSE)
{
NS_NewISupportsArray(getter_AddRefs(mSubDirectories));
}
nsAbDirectory::~nsAbDirectory(void)
{
if (mSubDirectories)
{
PRUint32 count;
nsresult rv = mSubDirectories->Count(&count);
NS_ASSERTION(NS_SUCCEEDED(rv), "Count failed");
PRInt32 i;
for (i = count - 1; i >= 0; i--)
mSubDirectories->RemoveElementAt(i);
}
}
NS_IMPL_ISUPPORTS_INHERITED(nsAbDirectory, nsAbRDFResource, nsIAbDirectory)
////////////////////////////////////////////////////////////////////////////////
NS_IMETHODIMP nsAbDirectory::OnCardAttribChange(PRUint32 abCode, nsIAddrDBListener *instigator)
{
return NS_OK;
}
NS_IMETHODIMP nsAbDirectory::OnCardEntryChange
(PRUint32 abCode, nsIAbCard *card, nsIAddrDBListener *instigator)
{
nsresult rv = NS_OK;
if (abCode == AB_NotifyInserted && card)
{
NS_WITH_SERVICE(nsIRDFService, rdf, kRDFServiceCID, &rv);
if(NS_FAILED(rv))
return rv;
char* cardURI = nsnull;
rv = card->GetCardURI(&cardURI);
if (NS_FAILED(rv) || !cardURI)
return NS_ERROR_NULL_POINTER;
nsCOMPtr<nsIRDFResource> res;
rv = rdf->GetResource(cardURI, getter_AddRefs(res));
if(cardURI)
PR_smprintf_free(cardURI);
if (NS_SUCCEEDED(rv))
{
nsCOMPtr<nsIAbCard> personCard = do_QueryInterface(res);
if (personCard)
{
personCard->CopyCard(card);
if (mDatabase)
{
personCard->SetAbDatabase(mDatabase);
nsCOMPtr<nsIAddrDBListener> listener(do_QueryInterface(personCard, &rv));
if (NS_FAILED(rv))
return NS_ERROR_NULL_POINTER;
mDatabase->AddListener(listener);
}
nsCOMPtr<nsISupports> cardSupports(do_QueryInterface(personCard));
if (cardSupports)
NotifyItemAdded(cardSupports);
}
}
}
else if (abCode == AB_NotifyDeleted && card)
{
nsCOMPtr<nsISupports> cardSupports(do_QueryInterface(card, &rv));
if(NS_SUCCEEDED(rv))
NotifyItemDeleted(cardSupports);
}
return NS_OK;
}
NS_IMETHODIMP nsAbDirectory::GetChildNodes(nsIEnumerator* *result)
{
if (!mInitialized)
{
if (!PL_strcmp(mURI, kDirectoryDataSourceRoot) && GetDirList())
{
PRInt32 count = GetDirList()->Count();
/* check: only show personal address book for now */
/* not showing 4.x address book unitl we have the converting done */
PRInt32 i;
for (i = 0; i < count; i++)
{
DIR_Server *server = (DIR_Server *)GetDirList()->ElementAt(i);
if (server->dirType == PABDirectory)
{
nsString name(server->fileName);
PRInt32 pos = name.Find("na2");
if (pos >= 0) /* check: this is a 4.x file, remove when conversion is done */
continue;
char* uriStr = nsnull;
uriStr = PR_smprintf("%s%s", mURI, server->fileName);
if (uriStr == nsnull)
return NS_ERROR_OUT_OF_MEMORY;
nsCOMPtr<nsIAbDirectory> childDir;
AddDirectory(uriStr, getter_AddRefs(childDir));
if (uriStr)
PR_smprintf_free(uriStr);
if (childDir)
{
PRUnichar *unichars = nsnull;
PRInt32 unicharLength = 0;
PRInt32 descLength = PL_strlen(server->description);
INTL_ConvertToUnicode((const char *)server->description,
descLength, (void**)&unichars, &unicharLength);
childDir->SetDirName(unichars);
childDir->SetServer(server);
PR_FREEIF(unichars);
}
}
}
}
mInitialized = PR_TRUE;
}
return mSubDirectories->Enumerate(result);
}
NS_IMETHODIMP nsAbDirectory::AddDirectory(const char *uriName, nsIAbDirectory **childDir)
{
if (!childDir || !uriName)
return NS_ERROR_NULL_POINTER;
nsresult rv = NS_OK;
NS_WITH_SERVICE(nsIRDFService, rdf, kRDFServiceCID, &rv);
if(NS_FAILED(rv))
return rv;
nsCOMPtr<nsIRDFResource> res;
rv = rdf->GetResource(uriName, getter_AddRefs(res));
if (NS_FAILED(rv))
return rv;
nsCOMPtr<nsIAbDirectory> directory(do_QueryInterface(res, &rv));
if (NS_FAILED(rv))
return rv;
mSubDirectories->AppendElement(directory);
*childDir = directory;
NS_IF_ADDREF(*childDir);
return rv;
}
NS_IMETHODIMP nsAbDirectory::GetChildCards(nsIEnumerator* *result)
{
nsresult rv = GetAbDatabase();
if (NS_SUCCEEDED(rv) && mDatabase)
{
rv = mDatabase->EnumerateCards(this, result);
}
return rv;
}
NS_IMETHODIMP nsAbDirectory::GetMailingList(nsIEnumerator **mailingList)
{
nsresult rv = GetAbDatabase();
if (NS_SUCCEEDED(rv) && mDatabase)
{
rv = mDatabase->EnumerateMailingLists(this, mailingList);
}
return rv;
}
NS_IMETHODIMP nsAbDirectory::CreateNewDirectory(const PRUnichar *dirName, const char *fileName)
{
if (!dirName)
return NS_ERROR_NULL_POINTER;
DIR_Server * server = nsnull;
nsresult rv = DIR_AddNewAddressBook(dirName, fileName, &server);
nsCOMPtr<nsIAbDirectory> newDir;
char *uri = PR_smprintf("%s%s", kDirectoryDataSourceRoot, server->fileName);
if (uri)
{
rv = AddDirectory(uri, getter_AddRefs(newDir));
PR_smprintf_free(uri);
if (NS_SUCCEEDED(rv) && newDir)
{
newDir->SetDirName((PRUnichar *)dirName);
newDir->SetServer(server);
// nsCOMPtr<nsISupports> dirSupports(do_QueryInterface(newDir, &rv));
// if (NS_SUCCEEDED(rv))
NotifyItemAdded(newDir);
return rv;
}
else
return NS_ERROR_NULL_POINTER;
}
return NS_ERROR_NULL_POINTER;
}
NS_IMETHODIMP nsAbDirectory::AddChildCards(const char *uriName, 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(uriName);
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))
{
delete[] uriStr;
return rv;
}
nsCOMPtr<nsIAbCard> personCard(do_QueryInterface(res, &rv));
if (NS_FAILED(rv))
{
rv = nsComponentManager::CreateInstance(kAbCardCID, nsnull, nsCOMTypeInfo<nsIAbCard>::GetIID(), getter_AddRefs(personCard));
if (NS_FAILED(rv) || !personCard)
{
delete[] uriStr;
return rv;
}
}
nsAllocator::Free(uriStr);
*childCard = personCard;
NS_ADDREF(*childCard);
return rv;
}
NS_IMETHODIMP nsAbDirectory::DeleteCards(nsISupportsArray *cards)
{
nsresult rv = NS_OK;
if (!mDatabase)
rv = GetAbDatabase();
if (NS_SUCCEEDED(rv) && mDatabase)
{
PRUint32 cardCount;
rv = cards->Count(&cardCount);
if (NS_FAILED(rv)) return rv;
for(PRUint32 i = 0; i < cardCount; i++)
{
nsCOMPtr<nsISupports> cardSupports;
nsCOMPtr<nsIAbCard> card;
cardSupports = getter_AddRefs(cards->ElementAt(i));
card = do_QueryInterface(cardSupports, &rv);
if (card)
{
mDatabase->DeleteCard(card, PR_TRUE);
}
}
mDatabase->Commit(kLargeCommit);
}
return rv;
}
nsresult nsAbDirectory::DeleteDirectoryCards(nsIAbDirectory* directory, DIR_Server *server)
{
nsresult rv = NS_OK;
nsFileSpec* dbPath = nsnull;
nsCOMPtr<nsIAddrDatabase> database;
NS_WITH_SERVICE(nsIAddrBookSession, abSession, kAddrBookSessionCID, &rv);
if(NS_SUCCEEDED(rv))
abSession->GetUserProfileDirectory(&dbPath);
if (dbPath)
{
(*dbPath) += server->fileName;
// close file before delete it
NS_WITH_SERVICE(nsIAddrDatabase, addrDBFactory, kAddressBookDBCID, &rv);
if (NS_SUCCEEDED(rv) && addrDBFactory)
rv = addrDBFactory->Open(dbPath, PR_FALSE, getter_AddRefs(database), PR_TRUE);
}
/* delete cards */
nsCOMPtr<nsISupportsArray> cardArray;
nsCOMPtr<nsIEnumerator> cardChild;
NS_NewISupportsArray(getter_AddRefs(cardArray));
rv = directory->GetChildCards(getter_AddRefs(cardChild));
if (NS_SUCCEEDED(rv) && cardChild)
{
nsCOMPtr<nsISupports> item;
rv = cardChild->First();
if (NS_SUCCEEDED(rv))
{
do
{
cardChild->CurrentItem(getter_AddRefs(item));
if (item)
{
nsCOMPtr<nsIAbCard> card;
card = do_QueryInterface(item, &rv);
if (card)
{
cardArray->AppendElement(card);
}
}
rv = cardChild->Next();
} while (NS_SUCCEEDED(rv));
if (database)
{
PRUint32 cardCount;
rv = cardArray->Count(&cardCount);
if (NS_FAILED(rv)) return rv;
for(PRUint32 i = 0; i < cardCount; i++)
{
nsISupports* cardSupports = cardArray->ElementAt(i);
nsIAbCard* card = (nsIAbCard*)cardSupports;
if (card)
{
database->DeleteCard(card, PR_TRUE);
}
}
}
}
}
return rv;
}
NS_IMETHODIMP nsAbDirectory::DeleteDirectories(nsISupportsArray *dierctories)
{
nsresult rv = NS_ERROR_FAILURE;
PRUint32 i, dirCount;
rv = dierctories->Count(&dirCount);
if (NS_FAILED(rv)) return rv;
for (i = 0; i < dirCount; i++)
{
nsCOMPtr<nsISupports> dirSupports;
nsCOMPtr<nsIAbDirectory> directory;
dirSupports = getter_AddRefs(dierctories->ElementAt(i));
directory = do_QueryInterface(dirSupports, &rv);
if (NS_SUCCEEDED(rv) && directory)
{
DIR_Server *server = nsnull;
rv = directory->GetServer(&server);
if (server)
{
DeleteDirectoryCards(directory, server);
DIR_DeleteServerFromList(server);
rv = mSubDirectories->RemoveElement(directory);
NotifyItemDeleted(directory);
}
}
}
return rv;
}
NS_IMETHODIMP nsAbDirectory::HasCard(nsIAbCard *cards, PRBool *hasCard)
{
if(!hasCard)
return NS_ERROR_NULL_POINTER;
nsresult rv = NS_OK;
if (!mDatabase)
rv = GetAbDatabase();
if(NS_SUCCEEDED(rv) && mDatabase)
{
if(NS_SUCCEEDED(rv))
rv = mDatabase->ContainsCard(cards, hasCard);
}
return rv;
}
NS_IMETHODIMP nsAbDirectory::HasDirectory(nsIAbDirectory *dir, PRBool *hasDir)
{
if (!hasDir)
return NS_ERROR_NULL_POINTER;
DIR_Server* dirServer = nsnull;
dir->GetServer(&dirServer);
nsresult rv = DIR_ContainsServer(dirServer, hasDir);
return rv;
}
nsresult nsAbDirectory::NotifyPropertyChanged(char *property, PRUnichar* oldValue, PRUnichar* newValue)
{
return NS_OK;
}
nsresult nsAbDirectory::NotifyItemAdded(nsISupports *item)
{
nsresult rv = NS_OK;
NS_WITH_SERVICE(nsIAddrBookSession, abSession, kAddrBookSessionCID, &rv);
if(NS_SUCCEEDED(rv))
abSession->NotifyDirectoryItemAdded(this, item);
return NS_OK;
}
nsresult nsAbDirectory::NotifyItemDeleted(nsISupports *item)
{
nsresult rv = NS_OK;
NS_WITH_SERVICE(nsIAddrBookSession, abSession, kAddrBookSessionCID, &rv);
if(NS_SUCCEEDED(rv))
abSession->NotifyDirectoryItemDeleted(this, item);
return NS_OK;
}
NS_IMETHODIMP nsAbDirectory::GetDirUri(char **uri)
{
if (uri)
{
if (mURI)
*uri = PL_strdup(mURI);
else
*uri = PL_strdup("");
return NS_OK;
}
else
return NS_RDF_NO_VALUE;
}

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