Compare commits

..

961 Commits

Author SHA1 Message Date
srilatha%netscape.com
764c61dd38 Synchronizing with MOZILLA_0_9_4_BRANCH
git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@106605 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 00:24:45 +00:00
srilatha%netscape.com
68def7c5f0 Fix for Bug #102392. Refined COM code detect whether mozilla is running or
not.  This is required to support multiple sends from the Application.
r=dougt, sr=mscott.  Checking in for Kkhandrika@netscape.com


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@105107 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-10 22:37:02 +00:00
srilatha%netscape.com
956b8cae4e checking into the private branch
checking in for rdayal
Fix to NOT display the Logon Dialog


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104878 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-09 00:24:46 +00:00
srilatha%netscape.com
02be9f700d checkin for private branch only
checkin for rdayal
added the security warning dialog for blindsend


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104677 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-05 21:57:28 +00:00
srilatha%netscape.com
f18aa5109a Checking in for private branch only
checking in for rdayal@netscape.com
checking in the strings for mapi security warning dialog


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104615 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-05 01:05:16 +00:00
srilatha%netscape.com
ab89acab23 Fix for bug # 102308. Added check for smart dll.
Also saving the registry key only if mapi32.dll exists.


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104562 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-04 00:20:04 +00:00
srilatha%netscape.com
a002b3eb07 Getting the correct string from mapi.properties
Now we should get the error dialog.


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104558 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-03 23:50:13 +00:00
srilatha%netscape.com
ed7c300afe Fix for bug #102308. Changed InitWithPath to InitWithUnicodePath.
Also changed !NS_SUCCEEDED to NS_FAILED


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104544 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-03 19:01:00 +00:00
srilatha%netscape.com
468eab2d6d check in for private branch only
checking in for rdayal@netscape.com
removing tabs


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104506 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-03 01:51:39 +00:00
srilatha%netscape.com
36a6c17187 checking in for private branch only
checking in for rdayal@netscape.com
added exported fn for GetDllVersion


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104474 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-02 23:54:13 +00:00
srilatha%netscape.com
78f6e3374a this is for private branch only
checking in for rdayal@netscape.com
added exported function for GetDllVersion
adding GetDllVersion


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104471 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-02 23:53:20 +00:00
srilatha%netscape.com
9ff1395746 Saving the registry key in HKLM/Software/Mozilla/Desktop.
Part of bug # 102308


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104455 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-02 22:49:10 +00:00
srilatha%netscape.com
ac066ef0da Reverting the previous checkin and checking in the right fix for bug# 102705
git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104453 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-02 22:26:22 +00:00
srilatha%netscape.com
b089f8da63 Fix for bug #102705. Remove Mapi32_moz_bak.dll before backing up current Mapi32.dll.
git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104420 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-02 20:52:02 +00:00
srilatha%netscape.com
a886420225 This is for private branch only
refining the temporary hack for the Word return problem.


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104381 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-02 01:34:54 +00:00
srilatha%netscape.com
8ab62eec86 This is for private branch only
Checking in for rdayal@netscape.com
Putting the exports for all Simple MAPI functions


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104355 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-01 23:11:45 +00:00
srilatha%netscape.com
aba7cb360c Checking in to private Branch only. part of simple MAPI implementation
Added methods to copy and restore mapi32.dll into system directory.


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104272 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-30 22:47:17 +00:00
srilatha%netscape.com
68d5d23e63 Checking in to private Branch only for Simple MAPI implementation
checking in for kkhandrika@netscape.com


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104271 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-30 22:45:31 +00:00
srilatha%netscape.com
1259b1bef0 This is for local branch only
Checking in for rdayal@netscape.com
Temporary fix for MS Word returning an error even though Mapi support interface returns success.
This is a temporory fix while we solve this known problem.


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104129 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 21:10:52 +00:00
srilatha%netscape.com
d6e6d7f8c2 read me file to build MAPI_SUPP_BRANCH only.
git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104128 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 21:09:04 +00:00
srilatha%netscape.com
22bd24476e This is for a private branch only for MAPI_SUPPort
checking in for rdayal@netscape.com
makefile to make all the dirs and files for mapi support and mapi32.dll


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104127 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 21:06:58 +00:00
srilatha%netscape.com
0c4a06cd7d This checkin is for private branch only
Checking in for rdayal@netscape.com
This has fix for send mail called from Excel/Powerpoint which creates temp files for attachments


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104103 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 09:14:15 +00:00
srilatha%netscape.com
73408486f4 This is for private branch only.
Checking in for rdayal@netscape.com
This has the fix for Excel unable to call send as well as Word unable to call send


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104102 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 09:11:58 +00:00
srilatha%netscape.com
9a34911fa5 This checkin is for a private branch only.
Checking in for rdayal@netscape.com
Implementation of exported MAPISendMail and MAPISendDocuments functions in mapi32.dll


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104099 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 08:57:23 +00:00
srilatha%netscape.com
35a75f6aa8 This checkin is for private branch only.
Checking in for rdayal@netscape.com
This has the actual implementation for send mail and send doc for MAPI support.


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104098 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 08:34:39 +00:00
srilatha%netscape.com
3e280f4dc4 This is for private branch only.
Checking in for rdayal@netscape.com
Implementation of the interface methods for SendDoc and SendMail


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104097 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 08:32:47 +00:00
srilatha%netscape.com
1844782f3b Checkin for private branch only.
Checking in for rdayal@netscape.com
added the definition for SendDoc and SendMail implementation


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104096 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 08:31:37 +00:00
srilatha%netscape.com
9a23d5e734 This checkin for a the private branch only.
Checking in for rdayal@netscape.com
Added Mapi Support MS COM interface methods for SendDoc and SendMail


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104095 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 08:29:37 +00:00
srilatha%netscape.com
529b259b5f This is checkin for private branch.
Checking in for rdayal@netscape.com
added some comments


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104094 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 08:28:18 +00:00
srilatha%netscape.com
24fa594aba Need to Truncate(index + 1) since we need "\" in the end.
git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104087 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 05:20:37 +00:00
srilatha%netscape.com
88d1e8fb85 This is a checkin for the private Branch only for MAPI Support implementation
This is the backend implementation of MAPI preferences.


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104078 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 02:44:14 +00:00
srilatha%netscape.com
8794c3a5d4 This is a checkin for the private Branch only for MAPI Support implementation.
This is the backend implementation of MAPI preferences.


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104074 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 02:41:53 +00:00
srilatha%netscape.com
ee76a9b98b This is a checkin for the private Branch only for MAPI Support implementation
checking in for kkhandrika@netscape.com.
This is the actual implementation of MAPI functionality.


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104073 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 02:36:09 +00:00
srilatha%netscape.com
40689c8215 This is a checkin for the private Branch only for MAPI Support implementation
checking in for kkhandrika@netscape.com.
This is the mozilla implementation for MAPI32.dll.


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104072 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 02:31:12 +00:00
srilatha%netscape.com
14588c1b8c This is a checkin for the private Branch only for MAPI Support implementation
checking in for kkhandrika@netscape.com. This is the idl that generates
the MAPI support COM component


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104071 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 02:29:30 +00:00
srilatha%netscape.com
241a749d4a This is a private Branch checkin for Simple MAPI implementation.
Checking in for kkhandrika@netscape.com.
This is the def file for the MAPI Support MSCOM proxy stub dll.


git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@104066 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 02:18:12 +00:00
(no author)
b177a67e3b This commit was manufactured by cvs2svn to create branch 'MAPI_SUPP_BRANCH'.
git-svn-id: svn://10.0.0.236/branches/MAPI_SUPP_BRANCH@103950 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-27 16:22:06 +00:00
srilatha%netscape.com
766d65fa78 Fix for smoketest blocker bugscape bug 9703.
r=dmose, sr=sspitzer a=granrose.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103379 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 23:34:31 +00:00
karnaze%netscape.com
2bed6f7a2b bug 68998 - added additional param to Paint, PaintChildren, PaintChild used by tables in standard mode. sr=waterson, r=alexsavulov.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103316 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 13:56:45 +00:00
rods%netscape.com
1db6f7b7c8 Make the default "submit"
Bug 59035 r=kmcclusk sr=attinasi


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103298 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 10:46:40 +00:00
srilatha%netscape.com
3ee4597b02 Fix for bug 95122 / 100668. part of the simple mapi UI checkin
sr=sspitzer. Fixing the js error and removing extra content from contents.rdf


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103278 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 05:15:19 +00:00
loadrunner%betak.net
a4a473d518 bug 97541, Enable multiple spellcheckers in mail/composer, r=cmanske, sr=kin, PDT+
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103274 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 04:40:24 +00:00
loadrunner%betak.net
6a6ab4e28f bug 97541, Enable multiple spellcheckers in mail/composer, r=cmanske, sr=kin, PDT+
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103272 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 04:31:53 +00:00
blakeross%telocity.com
a3e9b17f10 Turbo turns off if you go to the advanced panel and press ok without making any changes (99677). r=hewitt sr=ben everything+
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103269 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 04:01:01 +00:00
naving%netscape.com
253a49cd77 98391 r=bienvenu sr=sspitzer a=pdt. Made it so that the filtering still works to a local folder if
parent is renamed. The fix also includes the fix for 98470 because it is in the same code.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103267 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 03:53:07 +00:00
ccarlen%netscape.com
cd21c03664 Bug 99117 - account creation problems when using turbo mode. UnloadAccounts() resets some vars which needed to be reset and weren't. r=bhuvan,dp/sr=mscott/a=pdt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103260 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 02:20:08 +00:00
cltbld%netscape.com
cf126e08a2 #91990: changing default skin from 'classic/1.0' to 'modern/1.0' on MOZILLA_0_9_4_BRANCH (now owned by Netscape) r=jelwell, sr=sdagley.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103246 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 00:47:09 +00:00
ftang%netscape.com
d5205a0cbe move fix of 94319 from m92 branch to m94 branch per marek in pdt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103240 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-20 00:15:02 +00:00
kin%netscape.com
44f8952c2b Fix for bug #92215: [Table Printing] Mozilla crashes when printing the front page of slashdot
Modified nsBlockFrame::ReflowDirtyLines() so that it
removes any floaters on it's continuing frames list,
if they are on lines that are being pulled up.

r=dbaron@fas.harvard.edu  sr=waterson@netscape.com   a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103235 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 23:10:21 +00:00
ducarroz%netscape.com
b4356e037d Fix for bug 96386. When a generic or unknown error occures while posting a message, we should report a post error instead of a send error. Also, the send unsent message listener should not display errors. Finally, the Display Send Report function should avoid displaying twice the same string. R=varada, sr=mscott
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103234 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 23:06:59 +00:00
gordon%netscape.com
dc98e60ad1 FIX bug 100216, crash in nsCacheService on shutdown. Added null pointer
check in nsCacheEntryDescriptor::RequestDataSizeChange(). r=gagan, sr=darin.

Also renamed cache directory preference per discussion in bug 78480. r=gagan
sr=darin.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103224 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 21:25:47 +00:00
jfrancis%netscape.com
12b282edd2 fixes 97797: empty solo list item won't indent. Changes to nsHTMLEditRules::WillMakeList() to not outsmart itself so badly. r=fm;sr=kin
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103223 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 20:57:12 +00:00
bnesse%netscape.com
9dc2508915 Landing fix for bug 92447 on branch. Internalize .cfg reading into prefs library. This also re-enables reading of the .cfg file which was broken by a checkin for bug 88844. r=miteh, sr=sfraser, a=PDT.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103209 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 18:47:32 +00:00
rpotts%netscape.com
913974ff70 bug #88229. moving patch from the 0.9.2 branch onto 0.9.4.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103186 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 06:58:34 +00:00
jst%netscape.com
a611c3fa27 Fixing bug 95840. Speeding up global property access in JS. r=mstoltz@netscape.com, sr=vidur@netscape.com, a=PDT
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103185 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 06:53:42 +00:00
mitesh%netscape.com
e2f91e0eef Fix for bug 99515 - AutoConfig event loop hangs during pref migration
r=danm and sr=alecf


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103182 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 05:08:18 +00:00
mitesh%netscape.com
e9812af9dd Fix for bug 97228 - Multiple appends of email addresses to the autoconfig URL
r=bnesse and sr=shaver


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103181 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 04:55:13 +00:00
kmcclusk%netscape.com
9391a7135e Protect against null view in nsViewManager::ProcessPendingUpdates. sr=mscott@netscape.com r=peterl@netscape.com a=jaimejr@netsca
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103166 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 01:33:20 +00:00
rangansen%netscape.com
ed6ff1f297 r=ddrinan sr=sr=kin@netscape.com PDT+=Jaime Rodriguez, Jr.
bug# 97719 - fixing broken crl expired warning dialog


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103165 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 00:56:23 +00:00
pinkerton%netscape.com
c8b90827ed work around bugs in CarbonLib's ::MenuSelect() with submenus. r=saari/sr=sfraser. bug#83639
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103163 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 00:42:07 +00:00
mscott%netscape.com
32e5e46df0 Landing 99491 onto the branch
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103152 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 00:09:14 +00:00
harishd%netscape.com
8f3d1f533b 98187 - Make sure that the end tag, inline element, does not close tags in the root tag list. r=heikki,sr-vidur,a=PDT.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103148 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-19 00:03:11 +00:00
mscott%netscape.com
68683e8186 Landing 91751 on the branch.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103144 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:59:30 +00:00
bienvenu%netscape.com
5226e443c4 fix regression in downloading messages for offline use and disabling commands when local message is loaded while offline r=naving, sr=sspitzer 99696 100124
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103143 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:49:51 +00:00
dp%netscape.com
1ffe13a4bb removing ^M at the end of line
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103141 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:47:34 +00:00
pchen%netscape.com
3aa4e8ee82 bugscape 8850, r=jag, sr=alecf, new mainWindow.dtd file that holds mainWindow* entities
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103140 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:44:24 +00:00
pchen%netscape.com
95fdb80ac3 bugscape 8850, r=jag, sr=alecf, bump minimum macos version to 8.6
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103139 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:43:39 +00:00
pchen%netscape.com
592d631348 buscape 8850, r=jag, sr=alecf, include mainWindow.dtd to get mainWindow entities
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103138 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:43:36 +00:00
pchen%netscape.com
5ad63473b5 buscape 8850, r=jag, sr=alecf, remove mainwindow entities from navigator.dtd (they're going into mainWindow.dtd)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103137 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:43:33 +00:00
pchen%netscape.com
ca2930fef6 bugscape 8850, r=jag, sr=alecf, add mainWindow.dtd to jar file
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103136 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:43:29 +00:00
pchen%netscape.com
e042778097 bugscsape 8850, r=jag, sr=alecf, include mainwindow.dtd
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103135 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:43:26 +00:00
heikki%netscape.com
48e8dc3afe Bug 100106, XMLHttpRequest.responseText is empty if XML parser error. r=harishd, sr=vidur.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103134 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:43:08 +00:00
dp%netscape.com
ee5b88f504 bug 88844 preventing xpcom from double init on launch after turbo mode is enabled. Getting turbo mode initialized properly. r=law, sr=alec,seth
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103133 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:41:21 +00:00
heikki%netscape.com
da4c1220ad Bug 98597, second part, bogus events with XMLHttpRequest. Patch from vidur. r=heikki, sr=jst.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103132 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:37:22 +00:00
harishd%netscape.com
5d20e95a61 98645 - Added SELECT to the set of tags that cannot be crossed over when an end tag ( block-level ) tries to close it's matching open tag on the stack. r=heikki, sr=vidur,a=PDT
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103129 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:30:53 +00:00
harishd%netscape.com
1518265a7a 91744 - Avoid stack overflow by replacing recursion with a simple do-while. Removed unwanted assertions. r=heikki,sr=vidur,a=PDT
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103127 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 23:25:32 +00:00
yokoyama%netscape.com
8c85e4fcf1 bug 97224:Update UTF-8 for Unicode 3.01 conformance
maintaining a byte count.
/r=yokoyama, /sr=waterson


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103097 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 17:35:58 +00:00
bienvenu%netscape.com
e53aec46d1 checking in fix for 99510 from trunk
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103095 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 13:59:07 +00:00
(no author)
6887bc1966 This commit was manufactured by cvs2svn to create branch
'MOZILLA_0_9_4_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103094 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 13:41:48 +00:00
peterv%netscape.com
9b5877a83a Fix for bug 99044 (Big memory leak in DOMHelper.cpp). r=Pike, sr=jst.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103085 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 10:12:28 +00:00
peterv%netscape.com
ba09c542b2 Fix for bug 85708 (Should support "text/xml" MIME media type). r=Pike, sr=jst.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103084 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 10:10:41 +00:00
srilatha%netscape.com
a66b153c53 Fix for bug # 95122. UI implementation for Simple MAPI.
r=rdayal, sr=sspitzer


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103081 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 05:48:42 +00:00
bienvenu%netscape.com
e65919336e checking in fix for 79245 from the trunk
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103077 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 04:52:24 +00:00
rpotts%netscape.com
e2f1a9bc9b bug #98844. Moving this patch over to 0.9.4 from 0.9.2...
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103076 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 04:33:15 +00:00
rpotts%netscape.com
c9465eb348 bug #98469 (r=pavlov@netscape.com, sr=jst@netscape.com, a=pdt). The _content window target does not always exist...
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103075 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 04:29:40 +00:00
jst%netscape.com
e45ffff2a7 Landing the fix for bug 98292 on the branch, implement image.x and .y. r=jrgm@netscape.com, sr=blizzard@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103073 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 03:51:47 +00:00
bienvenu%netscape.com
c9bf14bd6f more landing of 81690 onto the branch
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103071 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 03:27:53 +00:00
waterson%netscape.com
2c7c8fa4ac Bug 97383. Include the float's max-element-width in computation of the line's max-element-width so that we're guaranteed to place content next to a left floater. Revert some of the NOWRAP changes that should no longer be necessary. r=dbaron, sr=attinasi, a=jaimejr
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103070 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 03:26:26 +00:00
mscott%netscape.com
7910b2e903 Landing XBL brutal sharing on the branch
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103066 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 02:30:04 +00:00
mscott%netscape.com
bda5786937 Landing XBL brutal sharing on the branch.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103065 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 02:29:29 +00:00
srilatha%netscape.com
bd8d4b80bc removing these old unused files
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103063 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 02:21:17 +00:00
oeschger%netscape.com
a9f8eb5255 updating some screenshots in the help content, bug=85925, pdt-stamped, author=jatin, r=oeschger
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103061 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 02:14:53 +00:00
heikki%netscape.com
a19dc671ba Bug 98597, bogus event with XMLHttpRequest, including crasher fix. Patch from vidur. r=heikki, sr=jst.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103053 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 01:00:22 +00:00
heikki%netscape.com
214d0bb707 Bug 78021, Copy Link Address broken for image maps (<area> elements), <link> elements and simple XLinks. r=harishd, sr=vidur.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103051 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 00:48:06 +00:00
attinasi%netscape.com
da71dddcd1 Fix for percentage-height images in shrink-wrapping containers. b=85016 r=karnaze sr=waterson a=pdt
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103050 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 00:38:15 +00:00
ducarroz%netscape.com
c01dd3e2f6 Fix for bug 97256. Don't be case sensitive when checking for a RFC822 header!
Patch provided by Denis Antrushin <adu@sparc.spb.su>. R=ducarroz, SR=sspitzer


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103049 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 00:29:46 +00:00
kin%netscape.com
a1945a4b37 Fix for bug 98018: Impossible to delete text in textbox
nsEditor::CreateTxnForDeleteInsertionPoint() shouldn't
use count-1 when calculating isLast, in the non-text case.

r=jfrancis@netscape.com  sr=sfraser@netscape.com  a=pdt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103047 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 00:18:34 +00:00
harishd%netscape.com
d6c7837d7e 98261 - Instead of throwing away the current tag close it's parent such that the stack level does not go beyond the reflow depth limit. This would allow leaf tags, that follow the current tag, to find the correct node. r=heikki, sr=attinasi.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103046 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 00:11:27 +00:00
harishd%netscape.com
7ab11a2910 98261 - reconcile the difference between the ContentSink's notion of depth and Layout's notion of depth. r=heikki, sr=attinasi.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103045 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-18 00:11:16 +00:00
sspitzer%netscape.com
918aedd742 fix for #98793. hack to pre-cache the unread / read / flagged / unflagged icons to work around a problem
between outliner and imagelib.  a=PDT/


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103037 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 23:41:16 +00:00
hewitt%netscape.com
3a6dcacb77 99102 - update skin versions in all contents.rdf, r=hyatt, sr=blake
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103036 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 23:40:50 +00:00
mscott%netscape.com
5d4c9c03c9 Landing 81690 on the branch for bienvenu.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103033 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 23:23:07 +00:00
mscott%netscape.com
1665532f16 Landing 84260 and 91352 onto the branch for bienvenu.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103031 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 23:20:33 +00:00
mscott%netscape.com
11f1c99c39 Landing Bug #96335 on the branch for bienvenu.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103030 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 23:17:34 +00:00
mscott%netscape.com
afd88479d3 Landing Bug #96631 on the branch for bienvenu.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103029 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 23:15:46 +00:00
attinasi%netscape.com
7168d1a8c3 Fixing erroneous addition to previously reviewed and approved patch: b=97619 r=bernd sr=waterson
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103028 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 23:14:43 +00:00
mscott%netscape.com
964dde1cad Landing Bug #99228 on the branch for bienvenu.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103027 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 23:13:44 +00:00
av%netscape.com
90e92c729e Fixing bug 98285 -- adding access to the service manager from plugins, r=beard, sr=vidur
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103024 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 23:02:32 +00:00
sspitzer%netscape.com
9c8e527cba fix for #98381. "Server:" -> "Account:" in subscribe UI. a=PDT,mcarlson
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103022 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 22:41:16 +00:00
tao%netscape.com
ccb1e2fd37 71517: Dynamically select platform jar in langxxxx.xpi. (r=jbetak,sr=mscott)
package en-{unix,win}.jar on mac, too.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103021 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 22:40:46 +00:00
gordon%netscape.com
d326ebbdba Fix bug 88768, [a=nisheeth], fixing unary operator usage.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103016 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 20:49:42 +00:00
mscott%netscape.com
5662ee8b97 Bug #99222 --> for compose auto complete, don't show the popup if we have an exact
match.
r=ducarroz
sr=sspitzer


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103013 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 20:36:29 +00:00
mscott%netscape.com
34fd65e72e Bug #99222 --> make the widget flexible enough to only show the popup if
there are  a certain # of results present in the list.
r=sspitzer
sr=hewitt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103012 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 20:35:02 +00:00
mscott%netscape.com
1619de5a13 Bug #88315 --> select the first partial match when presented with multiple matches
r=ducarroz, sspitzer
sr=hewitt


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103009 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 20:32:31 +00:00
hyatt%netscape.com
cef8df4890 Fix for 96899, unable to see addresswes when scrolling up in mailcompose. r=mscott, sr=brendan
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103007 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 20:24:30 +00:00
sspitzer%netscape.com
c5d40fbb22 fix for #97585. if signature file pref points to a directory, don't hang
on msg compose. a=PDT


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103005 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 19:39:18 +00:00
sspitzer%netscape.com
c6e4cd4a0c fix for #98453. use "Mail & Newsgroups" consistently in the UI.
a=PDT,mcarlson


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@103002 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-17 19:25:33 +00:00
kaie%netscape.com
a0da673610 b=97614
Merging changes from NSS_CLIENT_TAG into MOZILLA_0_9_4_BRANCH for directory mozilla/security/nss.
a=pdt is covered by bug 96018


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102966 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-15 01:18:52 +00:00
cavin%netscape.com
6915c9b64f Bug #98294: In DiscoverChildren(), make sure we have a consistent server hierarchy delimiter. r=sspitzer, sr=mscott.
Bug #98433: In GetListOfFoldersWithPath(), if the folder path contains 'INBOX' of any forms, we need to convert it to uppercase before finding it under the root folder. r=naving, sr=mscott.
Bug #99101: In RenameLeaf(), unescape the folder name before searching for hierarchy delimiter (to figure out parent pathname). r=naving, sr=bienvenu.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102961 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-15 00:31:07 +00:00
pierre%netscape.com
d4ddf5b901 Bug 93371 "Treat classes case insensitively in quirks mode". Back out ianh's patch in nsCSSParser and nsHTMLAttributes. Implements case-insensitiveness in nsCSSStyleSheet as described in bug 35522. r=glazman (+dbaron/jst), sr=hyatt, a=grega for PDT/asa for drivers
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102959 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-14 23:52:15 +00:00
ssu%netscape.com
bec02d74b7 fixing bug 99340's part regarding turbo settings in installer not retained when running installer in silent/auto modes. r=dveditz,syd sr=mscott, a=pdt+ affects windows platforms only.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102938 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-14 20:54:54 +00:00
kaie%netscape.com
fbf8f97a35 b=96018 r=ddrinan sr=blake a=pdt
New "Reset Master Password" functionality, for users who have forgotten their password.

b=99525 r=ddrinan/morse/relyea sr=blizzard a=pdt
Completing feature added with bug 96018.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102931 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-14 20:36:20 +00:00
cotter%netscape.com
9f0ad3c850 privacy & security help updates per b=85925 (a=asa, r=oeschger) and b=96018 (PDT+)
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102930 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-14 20:34:02 +00:00
(no author)
7cb1660860 This commit was manufactured by cvs2svn to create branch
'MOZILLA_0_9_4_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102925 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-14 20:19:30 +00:00
gerv%gerv.net
cb6a00d0dd Prevent problems with NS initial start page appearing, by renaming pref. Bug 99441. r=syd, gerv, sr=jband, a=asa. This will be backed out immediately after 0.9.4 ships.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102880 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-13 17:53:45 +00:00
gerv%gerv.net
19a5fead7d Prevent problems with NS initial start page appearing, by renaming pref. Bug 99441. r=syd, gerv, sr=jband. This will be backed out immediately after 0.9.4 ships.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102878 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-13 16:57:41 +00:00
law%netscape.com
62f334a0a2 Applying fixes for bug 88844 and bug 89532 to the mozilla0.9.4 branch.
These changes also fix some other minor turbo-mode bugs.
These changes have all been reviewed and super-reviewed prior to being
checked in on the trunk; see the bugs for details.

a=asa for applying the fix to the branch.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102867 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-13 12:01:25 +00:00
ssu%netscape.com
102a2724fa fixing bug 99340 - Installer dies with error 2 under Win9x. r=syd,dveditz sr=mscott a=asa. not part of tinderbox builds. affects windows installers only.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102833 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-12 20:59:48 +00:00
brendan%mozilla.org
a5cae88f2e Checking in bstell@netscape.com's patch for bug 95906, r=jag, sr=me, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102826 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-12 20:36:53 +00:00
cmanske%netscape.com
e327210730 Fixing dataloss bug 98768, r=syd, sr=kin, a=roc+moz
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102817 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-12 19:21:33 +00:00
blizzard%redhat.com
80626e227e Fix bug #97620. Crash unloading -turbo mozilla from tray icon. r/sr=ben,rpotts,brendan,me
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102816 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-12 19:11:20 +00:00
kaie%netscape.com
adf70abbbb b=99052 r=nelsonb a=asa on irc
Fix crash in NSS during SSL handshake


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102806 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-12 16:17:01 +00:00
blakeross%telocity.com
498ce0aaf9 Committing a file I forgot yesterday in an r/sr/a'd checkin (caused an xml error when opening the addressbook sidebar panel).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102780 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-12 01:00:14 +00:00
shanjian%netscape.com
5e0af0ccdd #90581 universal charset detector does not work in mail/news
r=yokoyama, sr=waterson, a=roc+moz


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102779 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-12 00:37:53 +00:00
waterson%netscape.com
de0910f6ee Bug 72152. Be sure to update the pres context's visible area after doing a resize reflow. r=dbaron, sr=attinasi, a=blizzard
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102765 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-11 22:24:01 +00:00
timeless%mac.com
b61fa5b60e Bugzilla Bug 85543 Extra blank box to the left of 'Done.' on mac classic skin.
r=ksosez sr=blake a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102753 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-11 08:52:58 +00:00
jaggernaut%netscape.com
8efa6975cc Bug 91884, 91788 & 91571: reverting code from 91884 and checking in the fix we had in NS 6.1 / 0.9.2.1. r=reverting code, sr=hyatt, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102750 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-11 07:29:39 +00:00
peterlubczynski%netscape.com
9695eac077 Use memmove instead of strncpy bug 98705 r=av sr=attinasi a=roc+moz
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102735 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-11 03:28:00 +00:00
cmanske%netscape.com
fbb7e7472a New strings needed in case full fix for bug 72583 is approved, r=brade, sr=kin, a=grega
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102717 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-11 00:59:05 +00:00
leaf%mozilla.org
32f3806bf0 mac version update and user agent string update, bug 93164, sr=mscott, a,r=dbaron
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102710 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-11 00:28:38 +00:00
syd%netscape.com
3fbb2b5028 Fix typo in last checkin, wanted "Quick Launch", not "QuickLaunch"
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102709 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-11 00:17:32 +00:00
syd%netscape.com
373281325e Commercial addition for bug 97380. Looking at the bug, appropriate reviews and
such have been given for the mozilla version. Also, bug number 98594.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102707 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-11 00:04:56 +00:00
attinasi%netscape.com
07d3891457 Fix for image wrapping problems in table cells. b=97619 r=bernd sr=waterson
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102689 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-10 22:57:07 +00:00
blakeross%telocity.com
ce34146fa4 App sometimes hangs when scrolling addressbook panel (99121). r=hwaara,varada sr=sspitzer a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102677 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-10 22:03:47 +00:00
dbaron%fas.harvard.edu
2e1a9bce6d Null checks for topcrash 99056. r=jag sr=waterson a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102673 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-10 21:45:40 +00:00
dbaron%fas.harvard.edu
e68b30e16e Null check to fix topcrash 97226. r=hixie sr=waterson a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102672 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-10 21:43:32 +00:00
robinf%netscape.com
f75f2c964a routine help updates per bug 85923; r=oeschger@netscape.com, a=adot@netscape.com
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102660 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-10 20:29:07 +00:00
oeschger%netscape.com
3cc3b02e9f adding help key for content updates, a=asa, bug=85925, r=cotter
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102625 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-10 00:55:46 +00:00
cls%seawood.org
43082cc7d3 Replace cat<<EOF with echos to avoid potential security risk with predictable /tmp files.
Thanks to Ashu Kulkarni <ashuk@eng.sun.com> for the patch.
Bug #98723 r=cls a=blizzard


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102593 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-08 19:16:27 +00:00
yokoyama%netscape.com
84ca3e46fc Bug 91193
makefile.win change
renaming from universalautochrdet.dll to universalautochardet.dll
/r=ftang;/sr=waterson;/a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102557 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-07 23:06:12 +00:00
waterson%netscape.com
b71a0d4153 Bug 55086. Change nsContainerFrame::PositionFrameView() to position child views. Eliminate the |aView| parameter from that method, because the view can be retrieved from the frame and need not be done by the caller. Eliminate the NS_FRAME_NO_MOVE_CHILD_VIEWS flag, which was read-only; i.e., never set by anyone. r=dbaron, sr=attinasi, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102541 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-07 21:21:25 +00:00
sspitzer%netscape.com
88232d9b3d fix for #98660. don't call PR_GetEnv("PARSE_MODE") a bunch of times if we don't have to.
r=dbaron, sr=sfraser, a=blizzard


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102537 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-07 20:36:15 +00:00
axel%pike.org
8532c1fd58 bug 94834, --without-png and --without-mng leads to DIRS=' ', r=pavlov, sr=jst, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102523 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-07 10:16:49 +00:00
attinasi%netscape.com
18603b97ef two approved bugs:
1) prevent list item bullets from resizing in Quirks mode (IE compat). b=97351 r=pierre sr=waterson a=drivers
2) fix collapsing margins of empty elements in BODY and TD in Quirks mode. b=97361 r=pierre sr=hyatt a=drivers


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102513 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-07 04:10:39 +00:00
bstell%netscape.com
137b5e30b9 bug 97533, patch by dbaron@fas.harvard.edu, r=bstell, sr=blizzard
check return status from getIntPref


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102512 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-07 04:06:54 +00:00
kaie%netscape.com
574b31e2c7 b=87578 r=ddrinan sr=blizzard a=asa
Enable a user to use (or switch to) an empty security password, i.e. no password at all.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102490 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-07 00:05:22 +00:00
kaie%netscape.com
e127df6817 b=93103 r=ddrinan/relyea sr=blizzard a=asa
Enable display of complete chains when viewing certificates.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102488 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 23:54:06 +00:00
shanjian%netscape.com
1b9e0a9dbb #97516 crash in nsRenderingContextWin::GetWidth() in certain situation
r=rbs, sr=waterson, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102482 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 23:12:42 +00:00
pinkerton%netscape.com
4c002b41db allow changing of the label of a submenu. r=saari/sr=smfr/a=asa. bug# 97549.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102476 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 22:49:55 +00:00
waterson%netscape.com
1b7655115b Bug 98456. Fix makefile so that meta-modules build. r=dp, sr=cls, a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102466 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 21:54:43 +00:00
gerv%gerv.net
3b9e749579 Set start page override and home page to be http://www.mozilla.org/start , a page encouraging people to get involved with Mozilla. r,a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102463 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 21:44:35 +00:00
jj%netscape.com
9ede8deaa5 #4830: turning traceback off in optimized builds on MOZILLA_0_9_4_BRANCH
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102462 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 21:43:19 +00:00
kin%netscape.com
c926a9ad82 Fix for bug #97387: WRMB:iframe with frameborder="no" does not work
Call ParseFrameborderValue() with value returned from InNavQuirksMode(),
instead of hardcoded PR_TRUE.

r=karnaze@netscape.com  sr=attinasi@netscape.com  a=asa@mozilla.org


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102439 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 20:13:46 +00:00
varada%netscape.com
d63d20c4e9 fix for bug#82120;disable editable fields during sending of mail;r=cmanske;sr=sspitzer;a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102432 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 19:22:37 +00:00
cotter%netscape.com
87a35d18c4 privacy & security help content update per b=85925, a=asa, r=oeschger
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102427 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 19:08:50 +00:00
cotter%netscape.com
58bb911f81 privacy & security help content updates per b=85925, a=asa, r=oeschger
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102426 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 19:01:41 +00:00
dbaron%fas.harvard.edu
1fc4f6cf6d Fix topcrash bug 96563 by reading only the number of characters of string that we have, rather than double that number. r=pavlov sr=blizzard a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102411 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 16:16:13 +00:00
karnaze%netscape.com
1322ba0abd bug 95688 - check for null base url, possibly fixing talkback reported errors, sr=kin, r=alexsavulov
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102408 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 14:13:17 +00:00
blizzard%redhat.com
276b070725 Bug #97851. Fix security permissions on temporary file created when doing file uploads. r=pete, sr=waterson, a=dbaron
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102389 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 06:09:09 +00:00
jst%netscape.com
d1ebb0777f Fixing bug 62613. Making CSSStyleDeclaration objects appear as arrays in JS. patch by Fabian <hidday@geocities.com>, r=harishd@netscape.com, sr=jst@netscape.com, a=asa@mozilla.org
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102387 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 05:30:42 +00:00
mkaply%us.ibm.com
c5fed3e06b No bug
r=mkaply, sr=blizzard, a=asa for drivers
OS/2 only - code from javier - more font improvements - better scaling and text zoom for bitmap fonts


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102382 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 03:59:10 +00:00
mkaply%us.ibm.com
19d0f57a0f No bug
r=mkaply, sr=blizzard, a=asa for drivers
OS/2 only - Got these reversed - on OS/2, NEWFRAME is used at the end of a page, not the beginning


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102381 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 03:58:24 +00:00
jband%netscape.com
93c47a625f fix bug 97444. It is not good to patch a different fun into the frame. Let's safely shunt aside the callee frame instead. This is already on in the trunk. r=rogerl sr=brendan a=asa.
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102370 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 02:18:43 +00:00
brendan%mozilla.org
4892be5264 Don't cache chrome scripts unless their master document URL is chrome too (we need the prototype cache to root the script objects; 98207, sr=jband&waterson, a=asa).
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102368 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 02:01:40 +00:00
av%netscape.com
703d584111 Fix for bug 86642 -- crash in DOMMimeTypeImpl::DOMMimeTypeImpl() when plugin doesn't set some fields in its version stamp, r=peterl, sr=attinasi, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102346 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 00:04:31 +00:00
yokoyama%netscape.com
65b6908093 Bug 96318:
Fixing accident removal of nsIFontPackageService
/ftang;/sr=waterson;/a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102345 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 00:01:37 +00:00
peterlubczynski%netscape.com
9e99e7738f Fix for not setting reflow state on object frame in printing case bug 97563 r=av sr=attinasi a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102298 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-05 14:51:43 +00:00
cls%seawood.org
055359c675 Updating module dependencies caused by checkin for bug 97380
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102290 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-05 08:41:48 +00:00
cls%seawood.org
7301a8096a Deactivate sidebar panels when the panel is not selected.
Special thanks to matt@netscape.com for providing this patch.
Bug #53239 r=cls sr=ben a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102286 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-05 07:58:16 +00:00
sspitzer%netscape.com
4c2fcd5edd fix for #88970. new thread pane icons. r,sr=sspitzer,hewitt, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102280 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-05 07:04:32 +00:00
sspitzer%netscape.com
16f4fe9967 fix for #92429. new alert icons. sr=hewitt, a=asa
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102279 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-05 07:03:45 +00:00
edburns%acm.org
fda7a2186a bug=97930
r=peterl
sr=waterson
a=asa


modules/plugin/base/src/nsIPluginInstanceOwner.h
modules/plugin/base/src/nsPluginHostImpl.cpp
modules/plugin/base/src/nsPluginHostImpl.h
modules/plugin/base/src/nsPluginViewer.cpp
modules/oji/src/nsJVMManager.cpp
modules/oji/src/nsJVMManager.h
layout/html/base/src/nsObjectFrame.cpp
xpfe/global/resources/locale/en-US/region.properties


Here's what I did to fix this bug.

I pestered Rick Potts about the problem of
nsIWebBrowserChrome->SetStatus() not being synchronous. He fixed that
under bug 97227.

Taking advantage of Rick's fix to 97227, I modified
nsIPluginInstanceOwner to have new method, ShowStatus(const PRUnichar
*aStatusMsg). This is necessary to allow for localized messages to be
posted from the plugin, such as "Starting plugin for type
application/x-java-vm" or "Beginnen steckbar für Art
application/x-java-vm".

I modified all the implementations of nsIPluginInstanceOwner:

layout/html/base/src/nsObjectFrame.cpp
modules/plugin/base/src/nsPluginViewer.cpp

I inserted a call to nsIPluginInstanceOwner->ShowStatus() at the part
just before the big "whole damn app freezes when starting java" thing
happens.

I also modifed nsJVMManager.cpp ShowJavaConsole() to do the same. These
are the two places I know of now that can start java.


git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102274 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-05 06:40:01 +00:00
ftang%netscape.com
90bc0fe117 fix bug 98233. back out change to 56863
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102245 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-05 01:23:06 +00:00
leaf%mozilla.org
3f49f9c396 pull from the branch
git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102215 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-04 22:58:51 +00:00
(no author)
ab3d5d6cb7 This commit was manufactured by cvs2svn to create branch
'MOZILLA_0_9_4_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_0_9_4_BRANCH@102203 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-04 05:25:09 +00:00
dmose%netscape.com
1e4b9afa30 Bug 92135: shows source of autocomplete items in the mail compose window using icons in the dropdown (default match, local addressbook, remote addressbook). Allows (via hidden pref; off by default) for more sophisticated info about each address -- specific addrbook name, or random ldap attribute, like department). Also fixes minor LDAP autocomplete i18n regression introduced post 0.9.3 and found while testing. r=sspitzer; sr=hewitt; a=asa
git-svn-id: svn://10.0.0.236/trunk@102202 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-04 05:25:08 +00:00
zach%zachlipton.com
3254c8a684 Add a little 1; to the end of this.
git-svn-id: svn://10.0.0.236/trunk@102201 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-04 04:28:24 +00:00
pschwartau%netscape.com
1e55d91449 Initial add. Regression test for bug 96284.
git-svn-id: svn://10.0.0.236/trunk@102200 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-04 01:54:36 +00:00
serge%netscape.com
91130476f6 bug 69167; plugin load fails silently on library not found; r=av, sr=waterson, a=roc+moz
git-svn-id: svn://10.0.0.236/trunk@102199 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-03 23:04:53 +00:00
brendan%mozilla.org
802990f0a6 Ignore property found in non-native prototype (12367, sr=jband&shaver, a=asa).
git-svn-id: svn://10.0.0.236/trunk@102198 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-03 22:29:12 +00:00
zach%zachlipton.com
34e0aa80c0 Actually make the strict checking work.
git-svn-id: svn://10.0.0.236/trunk@102197 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-03 22:11:43 +00:00
zach%zachlipton.com
845e5fbbee add tests for use strict;
git-svn-id: svn://10.0.0.236/trunk@102196 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-03 22:04:09 +00:00
zach%zachlipton.com
90cc2fe587 Enforce -w. This file will also be used to enforce use strict;
git-svn-id: svn://10.0.0.236/trunk@102195 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-03 21:43:22 +00:00
zach%zachlipton.com
9f27644a48 Rename 1.t to 1compile.t as per bug 97976.
git-svn-id: svn://10.0.0.236/trunk@102193 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-03 20:17:40 +00:00
zach%zachlipton.com
7c0be6c517 Remove processmail from the list. It was causing problems with taint.
git-svn-id: svn://10.0.0.236/trunk@102192 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-03 19:39:37 +00:00
brendan%mozilla.org
4a1d0f0899 Fix toSource on exception objects so it uses toSource to generate properly-quoted, embedded string literals for message and filename (bug 96284, r=jband, sr=shaver, a=asa).
git-svn-id: svn://10.0.0.236/trunk@102191 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-03 19:36:24 +00:00
zach%zachlipton.com
488ccb60b0 Ok, really this time. This should work :)
git-svn-id: svn://10.0.0.236/trunk@102190 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-03 19:26:58 +00:00
zach%zachlipton.com
18717d4966 Backout of this to get things back to normal
git-svn-id: svn://10.0.0.236/trunk@102189 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-03 18:50:56 +00:00
zach%zachlipton.com
7a86f27c8a Use Support::Files for the test items.
No review needed at this time for tests as per Dave.


git-svn-id: svn://10.0.0.236/trunk@102188 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-03 18:35:19 +00:00
zach%zachlipton.com
9dd9a3fee4 Addition of Files.pm which will be used shortly by 1.t (soon to be 1compile.t) which contains the list of files to test. This is important so that we can bring it into other tests which check files for content, etc...
No review required for tests as of now as per Dave.


git-svn-id: svn://10.0.0.236/trunk@102187 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-03 18:33:03 +00:00
zach%zachlipton.com
b82047c7b9 Fix for bug 98024: t/1.t should use $^X instead of hard-coded path to perl.
Patch by ddkilzer@theracingworld.com (David D. Kilzer, ddk). Review by Zach Lipton (zach@zachlipton.com) no 2nd review required.


git-svn-id: svn://10.0.0.236/trunk@102186 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-03 17:58:53 +00:00
timeless%mac.com
7c2d9ca3dc Bugzilla Bug 89864 <SCRIPT LANGUAGE="JavaScript1.0"> gets ignored
r=dveditz, sr=brendan, a=asa


git-svn-id: svn://10.0.0.236/trunk@102185 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-03 16:09:58 +00:00
kaie%netscape.com
41dc386fdf b=76915 r=jag sr=hyatt a=blizzard
Fixing a text string.


git-svn-id: svn://10.0.0.236/trunk@102183 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-03 14:11:39 +00:00
pavlov%netscape.com
ff9e8ff3e0 fixing the annoying GDK-CRITICAL asserts on linux. bug 95160. r=bryner sr=hyatt a=asa
git-svn-id: svn://10.0.0.236/trunk@102182 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-03 08:21:37 +00:00
cls%seawood.org
56da280ff2 Add floating point support to sparcv9 xptcall implementation.
Bug #91840 r=pavlov [not part of the build and all that nonsense]


git-svn-id: svn://10.0.0.236/trunk@102181 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-03 01:47:32 +00:00
dbaron%fas.harvard.edu
2729f11757 Use the name mozpango rather than mozpng to avoid library name conflict with PNG library. b=97481 r=cls a=asa Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@102180 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-03 01:28:18 +00:00
justdave%syndicomm.com
e3c9d88972 Fix for bug 91808: Additional sanitycheck tests for the duplicates table.
Patch by Matthew Tuck <matty@chariot.net.au>
r= jake@acutex.net, caillon@returnzero.com


git-svn-id: svn://10.0.0.236/trunk@102179 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-03 01:08:05 +00:00
despotdaemon%netscape.com
8459a2c9a9 Pseudo-automatic update of changes made by alex.fritze@crocodile-clips.com.
git-svn-id: svn://10.0.0.236/trunk@102178 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-02 18:40:09 +00:00
dougt%netscape.com
6ab2a76e68 backing out my changes due to linux orangeness
git-svn-id: svn://10.0.0.236/trunk@102177 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-02 17:15:16 +00:00
dougt%netscape.com
161d8dd0c6 Fixes a crash when QI'ing on async xpcom event proxy. r=rpotts, sr=jband, a=blizzard
git-svn-id: svn://10.0.0.236/trunk@102176 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-02 05:53:28 +00:00
pavlov%netscape.com
438c6aaae7 change the st calls to stx since we're using extended words now.
git-svn-id: svn://10.0.0.236/trunk@102175 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-02 02:17:37 +00:00
pavlov%netscape.com
bde544332d learning to type.. (not part of build)
git-svn-id: svn://10.0.0.236/trunk@102174 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-02 00:27:28 +00:00
pavlov%netscape.com
7538d475be typo
git-svn-id: svn://10.0.0.236/trunk@102173 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-02 00:23:10 +00:00
pavlov%netscape.com
2edd59b33e cleaning up a little.. adding new xptcstubs v9 (not part of build)
git-svn-id: svn://10.0.0.236/trunk@102172 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-02 00:18:39 +00:00
pavlov%netscape.com
e4671f9078 adding xptcstubs for sparcv9 (64bit). not part of build
git-svn-id: svn://10.0.0.236/trunk@102171 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 23:48:04 +00:00
rginda%netscape.com
d95b9a0aca bug 88130, patch=jband, r=me,dbradley, sr=jst, a=brendan
clear exception state before and after calling out via xpconnect.
remove redundant exception clear from CallQueryInterfaceOnJSObject.


git-svn-id: svn://10.0.0.236/trunk@102170 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 22:47:47 +00:00
rginda%netscape.com
6602a81a2a - not built -
package new stack, project, and breakpoint icons
package new step over, step out, and stop toolbar icons


git-svn-id: svn://10.0.0.236/trunk@102168 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:51:51 +00:00
rginda%netscape.com
178a78dfe7 - not built -
add css for new step out, step over, stop buttons
change continue and step in commands to use the new png images
add css for breakpoint, script, and watch views


git-svn-id: svn://10.0.0.236/trunk@102167 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:49:40 +00:00
rginda%netscape.com
78971eaea0 - not built -
make links in error messages less ugly


git-svn-id: svn://10.0.0.236/trunk@102166 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:48:36 +00:00
rginda%netscape.com
dd815a80c1 - not built -
add strings for stack outliner, disable breakpoint, finish and next commands


git-svn-id: svn://10.0.0.236/trunk@102165 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:47:42 +00:00
rginda%netscape.com
1d72d63212 - not built -
new strings for step over, step out, stop commands
remove unused strings
add strings for script, source, and stack outliners


git-svn-id: svn://10.0.0.236/trunk@102164 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:46:48 +00:00
rginda%netscape.com
fd47134931 - not built -
hook up step out, step over, and stop commands
add outliners for new project, script, and stack views


git-svn-id: svn://10.0.0.236/trunk@102163 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:45:34 +00:00
rginda%netscape.com
6c3da8810b - not built -
brace/whitespace cleanup
implement leftPadString()


git-svn-id: svn://10.0.0.236/trunk@102162 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:44:18 +00:00
rginda%netscape.com
befb2d4235 - not built -
implement next, step out, and stop state commands
bring breakpoint implementation in line with the new breakpoint and script views
add destroy() method to tear down the debugger


git-svn-id: svn://10.0.0.236/trunk@102161 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:43:43 +00:00
rginda%netscape.com
acbb49532e - not built -
change tab width pref from "tab string" to numerical width
remove wordbreak pref (it's just a const now)


git-svn-id: svn://10.0.0.236/trunk@102160 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:41:53 +00:00
rginda%netscape.com
7ac4abc5c5 - not built -
change doctype to avoid quirks mode


git-svn-id: svn://10.0.0.236/trunk@102159 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:40:33 +00:00
rginda%netscape.com
ddac1964ab - not built -
implement new script, stack, and project views


git-svn-id: svn://10.0.0.236/trunk@102158 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:39:58 +00:00
rginda%netscape.com
6c41e5e130 - not built -
hookup new messages


git-svn-id: svn://10.0.0.236/trunk@102157 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:39:01 +00:00
rginda%netscape.com
34a846d24b - not built -
hook up next, stepout, finish, and stop commands
event handler work for the new project, script, and stack views


git-svn-id: svn://10.0.0.236/trunk@102156 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:37:49 +00:00
rginda%netscape.com
1a7855a477 - not built -
whitespace cleanup
use new TreeOView stuff, add breakpoint, project, and stack view support


git-svn-id: svn://10.0.0.236/trunk@102155 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:35:36 +00:00
rginda%netscape.com
2dcddedc75 - not built -
hook up finish and next commands


git-svn-id: svn://10.0.0.236/trunk@102154 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:32:30 +00:00
rginda%netscape.com
5fc1ce593d - not built -
add scrollTo to BasicOView
add generic tree outliner view support (TreeOView and TreeOViewRecord)


git-svn-id: svn://10.0.0.236/trunk@102153 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:31:48 +00:00
rginda%netscape.com
be35ff89fc - not built -
adding new icons


git-svn-id: svn://10.0.0.236/trunk@102152 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:28:24 +00:00
rginda%netscape.com
5b35893ef8 - not built -
adding tree outliner view test


git-svn-id: svn://10.0.0.236/trunk@102151 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:20:23 +00:00
blakeross%telocity.com
86c073e168 Long path causes helper app dialog to grow way too long (85173). Patch by Dean Tessman <dean_tessman@hotmail.com>. r=jag sr=blake a=asa
git-svn-id: svn://10.0.0.236/trunk@102150 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:12:45 +00:00
rginda%netscape.com
84b8ddf3ae -- not built --
exposing call hook functionality


git-svn-id: svn://10.0.0.236/trunk@102149 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:03:53 +00:00
rginda%netscape.com
a411916b1b -- not built --
whitespace cleanup


git-svn-id: svn://10.0.0.236/trunk@102148 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:01:28 +00:00
cls%seawood.org
7cc7e6af46 Add xprint ldflags to linking of gfx_xlib.
Thanks to Roland.Mainz@informatik.med.uni-giessen.de (Roland Mainz) for the patch.
Bug #97264 r=cls a=blizzard


git-svn-id: svn://10.0.0.236/trunk@102147 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 17:29:05 +00:00
cls%seawood.org
3736408869 Declare nsCOMPtrs outside of do-while loops to avoid gcc 2.x -O2 optimization bug.
Bug #96911 r=jfrancis sr=kin a=blizzard


git-svn-id: svn://10.0.0.236/trunk@102146 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 17:24:08 +00:00
blizzard%redhat.com
f7762a4e47 drop in updated patches. not part of the build.
git-svn-id: svn://10.0.0.236/trunk@102145 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 17:12:21 +00:00
cmanske%netscape.com
57d2e418fd Fixed not allowing '-' and '+' for font tag 'size' attribute in Advanced Edit dialog, b=88878, r=akkana, sr=shaver, a=asa
git-svn-id: svn://10.0.0.236/trunk@102144 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 14:14:36 +00:00
pavlov%netscape.com
aaaaa076b4 fixing some typos :) (NOT PART OF BUILD)
git-svn-id: svn://10.0.0.236/trunk@102143 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 08:02:48 +00:00
pavlov%netscape.com
a899539797 adding sparcv9 xptcall code for 64bit solaris with Sun Workshop/Forte compilers. not part of the build.
git-svn-id: svn://10.0.0.236/trunk@102142 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 07:57:33 +00:00
bnesse%netscape.com
c7838917a8 Fix for bug 37592. Implement about:config. Checking in for chipc. r=darin, hewitt, mstoltz,srilatha. sr=waterson. a=brendan.
git-svn-id: svn://10.0.0.236/trunk@102141 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 06:01:25 +00:00
mstoltz%netscape.com
6be1acfad8 59208 - Activate enumeration callback for window and document objects
and call security check to prevent cross-site enumeration. r=jst, sr=jband,
a=asa


git-svn-id: svn://10.0.0.236/trunk@102140 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 03:30:51 +00:00
justdave%syndicomm.com
ce6d26e5d3 Added a --verbose option to runtests.sh that the tinderbox scripts can use to get all the warnings and errors and whatnot into the build log. Also corrected several syntax and logic errors in the 1.t test file.
git-svn-id: svn://10.0.0.236/trunk@102139 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 03:06:15 +00:00
cls%seawood.org
53dd271077 Use PR_TRUE instead of true. Should fix OS/2 & AIX bustage.
git-svn-id: svn://10.0.0.236/trunk@102136 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 01:14:56 +00:00
rogerl%netscape.com
32a2685e57 Adding Date package.
git-svn-id: svn://10.0.0.236/trunk@102135 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 01:10:57 +00:00
mscott%netscape.com
3f16112777 Bug #97835 --> don't linkify words with @ signs in them unless they have a '.' somewhere after the space.
r=varada
sr=sspitzer
a=asa


git-svn-id: svn://10.0.0.236/trunk@102134 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 00:57:07 +00:00
gerv%gerv.net
7153c99508 Added units to font size pref panel and fixed visual glitch in DPI dropdown. Bug 89842 and bug 96339. r=bzbarsky, sr=blake, a=asa.
git-svn-id: svn://10.0.0.236/trunk@102133 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 00:18:20 +00:00
jake%acutex.net
67916924a4 Fix for bug 42810 - Bugzilla would choke if your product name contained a ' mark.
Patch by Christian Reis <kiko@async.com.br>
r= justdave@syndicomm.com, caillon@returnzero.com


git-svn-id: svn://10.0.0.236/trunk@102132 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 23:51:35 +00:00
zach%zachlipton.com
e9b4cc2993 Fix for bug 96603: Grammatical error in bug_status.html. Simple one word fix.
Patch by Christopher Aillon (caillon@returnzero.com). r1=Christian Reis (kiko@async.com.br),
r2=Zach Lipton (zach@zachlipton.com) though not really needed for this patch.


git-svn-id: svn://10.0.0.236/trunk@102131 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 23:37:36 +00:00
jst%netscape.com
cee6d8af23 Fixing bug 96489. tablerow.insertCell() not returning cell object, patch by Fabian <hidday@geocities.com>, r=peterv@netscape.com, sr=jst@netscape.com, a=blizzard@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@102130 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 23:31:31 +00:00
hewitt%netscape.com
1238729448 97487 - breaking up the mail css files, r=mscott, sr=sspitzer, a=asa
git-svn-id: svn://10.0.0.236/trunk@102129 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 23:31:29 +00:00
cotter%netscape.com
b3854ecb73 privacy & security help content updates per b=85925, a=asa, r=oeschger
git-svn-id: svn://10.0.0.236/trunk@102127 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 23:23:23 +00:00
bryner%netscape.com
f765adcc8e Bug 95556 - removing obsolete native textarea widget. r=jag, sr=blizzard, a=blizzard.
git-svn-id: svn://10.0.0.236/trunk@102126 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 23:10:11 +00:00
sspitzer%netscape.com
11fde75df3 97487 - breaking up the mail css files, r=mscott, sr=sspitzer, a=asa
git-svn-id: svn://10.0.0.236/trunk@102125 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 23:08:29 +00:00
av%netscape.com
c8299ff2f4 Removing no longer needed file in the sample code -- not part of the build
git-svn-id: svn://10.0.0.236/trunk@102124 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 23:04:14 +00:00
hewitt%netscape.com
f5b2b07d8b 97487 - breaking up the mail css files, r=mscott, sr=sspitzer, a=asa
git-svn-id: svn://10.0.0.236/trunk@102123 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 23:00:31 +00:00
av%netscape.com
a84571a019 Bug 97488 -- sample code to reflect new approach to scripting, not part of the build, patch by jband and av, r=av
git-svn-id: svn://10.0.0.236/trunk@102122 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 23:00:11 +00:00
yokoyama%netscape.com
f8474b312c Bug 40469:
Using proper UTF8toUCS2 converter
r/sr=vidur; /a=asa


git-svn-id: svn://10.0.0.236/trunk@102121 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 22:56:50 +00:00
sspitzer%netscape.com
7d9c68c6e2 97487 - breaking up the mail css files, r=mscott, sr=sspitzer, a=asa
git-svn-id: svn://10.0.0.236/trunk@102120 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 22:50:54 +00:00
varada%netscape.com
84aba2fece fix for regression 95041-new to field for compose window;r=prass;sr=sspitzer;a=asa
git-svn-id: svn://10.0.0.236/trunk@102119 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 22:48:10 +00:00
ftang%netscape.com
03ebccc4d6 fix bug 56863. r=blizzard sr=jst a=asa
make about:plugins localizable.


git-svn-id: svn://10.0.0.236/trunk@102118 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 22:47:53 +00:00
blizzard%redhat.com
4505a49947 Bug #95940. Make sure that the embed reload flags are in sync for the widget and the nsIWebNavigation interfaces in a backwards compatible way. r=valeski,sr=shaver, a=asa
git-svn-id: svn://10.0.0.236/trunk@102117 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 22:47:02 +00:00
ftang%netscape.com
9e6b40f91d fix 56863. r=blizzard sr=jst. add plugins.properties to the jar.mn
git-svn-id: svn://10.0.0.236/trunk@102116 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 22:46:28 +00:00
ftang%netscape.com
d340645616 fix bug 56863. add plugins.properties to the list. r=blizzard sr=jst
git-svn-id: svn://10.0.0.236/trunk@102115 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 22:44:17 +00:00
ftang%netscape.com
9b693fe654 fix bug 56863. r=blizzard sr=jst
not part of the build yet, won't break the tree


git-svn-id: svn://10.0.0.236/trunk@102114 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 22:43:11 +00:00
sspitzer%netscape.com
a4bce1013a removing dead editor files. these moved under mac and win a while ago. r/sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@102113 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 22:40:29 +00:00
hewitt%netscape.com
8edbad1afa 97487 - breaking up the mail css files, r=mscott, sr=sspitzer, a=asa
git-svn-id: svn://10.0.0.236/trunk@102112 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 22:37:44 +00:00
nicolson%netscape.com
ecb048a49e copyright notice.
git-svn-id: svn://10.0.0.236/trunk@102111 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 22:35:58 +00:00
hewitt%netscape.com
c6b3c28507 97487 - splitting up mail css files, r=mscott, sr=sspitzer, a=asa
git-svn-id: svn://10.0.0.236/trunk@102110 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 22:34:50 +00:00
sspitzer%netscape.com
05e11894fb breaking apart EditorToolbars.css into 3 files for performance reasons.
r=manske, sr=hewitt, a=asa #97487


git-svn-id: svn://10.0.0.236/trunk@102109 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 22:27:06 +00:00
hewitt%netscape.com
544c089c8b 97487 - splitting up mail css files, r=mscott, sr=sspitzer, a=asa
git-svn-id: svn://10.0.0.236/trunk@102108 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 22:20:37 +00:00
sspitzer%netscape.com
fedf03def5 breaking apart EditorToolbars.css into 3 files for performance reasons.
r=manske, sr=hewitt, a=asa #97487


git-svn-id: svn://10.0.0.236/trunk@102107 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 22:09:38 +00:00
sspitzer%netscape.com
db9465906c breaking apart EditorToolbars.css into 3 files for performance reasons.
r=manske, sr=hewitt, a=asa #97487


git-svn-id: svn://10.0.0.236/trunk@102106 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 22:04:19 +00:00
jband%netscape.com
25a16ec622 fix bug 97555. Need to get the correct value of staep into the iterator object when we fail during enumeration init. r=jst sr=brendan a=asa
git-svn-id: svn://10.0.0.236/trunk@102105 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 21:48:18 +00:00
waterson%netscape.com
e71914d177 Bug 97828. Be sure to create the static component loader before putting it into mLoaderData array. r=dp, sr=jband/sfraser, a=asa
git-svn-id: svn://10.0.0.236/trunk@102104 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 21:45:58 +00:00
myk%mozilla.org
ef156af3ff Fix for bug 97764: Fixes errant sending of mail on attachment changes to users who do not want to receive mail about their own changes.
Patch by Jake <jake@acutex.net>.
r=myk@mozilla.org; no second review needed.


git-svn-id: svn://10.0.0.236/trunk@102103 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 21:40:33 +00:00
cmanske%netscape.com
b4652869c1 Fixed getting fileBaseName and fileExtension parts of nsIOService::ExtactUrlPart(), b=97679, r=dougt, sr=darin, a=bizzard for drivers
git-svn-id: svn://10.0.0.236/trunk@102102 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 21:37:30 +00:00
sgehani%netscape.com
cdc4a6020c Show "homepage override URL" once every time milestone changes even for
existing profiles.

b=97220; r=jag,dveditz; sr=mscott; a=blizzard


git-svn-id: svn://10.0.0.236/trunk@102101 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 21:34:52 +00:00
brendan%mozilla.org
a30fcf3fcb Fix 97540, r=rginda, sr=jband, a=asa:
- The most significant fix, to keep JSStackFrame.spbase, the operand stack base pointer for an active frame, null except when there is an operand stack allocated and in use by js_Interpret.  Previously, spbase would point after args and local vars (if any), then advance upon allocation of the (possibly discontiguous) operand stack space.  This made for a fatal ambiguity: js_AllocStack, called by XPConnect, could not tell when there was allocated operand stack space above the frame's sp, which needs to be set to a known (JSVAL_VOID) state for exact GC to work.  Now, the GC doesn't have to mark any operand stack space for a frame whose spbase is null, and js_AllocStack doesn't need to void any unused space for such a frame.

- Fixes to reload the JSRuntime's callHook or executeHook after calling or executing, in case the debugger removes the hook.  In which case, it must clean up any dynamic memory held by hookData, but in any event, in which case the engine must not call the post-call or post-execute hook.

- While debugging with rginda, I was horrified to see his trivial testcase function, expressed as a lambda, fail to be invoked using the "inline_call" machinery in js_Interpret (which avoids js_Interpret recursion through js_Invoke for most JS functions).  The problem was a test of fun->flags == 0 conditioning the /* inline_call: */ code.  Since that test was written, at least one JSFUN_* flag (JSFUN_LAMBDA, used only for pretty-printing or accurate decompilation) has been added.  But all along, that test was an over-optimization (testing against 0 without &'ing certain flags), making for an accident waiting to happen -- which did happen.  The relevant flags are JSFUN_HEAVYWEIGHT (set by the compiler when a function calls eval, uses with, or otherwise needs an activation object for its scope; if lightweight, the compiler can see the function's scope and eliminate it via specialized bytecodes) and JSFUN_BOUND_METHOD (for Java method calls, where |this| binds statically to the instance, not dynamically to the calling expression reference's base object, as in JS).


git-svn-id: svn://10.0.0.236/trunk@102100 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 21:25:26 +00:00
heikki%netscape.com
1a511b33d0 Mac project change for bug 93574, nsLoggingSink and nsHTMLNullSink should not be a part of the optimized build.
git-svn-id: svn://10.0.0.236/trunk@102099 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 21:24:07 +00:00
harishd%netscape.com
f4d6d67500 96031 - Made LI's parent model to be flow entity. This would allow inline elements, such as I,B,FONT, etc., to contain LI such that bullets / numbers would also inherit the parent properties.
93574 -  nsLoggingSink and nsHTMLNullSink  should not be a part of the optimized build. Wrapped 'em under MOZ_DEBUG flag.
r=heikki, sr=vidur, a=asa.


git-svn-id: svn://10.0.0.236/trunk@102098 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 21:22:16 +00:00
loadrunner%betak.net
b46493006c bug 56304, HTML ja signature displays as garbage in the mail body, r=ducarroz, sr=sspitzer, a=asa
git-svn-id: svn://10.0.0.236/trunk@102097 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 21:06:18 +00:00
mstoltz%netscape.com
7bf513acb6 Bug 92061 - allow javascript: URLs to be targeted at about:blank windows.
Relaxing too-strict security policy. r=rginda, sr=jst, a=asa


git-svn-id: svn://10.0.0.236/trunk@102096 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 21:01:10 +00:00
varada%netscape.com
4d37cdc039 fix for 79053-regression- sendpage and sendlink should use correct identity;r,sr=sspitzer;a=asa;
git-svn-id: svn://10.0.0.236/trunk@102095 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 20:49:00 +00:00
oeschger%netscape.com
75ff308a3e tooltip text update, a=asa, b=96030, r=hewitt
git-svn-id: svn://10.0.0.236/trunk@102093 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 20:41:12 +00:00
evaughan%netscape.com
dfdd585293 b=83805
r=saari
sr=hyatt
a=dbaron

Fixes a divide by 0 bug in the scrollbar.


git-svn-id: svn://10.0.0.236/trunk@102092 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 20:37:56 +00:00
dcone%netscape.com
57698c0e11 b=97461 r=rods sr=attinasi a=chofmann. Look for null device and will exit with error if it is null
git-svn-id: svn://10.0.0.236/trunk@102091 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 20:15:34 +00:00
waterson%netscape.com
388df343a1 Bug 55086. Be sure to position child views, too! r=dbaron, sr=attinasi, a=blizzard.
git-svn-id: svn://10.0.0.236/trunk@102090 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 20:14:31 +00:00
mcafee%netscape.com
bcd21a2afd Fixing test for BuildTag, we weren't pulling by date in the normal case
git-svn-id: svn://10.0.0.236/trunk@102089 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 19:36:35 +00:00
peterlubczynski%netscape.com
f55b5f439b Patch to fix incorrect coordinates to first call of SetWindow(), bug 97656 r=av sr=attinasi a=asa
git-svn-id: svn://10.0.0.236/trunk@102088 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 18:28:04 +00:00
dp%netscape.com
7eaf054651 bug# 97770 fixing tree orange due to crash on unload
git-svn-id: svn://10.0.0.236/trunk@102087 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 17:45:51 +00:00
zach%zachlipton.com
cfad5a114f Adding runtests.sh and 1.t to start the testing suite. No bug has been
filed on this issue. NOT_PART_OF_BUILD.


git-svn-id: svn://10.0.0.236/trunk@102086 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 17:41:38 +00:00
cotter%netscape.com
e41a6630e1 security & privacy help content updates per b=85925, a=asa, r=oeschger
git-svn-id: svn://10.0.0.236/trunk@102082 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 12:17:32 +00:00
axel%pike.org
3a8484e179 fix for bug 97581, <xsl:variable name="foo" /> needs to be "", r=peterv, sr=jst, a=dbaron
git-svn-id: svn://10.0.0.236/trunk@102081 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 08:55:04 +00:00
rpotts%netscape.com
991a9fc8f4 removed default value from FlushPendingEvents(...) boolean argument. This was introduced by the patch for bug #97227
git-svn-id: svn://10.0.0.236/trunk@102080 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 08:13:16 +00:00
mcafee%netscape.com
bde40d9113 Back to jrgm server, cowtools not ready yet. r=jrgm
git-svn-id: svn://10.0.0.236/trunk@102079 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 06:50:15 +00:00
pschwartau%netscape.com
aeb3e52231 Corrected testcase so it will work in Rhino as well as SpiderMonkey.
git-svn-id: svn://10.0.0.236/trunk@102078 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 06:10:13 +00:00
justdave%syndicomm.com
0a54592e93 Fix for bug 97721: Bugzilla now requires Perl 5.005 (previous requirement was Perl 5.004). This is due to the use of Template Toolkit for templatizing the pages for easier local customization. The new attachment tracker that was checked in earlier tonight uses the templates. Also included on this patch is a check for AppConfig, which is a prerequisite for Template Toolkit, because the Makefile.PL for Template Toolkit won't run without it, and it doesn't tell CPAN that it has prereqs, which causes confusion if you're installing from CPAN.
Patch by Dave Miller <justdave@syndicomm.com>
r= myk@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@102075 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 06:08:43 +00:00
justdave%syndicomm.com
4aaf91f5f6 Fix for bug 75840: syncshadowdb -syncall now properly shuts down Bugzilla during the sync process so mysql doesn't get overloaded while the tables are locked. This patch also adds some funtionality to the script to allow you to specify an alternate temp directory on the command line, in case you have a large database and need it made to a different filesystem for space reasons.
Patch by Dawn Endico <endico@mozilla.org> and Jake Steenhagen <jake@acutex.net>
r= justdave@syndicomm.com


git-svn-id: svn://10.0.0.236/trunk@102074 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 05:49:01 +00:00
nelsonb%netscape.com
611393a6b4 Allow the 5 new DHE cipher suites to be selected with the -c command line
option.  Facilitates testing of bug 95987.


git-svn-id: svn://10.0.0.236/trunk@102073 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 04:29:45 +00:00
dbaron%fas.harvard.edu
9a632e0396 Undoing backout of bug 97227 because valeski and rpotts insist. I guess drivers aren't doing approvals after all.
git-svn-id: svn://10.0.0.236/trunk@102072 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 04:28:26 +00:00
myk%mozilla.org
d3793613de Fix for bug 84338: initial implementation of attachment tracker, which lets users flag attachments with statuses.
Patch by Myk Melez <myk@mozilla.org>
r=justdave@syndicomm.com


git-svn-id: svn://10.0.0.236/trunk@102068 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 04:19:32 +00:00
cmanske%netscape.com
eef2c0d59c Fixed convert to table bugs in Composr, b=82404,82408,82409,96839 r=brade, sr=kin, a=dbaron
git-svn-id: svn://10.0.0.236/trunk@102067 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 04:09:23 +00:00
mstoltz%netscape.com
626f878a47 Bug 92955 - Option to disable window.open from onLoad/onUnload event
handlers. r=harishd@netscape.com, sr=jst@netscape.com, a=brendan@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@102066 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 04:06:39 +00:00
myk%mozilla.org
9f3ec3f125 Fix for bug 84338: initial implementation of attachment tracker, which lets users flag attachments with statuses.
Patch by Myk Melez <myk@mozilla.org>
r=justdave@syndicomm.com


git-svn-id: svn://10.0.0.236/trunk@102065 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 03:54:37 +00:00
dbaron%fas.harvard.edu
5f0d92745b Backing out unapproved checkin for bug 97227. a=brendan,blizzard
git-svn-id: svn://10.0.0.236/trunk@102064 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 03:45:20 +00:00
mkaply%us.ibm.com
985a1d4d1a #64594
r=mkaply, sr=blizzard, a=asa for drivers
OS/2 only - do the right thing when cancel is pressed in print dialog


git-svn-id: svn://10.0.0.236/trunk@102063 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 03:12:16 +00:00
kaie%netscape.com
7126aad3e7 b=94026 r=law sr=hewitt a=dbaron
Changing UI string


git-svn-id: svn://10.0.0.236/trunk@102062 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 03:10:35 +00:00
mkaply%us.ibm.com
8e0e9ddb1e No bug
r=mkaply, sr=blizzard, a=asa for drivers
OS/2 only - don't use bitmap fonts on printers


git-svn-id: svn://10.0.0.236/trunk@102061 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 03:10:26 +00:00
mkaply%us.ibm.com
6974a5b5ea #58637
r=mkaply, sr=blizzard, a=asa for drivers
OS/2 only - The best UTF-8/Unicode support we can do


git-svn-id: svn://10.0.0.236/trunk@102060 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 03:08:10 +00:00
mkaply%us.ibm.com
b365e44fd8 #62175
r=mkaply, sr=blizzard, a=asa for drivers
OS/2 only - Code from Javier - more font rewrite - better parsing of names


git-svn-id: svn://10.0.0.236/trunk@102059 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 03:06:33 +00:00
jst%netscape.com
6204690056 Fixing bug 82027, problems with accessing window.history[x] from JS. r=mstoltz@netscape.com, sr=jband@netscape.com a=dbaron@fas.harvard.edu
git-svn-id: svn://10.0.0.236/trunk@102058 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 02:36:45 +00:00
rpotts%netscape.com
d782201ee6 fixed typo from checkin for bug #97227
git-svn-id: svn://10.0.0.236/trunk@102057 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 02:30:34 +00:00
ddrinan%netscape.com
9efc75bd1f Checking in for rangansen. Bug 96646 - hardcoded string. r=ddrinan,sr=hewitt,a=dbaron
git-svn-id: svn://10.0.0.236/trunk@102056 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 02:30:27 +00:00
ddrinan%netscape.com
8bfb07662f Checking in for rangansen. Bug 94179 - password quality meter broken. r=jrgm,sr=hewitt,a=dbaron
git-svn-id: svn://10.0.0.236/trunk@102055 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 02:25:14 +00:00
ddrinan%netscape.com
7ea0de2780 Checking in for walk84. Bug 91799 - add align=center to fix layout problem. r=rangansen,sr=hewitt,a=dbaron
git-svn-id: svn://10.0.0.236/trunk@102054 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 02:15:48 +00:00
ddrinan%netscape.com
eab52123ee Check in for rangansen. Bug 91453 - double click on cert container text. r=ddrinan,sr=hewitt,a=dbaron
git-svn-id: svn://10.0.0.236/trunk@102053 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 02:10:00 +00:00
heikki%netscape.com
ed11ca9ba1 Bug 96459, bug 96307 and Bugscape 8288. Implement readyState and onreadystatechange members to enable progress indicators for download. Make it possible to call send() again in onload without crashing. Send load event only after everything done (was sent too early if XML errors). Make some functions throw error if called at the wrong time (match IE). Make it possible to build SOAP again (patch from peterv, r=heikki). r=harishd, sr=vidur, a=asa.
git-svn-id: svn://10.0.0.236/trunk@102052 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 00:59:19 +00:00
rpotts%netscape.com
cc3f3871a3 fix build bustage from bug #97227
git-svn-id: svn://10.0.0.236/trunk@102051 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 00:49:30 +00:00
myk%mozilla.org
4c13c0bada Fix for bug 26189: "cannot view images with lxr". The image-handling code was running too early and didn't have access to the "raw" URL parameter by which images get displayed.
Patch by Dawn Endico <endico@mozilla.org>
r=myk@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@102050 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 00:46:09 +00:00
bryner%netscape.com
8c02bfede8 Bug 97518 - for fast-update, do a regular checkout of NSS since it's on a static tag. r=cls, a=asa.
git-svn-id: svn://10.0.0.236/trunk@102049 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 00:36:37 +00:00
relyea%netscape.com
ec274578f2 Fix solaris build breakage: make functions in pk11pars.h static (at least until I can move them into their own library).
git-svn-id: svn://10.0.0.236/trunk@102048 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 00:34:55 +00:00
relyea%netscape.com
eaf7d30cd9 1) Add the necessary code so that AddModule functions again.
2) Add code to create secmod.db on the fly again.
3) Fix uninitialized structures so that we can switch to the fips token.

The results of this checkin should allow the fips tests to pass again.


git-svn-id: svn://10.0.0.236/trunk@102047 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 00:20:47 +00:00
hewitt%netscape.com
5ef12d98c6 74886 - need classic and modern icons for news message with attachment, a=dbaron
git-svn-id: svn://10.0.0.236/trunk@102046 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 00:14:41 +00:00
hewitt%netscape.com
ddff7eadfe 83222 - offline:Mac - GUI - offline indicator hidden in message window, r=ben, sr=hyatt, a=dbaron
git-svn-id: svn://10.0.0.236/trunk@102045 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 00:12:56 +00:00
hewitt%netscape.com
46796d6200 88970 - Need icons for newsgroup pane icons for messages which have been downloaded for offline use, r=blake, sr=sspitzer, a=dbaron
git-svn-id: svn://10.0.0.236/trunk@102044 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-31 00:08:06 +00:00
mcafee%netscape.com
e306638d53 switching layout server. r=jrgm
git-svn-id: svn://10.0.0.236/trunk@102043 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 23:59:47 +00:00
rpotts%netscape.com
fc16d6b127 fix build bustage from bug #97227
git-svn-id: svn://10.0.0.236/trunk@102042 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 23:35:50 +00:00
dp%netscape.com
34845f7872 bug #97658 Fixing build blocker. fixing js components after component registry has been
created r=gagan


git-svn-id: svn://10.0.0.236/trunk@102041 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 22:59:12 +00:00
justdave%syndicomm.com
11464d9925 Fix for bug 96534: The version, component, and milestone select lists on the query page were slow to reflow when you changed the product in the first select list. This patch is a complete rewrite from scratch of the javascript used on query.cgi, which results in an approximately 700% speed increase in the reflow time when changing the selected product.
Patch by Chris Lahey <clahey@ximian.com> and Christian Reis <kiko@async.com.br>
Javascript changes r= caillon@returnzero.com, louie@ximian.com
Perl changes r= jake@acutex.net, justdave@syndicomm.com


git-svn-id: svn://10.0.0.236/trunk@102040 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 22:56:53 +00:00
rpotts%netscape.com
3d787fbce9 bug #97227 (r=valeski, sr=vidur). This patch makes all calls to nsIWebBrowserChrome::SetStatus(...) display synchronously.
git-svn-id: svn://10.0.0.236/trunk@102039 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 21:47:45 +00:00
mcgreer%netscape.com
2bf4000b2e fix problem with bad hashes
git-svn-id: svn://10.0.0.236/trunk@102037 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 21:07:26 +00:00
rayw%netscape.com
130c0de7d7 Fixed makefile so I can build idl under linux.
git-svn-id: svn://10.0.0.236/trunk@102036 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 20:39:36 +00:00
pschwartau%netscape.com
c9ad49f4ff Initial add.
git-svn-id: svn://10.0.0.236/trunk@102034 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 19:55:05 +00:00
mcgreer%netscape.com
df3bb306e1 make e-certify certs trusted
git-svn-id: svn://10.0.0.236/trunk@102032 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 19:12:52 +00:00
kestes%walrus.com
bea9dfe68d merge this sample with code I am really using, to demonstrate how to build
tar files for each build and use the -D in CVS.


git-svn-id: svn://10.0.0.236/trunk@102029 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 18:54:25 +00:00
mcgreer%netscape.com
babe2224c4 exchange e-certify roots on the tip
git-svn-id: svn://10.0.0.236/trunk@102028 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 18:51:32 +00:00
dp%netscape.com
dd5adbe141 bug# 96701 Using an array instead of hash table to store loader
data. Storing index into loader data array rather than allocating and
copying the type string. r=dougt, sr=jband, a=asa


git-svn-id: svn://10.0.0.236/trunk@102024 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 14:10:41 +00:00
mcafee%netscape.com
038f8175c7 Adding ifdef to turn JS dump() on w/o the need of a pref (96924). r=cls, sr=jst, a=asa
git-svn-id: svn://10.0.0.236/trunk@102023 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 08:07:07 +00:00
naving%netscape.com
13301d0e80 97246 r=suresh sr=mscott a=asa. check m_runningUrl for null because OnStopRequest may be called after
socket is closed.
97553 r=cavin sr=mscott a=asa. Increase the copy buffer size from 4k to 16K because fileTransport can
give us upto 16k, should make copying of local messages faster.


git-svn-id: svn://10.0.0.236/trunk@102022 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 06:09:06 +00:00
pierre%netscape.com
6598c447da Bug 40546"Background color of HTML mail not shown". Set the default color onto the HTML instead of the BODY because mailheader.css is loaded as an !important stylesheet. r=ducarroz/glazman/dbaron, a=asa
git-svn-id: svn://10.0.0.236/trunk@102021 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 06:03:52 +00:00
hyatt%netscape.com
827211d542 Fix for 97544, r/sr=blake,ben, a=asa
git-svn-id: svn://10.0.0.236/trunk@102020 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 05:37:16 +00:00
cmanske%netscape.com
6594d88dea Fixed not being able to use Insert Characters dialog after closing using 'X' to close window, b=96891, r=jrgm, sr=kin, a=asa
git-svn-id: svn://10.0.0.236/trunk@102018 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 05:25:58 +00:00
morse%netscape.com
c7021ee790 bug 95357, loss of data in password manager, r/sr=waterson,darin, a=asa
git-svn-id: svn://10.0.0.236/trunk@102017 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 05:23:14 +00:00
kaie%netscape.com
20829b8b2f b=95988 r=relyea sr=tor a=asa
Fix crash when viewing a certificate


git-svn-id: svn://10.0.0.236/trunk@102016 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 05:21:59 +00:00
waterson%netscape.com
245ff246c0 Fix more debug-only win32 bustage.
git-svn-id: svn://10.0.0.236/trunk@102015 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 04:42:01 +00:00
waterson%netscape.com
5b36300e85 Fix debug-only win32 bustage.
git-svn-id: svn://10.0.0.236/trunk@102014 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 04:33:27 +00:00
wtc%netscape.com
cdb805bcdc Bugzilla bug 97456: fixed build error on BSD/OS 4.3 (beta3). The patch
is contributed by lidl@pix.net.


git-svn-id: svn://10.0.0.236/trunk@102013 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 04:18:23 +00:00
mscott%netscape.com
a9e20ac54e Bug #97486 --> be sure to clear out the server prefs when deleting an smtp server
r=bhuvan
sr=sspitzer
a=asa


git-svn-id: svn://10.0.0.236/trunk@102011 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 03:32:44 +00:00
mkaply%us.ibm.com
0515fcc046 #97490
r=mkaply, sr=blizzard, a=asa for drivers
OS/2 only - Code from Javier - don't hardcode pixels to twips,
and don't draw 0 height or width rectangles


git-svn-id: svn://10.0.0.236/trunk@102009 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 03:22:24 +00:00
jake%acutex.net
41bed25910 Fix for bug 28736 - Bugmail will now show the summary for the bug that changed in the "This bug depends on bug X, which changed state" messages.
Patch by Matthew Tuck <matty@chariot.net.au>
r= jake@acutex.net


git-svn-id: svn://10.0.0.236/trunk@102007 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 03:14:24 +00:00
sdagley%netscape.com
5aab49194b Fix #71568 - Indicate if browser is running under Mac OS X in the UA string. r=pinkerton,sr=darin,a=asa
git-svn-id: svn://10.0.0.236/trunk@102006 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 02:58:03 +00:00
waterson%netscape.com
e410113dcd Bug 95675. Make sure server counts update after twisty open/close. Needed to remove container/member support from conflict set, too. Also, add a bunch of debugging junk. r=varga@utcru.sk, sr=hyatt, a=roc+moz
git-svn-id: svn://10.0.0.236/trunk@102005 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 02:29:05 +00:00
mstoltz%netscape.com
427c5f13ad New set of restrictions on the DOM in mailnews to prevent several
kinds of privacy attacks. Uses new wildcard policy functionality.
Fixes 87395 and 84545. r=harishd, sr=jst, a=asa.


git-svn-id: svn://10.0.0.236/trunk@102004 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 02:27:50 +00:00
waterson%netscape.com
536ed37947 Also need to export original NS_NewGenericModule() symbol.
git-svn-id: svn://10.0.0.236/trunk@102003 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 02:20:48 +00:00
despotdaemon%netscape.com
11fb7d65a4 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@102002 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 02:11:13 +00:00
despotdaemon%netscape.com
0e241ac7a2 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@102001 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 02:10:34 +00:00
despotdaemon%netscape.com
cc7682ee11 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@102000 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 02:04:20 +00:00
despotdaemon%netscape.com
ae57f21086 Pseudo-automatic update of changes made by endico@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@101999 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 02:03:26 +00:00
darin%netscape.com
87cb48a91b fixes bug 92675 "Half or less images load on www.businessweek.com / Links don't work"
r=bbaetz, sr=dougt, a=asa


git-svn-id: svn://10.0.0.236/trunk@101998 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 01:37:31 +00:00
darin%netscape.com
c07308d0f9 fixes bug 93924 "PAC - dnsResolve should have one-element cache"
patch=tingley@sundell.net r=bbaetz, sr=darin, a=roc+moz


git-svn-id: svn://10.0.0.236/trunk@101997 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 01:35:26 +00:00
hyatt%netscape.com
3cade25d40 CHecked in the wrong version of my patch for 71143. This is the one attached to the bug.
git-svn-id: svn://10.0.0.236/trunk@101996 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 01:27:37 +00:00
hyatt%netscape.com
d094e351ad CHecked in the wrong version of my patch for 71143. This is the one attached to the bug.
git-svn-id: svn://10.0.0.236/trunk@101995 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 01:27:21 +00:00
cls%seawood.org
37a108b0dc Update REQUIRES so that we do not accidentally build using the system headers of jpeg,zlib,png,mng when we are supposed to be building using the Mozilla copies of these libraries.
Bug #97386 r=mcafee a=dbaron


git-svn-id: svn://10.0.0.236/trunk@101994 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 01:14:45 +00:00
morse%netscape.com
d45aad079a bug 97414, localization of datestring in view->pageinfo window, r=pchen, sr=kin, a=asa
git-svn-id: svn://10.0.0.236/trunk@101993 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 00:37:57 +00:00
wtc%netscape.com
3f603986fe Bugzilla bug 95784: added _PR_CleanupLayerCache and call it from
PR_Cleanup.  The patch is contributed by jeff@NerdOne.com.
Modified files: primpl.h, prlayer.c, prinit.c, ptthread.c.


git-svn-id: svn://10.0.0.236/trunk@101992 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-30 00:35:00 +00:00
wtc%netscape.com
287d568a3b Bugzilla bug 95668: added _PR_CleanupThreads and call it from PR_Cleanup.
The patch is contributed by jeff@NerdOne.com.
Modified files: primpl.h, prinit.c, pruthr.c.


git-svn-id: svn://10.0.0.236/trunk@101991 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 23:52:14 +00:00
attinasi%netscape.com
7b0e78aec3 Trying to fix WIN32 bustage...
git-svn-id: svn://10.0.0.236/trunk@101990 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 23:51:38 +00:00
pschwartau%netscape.com
cd4a48b840 Trivial whitespace change.
git-svn-id: svn://10.0.0.236/trunk@101989 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 23:34:32 +00:00
pschwartau%netscape.com
f4b901f5b4 Initial add.
git-svn-id: svn://10.0.0.236/trunk@101988 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 23:20:16 +00:00
wtc%netscape.com
813386fc81 Bugzilla bug 95659: added _PR_CleanupStacks(), which is called from
PR_Cleanup().  The patch is contributed by jeff@NerdOne.com.
Modified files: primpl.h, prinit.c, prustack.c


git-svn-id: svn://10.0.0.236/trunk@101987 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 23:13:41 +00:00
attinasi%netscape.com
69aebe1a55 Inline images no longer break text runs. b=32191 r=bernd,dbaron sr=waterson a=asa(obod)
git-svn-id: svn://10.0.0.236/trunk@101986 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 22:59:09 +00:00
hyatt%netscape.com
d0cbdf337d Fix for 96920, r=pink, sr=ben, a=dbaron
git-svn-id: svn://10.0.0.236/trunk@101983 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 22:33:18 +00:00
hyatt%netscape.com
298a4af017 fix for 71143. r=markh, sr=ben, a=roc
git-svn-id: svn://10.0.0.236/trunk@101981 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 22:31:38 +00:00
bnesse%netscape.com
36733ec112 Fix for bug 64964. Eliminate assertions by checking for 0 length string first. r=ccarlen, sr=sfraser,a=asa.
git-svn-id: svn://10.0.0.236/trunk@101980 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 22:26:37 +00:00
bnesse%netscape.com
928bf74900 Fix for bug 96514. Don't return bogus values from preferences when no default preference exists. patch=ccarlen, r=bnesse,sr=sfraser,a=dbaron.
git-svn-id: svn://10.0.0.236/trunk@101979 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 22:22:52 +00:00
sspitzer%netscape.com
4a56866680 fix for #97305. double clicking on folder pane scroll bar area can sometimes open
a new 3 pane.  r=varada, sr=mscott, a=asa


git-svn-id: svn://10.0.0.236/trunk@101978 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 22:14:18 +00:00
waterson%netscape.com
42e83067a0 Bug 96910. Restore NS_NewGenericModule() entry point for backwards compatibility. r=dougt, sr=jband, a=asa
git-svn-id: svn://10.0.0.236/trunk@101976 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 21:59:43 +00:00
pchen%netscape.com
3e7ec47037 bug 82983, r=jag, sr=ben, don't pass a name for bookmarks properties dialog so that we don't try to reuse an existing dialog, also set dialog as dependent so that properties dialogs will go away when the bookmarks window gets closed
git-svn-id: svn://10.0.0.236/trunk@101975 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 21:58:04 +00:00
justdave%syndicomm.com
9ad00e307b Bumping version to 2.15 for development
git-svn-id: svn://10.0.0.236/trunk@101972 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 21:41:50 +00:00
andreas.otte%primus-online.de
b4b6bc4e34 fix bug 85500 [Mozilla includes # anchors in GET URI in some cases] we were searching the first # from the right not the left to cut of the ref part of the requested uri. r=darin sr=rpotts a=dbaron
git-svn-id: svn://10.0.0.236/trunk@101971 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 21:39:21 +00:00
hwaara%chello.se
8920fbf77e #17943, "Messages sent later, are retrieved as READ status in POP account."
Checking this patch in for Chao Yu <chao.b.yu@intel.com>.

r=hwaara, sr=mscott, a=dbaron


git-svn-id: svn://10.0.0.236/trunk@101970 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 21:35:01 +00:00
pinkerton%netscape.com
836c5888a3 turn on extension filtering for fizzilla. allow packages to be chosen when filter is *. r=pchen/sr=sfraser/a=dbaron. bug# 91021
git-svn-id: svn://10.0.0.236/trunk@101969 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 21:34:14 +00:00
kin%netscape.com
6f9f127fbd Fix for bug 83607: too much backspace segfaults mozilla in textbox forms
Prevent GetPriorNode() and GetNextNode() from traversing above root
node when aCurrentNode is the rootNode.

r=brade@netscape.com  sr=sfraser@netscape.com  a=asa@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@101968 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 21:33:52 +00:00
pinkerton%netscape.com
e954753b82 bulletproof SetCursor() calls for osx. r=pchen/sr=sfraser/a=dbaron. bug 97302.
git-svn-id: svn://10.0.0.236/trunk@101967 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 21:33:17 +00:00
pschwartau%netscape.com
6940681e03 Removed a few hundred || conditions. See comment 2001-08-29 12:00 in bug 89443.
git-svn-id: svn://10.0.0.236/trunk@101964 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 20:37:58 +00:00
justdave%syndicomm.com
3c6be8b594 moving version to 2.14 (golden) to roll the tarball.
git-svn-id: svn://10.0.0.236/trunk@101962 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 19:52:13 +00:00
jake%acutex.net
8ca80bdde1 Updating release notes for 2.14
Release Notes written by Matthew Tuck <matty@chariot.net.au>
r= justdave@syndicomm.com, jake@acutex.net


git-svn-id: svn://10.0.0.236/trunk@101961 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 19:39:01 +00:00
barnboy%trilobyte.net
ddb8a37e26 Typo in perl modify string, added "#!" to /usr/bin/perl strings.
git-svn-id: svn://10.0.0.236/trunk@101960 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 18:13:42 +00:00
barnboy%trilobyte.net
7573dc0eaf Buncha' release updates. Moved all images to
./images so we don't have multiple copies of the
same image, fixed these doc bugs (in no particular order):
94949
97070
97071
97114
96498
95970
96677
94953
96501
96679
97068
97191
97192


git-svn-id: svn://10.0.0.236/trunk@101950 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 17:25:41 +00:00
kestes%walrus.com
e8e038399d *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@101949 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 16:07:08 +00:00
ccarlen%netscape.com
f541af3c70 Fixing senna requires bustage.
git-svn-id: svn://10.0.0.236/trunk@101948 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 15:33:31 +00:00
cmanske%netscape.com
d130aa6848 Fixed busted error message dialog and command handling in Composer ColorPicker, b=86697, r=brade, sr=kin, a=roc+moz
git-svn-id: svn://10.0.0.236/trunk@101947 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 14:04:40 +00:00
ccarlen%netscape.com
d182837840 Bug 86021 - Enable -turbo for multiple profiles. r=valeski, r=/sr=blake,waterson, a=dbaron
git-svn-id: svn://10.0.0.236/trunk@101946 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 14:02:38 +00:00
pierre%netscape.com
cca63eef69 Bug 95336 "position CSS not recognized without units when element not in document". Set the parser in quirks mode when necessary in nsDOMCSSAttributeDeclaration::ParseDeclaration(). r=ianh/sr=jst/a=dbaron.
git-svn-id: svn://10.0.0.236/trunk@101945 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 08:00:12 +00:00
pierre%netscape.com
c2f7b875f6 Bug 39117 "[zoom]View Enlarge/Reduce Text Size doesn't work on mac". Calculate zoom in nsFontMetricsMac::GetNativeTextStyle() and remove disabling of menus in viewZoomOverlay. r=rbs, sr=sfraser, a=dbaron
git-svn-id: svn://10.0.0.236/trunk@101944 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 07:52:02 +00:00
jband%netscape.com
63b2a966e4 attempt to fix HP-UX and and some other Unix bustages. r=cls
git-svn-id: svn://10.0.0.236/trunk@101943 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 07:24:39 +00:00
pschwartau%netscape.com
f102bc5794 Adding skips for two tests employing the non-ECMA toSource() and uneval() functions.
git-svn-id: svn://10.0.0.236/trunk@101942 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 06:14:38 +00:00
pschwartau%netscape.com
304fcc71e9 Initial add.
git-svn-id: svn://10.0.0.236/trunk@101941 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 05:59:52 +00:00
waterson%netscape.com
1b902b4f59 Fix static build bustage.
git-svn-id: svn://10.0.0.236/trunk@101940 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 05:28:12 +00:00
sdagley%netscape.com
e01c802869 Doh! Fixing build bustage due to my landing of fix for #89019. We have to have different targets for Carbon and Classic due to linkage issues with the OT libs OpenTransportAppPPC.o and OpenTptInetPPC.o that are required for Classic.
git-svn-id: svn://10.0.0.236/trunk@101939 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 04:58:11 +00:00
cotter%netscape.com
42de53c57a help update per b=85925, a=asa@mozilla.org, r=oeschger@netscape.com
git-svn-id: svn://10.0.0.236/trunk@101938 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 04:10:08 +00:00
cls%seawood.org
95f6d098e3 Update REQUIRES so that we do not accidentally build using the system headers of jpeg,zlib,png,mng when we are supposed to be building using the Mozilla copies of these libraries.
Bug #97386 r=mcafee a=dbaron


git-svn-id: svn://10.0.0.236/trunk@101936 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 03:29:44 +00:00
cotter%netscape.com
6535d71717 security & privacy help content corrections per b=85925, a=asa, r=oeschger
git-svn-id: svn://10.0.0.236/trunk@101935 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 03:27:32 +00:00
tao%netscape.com
58e0f58084 8124: default charset should be set in ja-unix.jar -> move this pref to
en-unix.jar.(r=jbetak,sr=sspitzer).


git-svn-id: svn://10.0.0.236/trunk@101934 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 03:00:27 +00:00
tao%netscape.com
6df38cd183 8120: intl.collationOption should be defined in ja-unix.jar
(r=jbetak,sr=mscott) move this pref to en-unix.jar.


git-svn-id: svn://10.0.0.236/trunk@101933 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 02:55:47 +00:00
tao%netscape.com
e144476998 8052: Available tab list on Sidebar customize tab is still US contents
after switching to JP region pack. (r=jbetak,sr=mscott)
use "intl.content.langcode" instead of u-a locale


git-svn-id: svn://10.0.0.236/trunk@101931 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 02:47:01 +00:00
tao%netscape.com
31f005482a 70099: Remove new MailNews dependency on Navigator.
(r=jbetak,sr=mscott,a=dbaron). move the url from browser to communicator.


git-svn-id: svn://10.0.0.236/trunk@101930 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 02:06:06 +00:00
mstoltz%netscape.com
83cf54c4fb bug 86799, adding support for wildcard security policies of the form
"capability.policy.group.*.property". Also added additional optimizations
and changed copy-initialization of NSCOMPtrs to direct initialization
throughout the file. r=harishd, sr=jst, a=asa.


git-svn-id: svn://10.0.0.236/trunk@101929 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 02:05:48 +00:00
hyatt%netscape.com
3b1387592b Fix for 95452. r/sr=ben,hewitt, a=dbaron
git-svn-id: svn://10.0.0.236/trunk@101928 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 02:04:04 +00:00
tao%netscape.com
6a5880805d 90083: Restart message does not make sense when selecting new locale.
(r=jbetak, sr=mscott, a=dbaron) rephrase the message.


git-svn-id: svn://10.0.0.236/trunk@101925 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-29 00:53:00 +00:00
relyea%netscape.com
4473c66dd8 Fix Solaris (and probably others) runtime failures:
1) zero out the memory we used to create out module lists so they wind
up null terminated at the end.
	2) fix the lookup code for the secmod.db so that the '=' get properly removed.
	3) turn off attempts to do AddPermDB until we get the encode stuff working.


git-svn-id: svn://10.0.0.236/trunk@101922 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 23:37:22 +00:00
stephend%netscape.com
3289db6af8 Bug 94301. X-lib-port uses other fonts than GTK+-port. Patch by Roland.Mainz@informatik.med.uni-giessen.de (gisburn on irc) r=dbaron sr=tor a=asa on behalf of drivers
git-svn-id: svn://10.0.0.236/trunk@101921 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 23:12:50 +00:00
ddrinan%netscape.com
10f83cbdee Check in for tao. Bug 91217 - update locale version in package/locale provider registry. r=jbetak,sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@101919 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 22:39:13 +00:00
dp%netscape.com
61882a59bc bug #14889 Lazy loading wallet dll r=morse,gagan sr=jband a=asa
git-svn-id: svn://10.0.0.236/trunk@101918 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 22:32:03 +00:00
dp%netscape.com
0ad47f4806 bug #14889 CreateServicesFromCategory() moved into xpcom as part of
Lazy loading wallet dll r=morse,gagan sr=jband a=asa


git-svn-id: svn://10.0.0.236/trunk@101917 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 22:22:27 +00:00
mkaply%us.ibm.com
b58f40d033 #97368
r=pedemont sr=blizzard a=asa for drivers
OS/2 only - make printer code more friendly - like honoring return codes for instance


git-svn-id: svn://10.0.0.236/trunk@101916 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 22:08:39 +00:00
dp%netscape.com
b68a03456b bug #14889 Lazy loading wallet dll r=morse,gagan sr=jband a=asa
git-svn-id: svn://10.0.0.236/trunk@101915 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 22:05:30 +00:00
rginda%netscape.com
39016686cd - not built -
spruce up some comments
added, then comented out, jsdIDebuggerService::filterGlobalObject


git-svn-id: svn://10.0.0.236/trunk@101914 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 22:03:44 +00:00
rginda%netscape.com
f12cac4564 - not built -
whitespace tweakage


git-svn-id: svn://10.0.0.236/trunk@101913 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 22:02:28 +00:00
rginda%netscape.com
ccde950ed1 - not built -
don't allow gc's during script hooks if CAUTIOUS_SCRIPTHOOK is defined (which it is, by default.)  Should help with stability until we can fix the real problems.
Use JSVAL_ macros instead of JSD_* calls in jsdValue::GetJSType method, avoiding two c++ frames per call.


git-svn-id: svn://10.0.0.236/trunk@101912 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 22:02:07 +00:00
rginda%netscape.com
67a99ef7dc - not built -
modeline fix


git-svn-id: svn://10.0.0.236/trunk@101911 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 21:59:53 +00:00
jband%netscape.com
3311deca71 fix bug 96725. Avoid infinite recursion in call to QI'd xbl binding by avoiding the mutation of the interface set when the object implementing the interface is a wrappedJS around our wrappedNative's own JSObject. r=dbradley sr=hyatt a=brendan,hyatt,jband
git-svn-id: svn://10.0.0.236/trunk@101910 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 21:52:10 +00:00
jband%netscape.com
cfba8ab27e Restore old method order so that newer components implmenting this interface are still callable by 0.9.2/NS6.1 browsers. bug 96917. sr=vidur r=brendan a=drivers
git-svn-id: svn://10.0.0.236/trunk@101909 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 21:46:08 +00:00
wtc%netscape.com
9ebba0424d Bugzilla bug 94153: destroys the arena lock in PL_ArenaFinish. Also don't
need to hold the lock when destroying the arenas on the arena freelist.
The patch to destroy the arena lock was contributed by jeff@NerdOne.com.


git-svn-id: svn://10.0.0.236/trunk@101908 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 21:14:36 +00:00
pschwartau%netscape.com
cdda8b8a36 Adding two new utility functions.
git-svn-id: svn://10.0.0.236/trunk@101907 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 21:13:58 +00:00
shrutiv%netscape.com
d81341dac0 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@101906 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 21:10:28 +00:00
dcone%netscape.com
09d35e75a6 bug 12037. A small fix for a regression that was and r=peterl sr=attinasi and a=dbaron. I forgot to checkin the
check to see if I handled the print.  This fixes my regression.


git-svn-id: svn://10.0.0.236/trunk@101905 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 20:54:35 +00:00
rods%netscape.com
e5b30caae0 the dropdown will have a top border now.
Bug 88399 r=dcone sr=attinasi a=dbaron


git-svn-id: svn://10.0.0.236/trunk@101904 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 19:40:02 +00:00
wtc%netscape.com
f82e415e62 Bugzilla bug 54353: free the log modules at NSPR cleanup. Thanks to
jeff@NerdOne.com for the patch.


git-svn-id: svn://10.0.0.236/trunk@101902 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 18:37:55 +00:00
dougt%netscape.com
f6ef8a7991 fixes bug 96761 - prevents connection problems detected during RETR from continuing into CWD state. r=gagan. sr=darin. a=asa
git-svn-id: svn://10.0.0.236/trunk@101901 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 18:24:16 +00:00
kin%netscape.com
e07ae6bcd6 Fix for bug #96604: Deleting characters from some form input controls will allow altering page content
mozilla/editor/base/nsEditor.cpp
  mozilla/editor/base/nsEditor.h

    - Added IsRootNode() method.
    - Added calls to IsRootNode() in GetPriorNode() and GetNextNode()
      to prevent traversing above the root node.

r=jfrancis@netscape.com  sr=sfraser@netscape.com  a=asa@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@101900 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 18:21:12 +00:00
shanjian%netscape.com
c6f026ad1d #95490 ISO-2022-JP mail msgs use QP encoding for the escape sequence
r/sr=mscott, a=asa


git-svn-id: svn://10.0.0.236/trunk@101899 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 18:21:11 +00:00
briane%qnx.com
030b988eab PHOTON build only
fixes to work with the static build


git-svn-id: svn://10.0.0.236/trunk@101898 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 18:11:26 +00:00
briane%qnx.com
a62c442198 PHOTON build only
Fixes to work with the static builds


git-svn-id: svn://10.0.0.236/trunk@101897 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 18:10:49 +00:00
wtc%netscape.com
3f7f3c5d48 Bugzilla bug 96673: removed the unnecessary and non-portable initializers
for the sigaction structure.  Thanks rjesup@wgate.com (Randell Jesup) for
suggesting the fix.


git-svn-id: svn://10.0.0.236/trunk@101896 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 18:01:46 +00:00
justdave%syndicomm.com
600e37d512 Fixing a couple typoes
git-svn-id: svn://10.0.0.236/trunk@101895 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 17:55:14 +00:00
ddrinan%netscape.com
f87276dd08 Fix IRIX bustage caused by ^M in source
git-svn-id: svn://10.0.0.236/trunk@101894 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 16:58:13 +00:00
ddrinan%netscape.com
3a7ab53706 Fix IRIX bustage caused by ^M in source
git-svn-id: svn://10.0.0.236/trunk@101892 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 16:43:04 +00:00
ddrinan%netscape.com
74b3888a96 Fix IRIX bustage cause by ^M in source
git-svn-id: svn://10.0.0.236/trunk@101891 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 16:40:16 +00:00
rjesup%wgate.com
6672beeb05 Bug 94243. Follow-on patch for xlib by gisburn. r=dbaron, sr=jst, a=asa
git-svn-id: svn://10.0.0.236/trunk@101890 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 14:42:29 +00:00
cmanske%netscape.com
1a694fd9bf Fixed busted Table Props dialog, b=97140, r=brade, sr=kin, a=asa
git-svn-id: svn://10.0.0.236/trunk@101889 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 14:32:02 +00:00
mkaply%us.ibm.com
0a915d8ff1 #97166
r=mkaply, sr=blizzard, a=asa for drivers
OS/2 only - Code from aaronr - workaround crash using XCenter/XWorkplace


git-svn-id: svn://10.0.0.236/trunk@101888 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 13:18:24 +00:00
cls%seawood.org
de2e554156 Adding getter for mAlphaDepth to nsIImage.
Thanks to lordpixel@mac.com for the patch.
Bug #81353 r=pavlov sr=sfraser a=roc+moz


git-svn-id: svn://10.0.0.236/trunk@101887 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 10:04:59 +00:00
justdave%syndicomm.com
b5d1d62dc9 Re-fix for bug 87769: the original patch checked in for this prevented any votes from being changed at all. This corrects that so votes can be changed again while still trapping the error the original patch was designed to catch.
Patch by Christoper Aillon <caillon@returnzero.com>
r= justdave@syndicomm.com


git-svn-id: svn://10.0.0.236/trunk@101886 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 09:19:16 +00:00
leaf%mozilla.org
61788db74e Automated update
git-svn-id: svn://10.0.0.236/trunk@101885 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 08:43:47 +00:00
cls%seawood.org
4fd4bb42b5 Line up --help output
git-svn-id: svn://10.0.0.236/trunk@101884 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 08:39:23 +00:00
despotdaemon%netscape.com
2d41a899d2 Pseudo-automatic update of changes made by lsv@sparc.spb.su.
git-svn-id: svn://10.0.0.236/trunk@101883 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 08:34:15 +00:00
cls%seawood.org
2dc6cb6d6e Update list to reflect smime -> smimestb name change.
Bug #97152 r=bryner a=asa


git-svn-id: svn://10.0.0.236/trunk@101882 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 07:53:57 +00:00
cls%seawood.org
f1309b115e Escape ^ when calling grep as some shells interpret ^ instead of passing it to g
rep.
Thanks to dave@arsdigita.com (Drazen Kacar) for the patch.
Bug #96997 r=cls sr=wtc


git-svn-id: svn://10.0.0.236/trunk@101880 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 07:51:03 +00:00
leaf%mozilla.org
c2b91c8524 Automated update
git-svn-id: svn://10.0.0.236/trunk@101879 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 07:43:48 +00:00
cls%seawood.org
ef53031397 Prepend option to LDFLAGS instead of overriding it for solaris.
Remove explicit linking against libCrun for solaris.
Only update CFLAGS & LDFLAGS when testing zlib,jpeg,png &mng if the appropriate _DIR variable is set.
Bug #96993 r=bryner a=asa


git-svn-id: svn://10.0.0.236/trunk@101878 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 07:40:05 +00:00
brendan%mozilla.org
31c89047ff Patch to make FastLoad file removal clear state so file gets recreated by same session (68045, r=jrgm, sr=waterson, a=asa).
git-svn-id: svn://10.0.0.236/trunk@101877 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 07:08:36 +00:00
naving%netscape.com
2e2da5130a 94148 r=cavin sr=mscott a=dbaron. Make sure that we change the case only for Inbox to INBOX.
git-svn-id: svn://10.0.0.236/trunk@101875 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 06:01:42 +00:00
ddrinan%netscape.com
8bdf26c169 Bug 92475 - error msg for expired CRLs. r=bryner,sr=tor,a=asa
git-svn-id: svn://10.0.0.236/trunk@101874 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 05:13:23 +00:00
ssu%netscape.com
b6650473e2 fixing bug 97219 - win32 installer is no longer automatable. r=syd sr=mscott a=drivers@mozilla.org. affects win32 platforms only.
git-svn-id: svn://10.0.0.236/trunk@101873 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 05:09:02 +00:00
kaie%netscape.com
0931e8db2f b=97044 r=dbaron sr=ben a=asa
Fix topcrash by adding safety null checks and correcting a typo


git-svn-id: svn://10.0.0.236/trunk@101872 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 04:40:36 +00:00
naving%netscape.com
4d40990138 97204. r=suresh sr=mscott a=asa; Made it so that edit changes can be saved for mailnews filters.
git-svn-id: svn://10.0.0.236/trunk@101871 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 03:33:16 +00:00
thesteve%netscape.com
90ac18c4d7 Bug#81373 (mac static build)
links in "everything" else meta-Component for mac static builds;
and an empty `.o' for other builds.
r=jfrancis
sr=sfraser
a=asa on behalf of drivers


git-svn-id: svn://10.0.0.236/trunk@101869 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 02:02:44 +00:00
sfraser%netscape.com
5ce8c19837 Bug 62110 - initialize rv in nsLocalFile::SetPersistentDescriptor. Fixes multiple folders bug in mail on Mac OS X, and probably other bugs as well. r=pinkerton, sr=mscott, a=dbaron
git-svn-id: svn://10.0.0.236/trunk@101868 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 01:57:20 +00:00
glazman%netscape.com
0c185f952a fix forFont element not removed in Composer; b=97083; r=brade,jfrancis; sr=kin; a=dbaron
git-svn-id: svn://10.0.0.236/trunk@101867 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 01:55:22 +00:00
mcafee%netscape.com
e21aea9ab1 Don't set date tag when branch tag is set. cvs currently only supports one tag.
git-svn-id: svn://10.0.0.236/trunk@101866 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 01:43:08 +00:00
rogerl%netscape.com
ce4e261b12 Fixed warning.
git-svn-id: svn://10.0.0.236/trunk@101865 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 00:52:16 +00:00
glazman%netscape.com
5ab3c3281f Fix for Text Style menu broken in Composer ; b=97108, r=brade,cmanske; sr=kin; a=chofmann
git-svn-id: svn://10.0.0.236/trunk@101864 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 00:51:07 +00:00
rogerl%netscape.com
6a52d594c8 Started adding Array[].
git-svn-id: svn://10.0.0.236/trunk@101863 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 00:44:19 +00:00
attinasi%netscape.com
dc345bf724 [Checkin for alexsavulov] Improvement on patch for bug 93363. Fix for layout problem where shrinkwrapping of floats ignores padding. b=95511 r=dbaron sr=attinasi a=roc+moz
git-svn-id: svn://10.0.0.236/trunk@101861 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 00:35:08 +00:00
thesteve%netscape.com
ac286bf41d Bug#81373
build script changes to support mac static build.
r=jfrancis
sr=sfraser
a=asa on behalf of drivers


git-svn-id: svn://10.0.0.236/trunk@101860 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 00:11:50 +00:00
thesteve%netscape.com
2147025111 Bug#81373 (mac static build)
this new file adds XML-DOM support to munge the
exported codewarrior project files.
r=jfrancis
sr=sfraser
a=asa on behalf of drivers


git-svn-id: svn://10.0.0.236/trunk@101859 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 00:01:40 +00:00
thesteve%netscape.com
5b93540e21 Bug#81373 (mac static build)
added static_build option
r=jfrancis
sr=sfraser
a=asa on behalf of drivers


git-svn-id: svn://10.0.0.236/trunk@101858 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 23:50:45 +00:00
thesteve%netscape.com
dc6e268d2d Bug#81373 (mac static build)
added nsStaticComponent.h
r=jfrancis
sr=sfraser
a=asa on behalf of drivers


git-svn-id: svn://10.0.0.236/trunk@101857 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 23:48:03 +00:00
thesteve%netscape.com
01b9e48abd Bug#81373 (mac static build)
fixed up access paths: get rid of :::dist:client[_debug]
r=jfrancis
sr=sfraser
a=asa on behalf of drivers


git-svn-id: svn://10.0.0.236/trunk@101856 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 23:45:59 +00:00
thesteve%netscape.com
f5a474ae29 Bug#81373 (mac static build)
add: link with nsStaticComponentLoader.cpp
r=jfrancis
sr=sfraser
a=asa on behalf of drivers


git-svn-id: svn://10.0.0.236/trunk@101855 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 23:43:23 +00:00
thesteve%netscape.com
9a8822fbaa Bug#81373 (mac static build)
landing mac static build.
r=jfrancis
sr=sfraser
a=asa on behalf of drivers


git-svn-id: svn://10.0.0.236/trunk@101854 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 23:36:11 +00:00
rods%netscape.com
9b5ed6bff4 Having it always size in Quirks mode, changing the sizing from clamping down to Nav 4.x size
to now obey border and padding.
Bug 96630, Bug 97139 r=dcone sr=attinasi a=dbaron


git-svn-id: svn://10.0.0.236/trunk@101853 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 23:28:24 +00:00
sonmi%netscape.com
4d30ac64aa added comments, fixed HOSTNAME problem
git-svn-id: svn://10.0.0.236/trunk@101852 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 23:27:37 +00:00
harishd%netscape.com
fd7d894075 96440 - Before reloading the document with the new charset we should completely shutoff the current load. nsMetaCharsetObserver::Notify() does indeed result in calling stopDocumentLoad() however it failed to ( accidently ) propagate the appropriate error message back to the parser. r=ftang,sr=kin,a=dbaron.
git-svn-id: svn://10.0.0.236/trunk@101851 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 23:22:52 +00:00
sonmi%netscape.com
1449b87db0 changed backward compatibility test directory
git-svn-id: svn://10.0.0.236/trunk@101850 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 23:11:05 +00:00
pschwartau%netscape.com
a2692d9a49 Punctuation correction in comment.
git-svn-id: svn://10.0.0.236/trunk@101849 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 22:57:25 +00:00
pschwartau%netscape.com
2d61cb4832 Initial add.
git-svn-id: svn://10.0.0.236/trunk@101848 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 22:55:57 +00:00
harishd%netscape.com
d5d2590d74 Parser regression test files.
** NOT PART OF THE BUILD **


git-svn-id: svn://10.0.0.236/trunk@101847 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 22:40:48 +00:00
mscott%netscape.com
d3525da5ab NOT PART OF THE BUILD YET.
Adding new interface for xbl brutal sharing. Bug #70647


git-svn-id: svn://10.0.0.236/trunk@101845 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 22:15:45 +00:00
serge%netscape.com
edfdb96c1d fix for 69167; plugin load fails silently on library not found; r=av, sr=waterson, a=roc+moz
git-svn-id: svn://10.0.0.236/trunk@101844 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 22:14:52 +00:00
tor%cs.brown.edu
51e6868194 Bug 89022 - image scaler should use a pixel inclusive measurement instead
of pixel centered.  r=pavlov, sr=brendan, a=asa


git-svn-id: svn://10.0.0.236/trunk@101843 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 22:10:56 +00:00
rogerl%netscape.com
1881298881 Fixed ++/-- operators to invoke unary '+' on operand. All handled by
bytecodegen now instead of in interpreter.


git-svn-id: svn://10.0.0.236/trunk@101842 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 21:33:54 +00:00
dbaron%fas.harvard.edu
107dbc9e85 Correct fix for 96414: the 'font' shorthand requires both size and face. r=rods sr=attinasi a=chofmann
Forgotten half of fix for 47149: make LABEL a normal inline element.  r=rods  sr=attinasi  a=asa


git-svn-id: svn://10.0.0.236/trunk@101841 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 20:56:12 +00:00
pschwartau%netscape.com
f8fcedd7c4 Some RegExp bugs have now been fixed in Rhino. Removing the testcases from the skip list.
git-svn-id: svn://10.0.0.236/trunk@101840 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 19:58:56 +00:00
despotdaemon%netscape.com
a8c2a581b8 Pseudo-automatic update of changes made by dkl@redhat.com.
git-svn-id: svn://10.0.0.236/trunk@101839 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 19:48:31 +00:00
despotdaemon%netscape.com
2f279a3235 Pseudo-automatic update of changes made by dmose@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@101838 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 19:33:44 +00:00
rogerl%netscape.com
6874619e54 Port of performance fixes from Monkey (see bug #85721).
Also, fixes for :
#91343, (non-latin1 fails for [\S])
#78156, (Unicode line terminator matching)
#87231, (/(A)?(A.*)/ didn't reset paren state for empty first match)


git-svn-id: svn://10.0.0.236/trunk@101837 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 18:03:19 +00:00
rods%netscape.com
ef8425d65f Oops, I didn't check in the right fix. I checked in some code I was using for debugging
Here is the fix/patch that was in Bug 96367 r=timeless sr=attinasi a=dbaron


git-svn-id: svn://10.0.0.236/trunk@101835 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 14:12:52 +00:00
rods%netscape.com
845510c32c Refixing style for buttons for fix Bug 96630
git-svn-id: svn://10.0.0.236/trunk@101834 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 13:59:37 +00:00
rods%netscape.com
3c1670a022 Using -moz-fixed for textareas, the size is not "hooked" to the browser's default fixed size now
but will be when fixed to -moz-fixed get put in for 0.9.5
Bug 96414 r=rbs sr=hyatt a=asa


git-svn-id: svn://10.0.0.236/trunk@101833 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 12:22:48 +00:00
rods%netscape.com
e9dffa5ce4 Uses Quirks sizing all the time and now obeys border and padding instead of clamping down to Nav 4.x sizing
Bug 96630 r=dcone sr=attinasi a=dbaron


git-svn-id: svn://10.0.0.236/trunk@101832 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 12:19:11 +00:00
rods%netscape.com
4511e22fcf Having it always size in Quirks mode, changing the sizing from clamping down to Nav 4.x size
to now obey border and padding.
Bug 96630 r=dcone sr=attinasi a=dbaron


git-svn-id: svn://10.0.0.236/trunk@101831 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 11:44:28 +00:00
jaggernaut%netscape.com
124172775b Bug 95621: ``[Xlib] Sync Xlib fontmetrics with GTK+ fontmetrics'', patch by Roland Mainz <Roland.Mainz@informatik.med.uni-giessen.de> aka gisburn, r=dbaron, sr=tor, a=roc+moz
git-svn-id: svn://10.0.0.236/trunk@101830 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 09:02:52 +00:00
darin%netscape.com
d2277d8aaf description of http implementation (initial cut)
git-svn-id: svn://10.0.0.236/trunk@101829 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 08:28:37 +00:00
cotter%netscape.com
f1970c193d ongoing security & privacy help content updates per b=85925, a=asa, r=oeschger
git-svn-id: svn://10.0.0.236/trunk@101828 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 07:18:39 +00:00
cotter%netscape.com
3a80d48da1 ongoing security & privacy help content updates per b=885925, a=asa, r=oeschger
git-svn-id: svn://10.0.0.236/trunk@101827 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 07:08:52 +00:00
loadrunner%betak.net
42d2e21624 96856 The order of JA character set name in Customize Character Coding dialog is not correct,
r=tao, sr=kin, a=dbaron


git-svn-id: svn://10.0.0.236/trunk@101826 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 06:47:53 +00:00
rjesup%wgate.com
b34b6c7f2d Bug 94569: Move xlib & xprint over to xxlibrgb* api. Patch by gisburn, I'm
just checking it in for him.  a=asa, r=jag, r=Tomi.Leppikangas@oulu.fi,
r=cls (Makefile changes), sr=kin


git-svn-id: svn://10.0.0.236/trunk@101825 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 06:45:49 +00:00
loadrunner%betak.net
d4c05757e4 bug 96859, The order of JA character set name in Editor Save As Charset dialog is not correct,
r=tao, sr=kin, a=dbaron


git-svn-id: svn://10.0.0.236/trunk@101824 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 06:41:57 +00:00
rjesup%wgate.com
288182f644 Bug 94243: VoidArray usage patch. a=asa sr=brendan r=waterson r=bienvenu
r=pierre r=jband/dbradley  Also fixes some whitespace issues.


git-svn-id: svn://10.0.0.236/trunk@101822 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 06:15:54 +00:00
brendan%mozilla.org
61cb4c1923 Path to make FastLoad file removal work on non-Unix systems (must close any streams on it first; 68045, r/sr=jrgm/shaver, a=asa).
git-svn-id: svn://10.0.0.236/trunk@101821 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 05:41:53 +00:00
dcone%netscape.com
fc4f3e761f bug=12037 r=peterl sr=attinasi a=dbaron fixed printout of transparent images to have a white transparent area instead of a black area
git-svn-id: svn://10.0.0.236/trunk@101819 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 02:55:38 +00:00
bbaetz%cs.mcgill.ca
56103b684e Add http regression test suite + harness. Requires python.
Not part of default pull or build.


git-svn-id: svn://10.0.0.236/trunk@101818 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 01:13:41 +00:00
naving%netscape.com
723f298ae7 96760 r=bienvenu sr=mscott a=dbaron. Fix nsMsgWindow leaks for pop3 accts when biff is turned on.
git-svn-id: svn://10.0.0.236/trunk@101817 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-27 00:31:52 +00:00
justdave%syndicomm.com
064b8f00e6 All code patches targetted for 2.14 have been checked in. Bumping version
number to 2.14rc to indicate release candidate status.


git-svn-id: svn://10.0.0.236/trunk@101816 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-26 23:06:45 +00:00
justdave%syndicomm.com
d595b24c15 Fix for bug 92266: Prevent dataloss in the bugs_activity table by wrapping
entries into additional entries if they're too long to fit.
Patch by Dave Miller <justdave@syndicomm.com>
r= jake@acutex.net


git-svn-id: svn://10.0.0.236/trunk@101815 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-26 22:58:34 +00:00
hwaara%chello.se
ab84b1dba4 #41719, "Filter UI: use 'untitled' when filter name not given"
Make it so new filters will have the default name "untitled filter", "untitled filter 2" etc. to avoid frustration for lazy people (who don't enter any name). :-)

r=doron, sr=ben, a=tor


git-svn-id: svn://10.0.0.236/trunk@101814 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-26 22:12:17 +00:00
hwaara%chello.se
69803d0366 #96957, "Sort order changed if you change thread-mode"
#79588, "Toggle View|Ignored Threads when in flat sort goes threaded."

Fix cases where we lost the thread-order and/or sort-order. For example, if you changed thread-mode to "View threads with unread", it would always switch the sort-order to be ascending.

r=doron, sr=ben, a=tor


git-svn-id: svn://10.0.0.236/trunk@101813 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-26 22:05:24 +00:00
dbaron%fas.harvard.edu
35e8a923ae Fix buffer overruns caused by incorrect porting of |char|-based code to |PRUnichar|. b=96764 r=bbaetz sr=brendan a=tor
git-svn-id: svn://10.0.0.236/trunk@101812 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-26 21:21:02 +00:00
jake%acutex.net
ca886b1282 Bug 96085 - bypassing group security checks using duplicate bugs
Patch by Christopher Aillon <christopher@aillon.com>
r= jake@acutex.net


git-svn-id: svn://10.0.0.236/trunk@101811 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-26 18:51:45 +00:00
dbaron%fas.harvard.edu
e5125b7d8c Make middle-click pasting put things in the right place by uncommenting code that ensures Y coordinate is more important than X coordinate and by making sure the code does the right thing in case of overlap. b=57913 r=bryner sr=kin a=chofmann
git-svn-id: svn://10.0.0.236/trunk@101810 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-26 18:33:57 +00:00
blakeross%telocity.com
fac53a669f no need to build/ship test autocomplete file. rs=ben a=asa via irc
git-svn-id: svn://10.0.0.236/trunk@101808 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-26 02:49:35 +00:00
mcgreer%netscape.com
be2ea89b08 another attempt to fix builds, function needs to be forward declared
git-svn-id: svn://10.0.0.236/trunk@101805 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 21:28:16 +00:00
mcgreer%netscape.com
0465e3f030 fix broken builds caused by checkin
git-svn-id: svn://10.0.0.236/trunk@101804 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 21:01:38 +00:00
bryner%netscape.com
c52b5b1916 Bug 94154 - focus textfield after directory change, and bug 92754 - clear directory selection on directory change. r=jag, sr=ben, a=dbaron.
git-svn-id: svn://10.0.0.236/trunk@101803 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 20:38:14 +00:00
jake%acutex.net
3796f581b4 Fix for bug 87769 - doeditvotes.cgi can nuke votes
Patch by Christopher Aillon <christopher@aillon.com>
r= jake@acutex.net


git-svn-id: svn://10.0.0.236/trunk@101802 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 18:53:31 +00:00
mkaply%us.ibm.com
2aa979c866 #92797
r=mkaply, sr=waterson, a=dbaron for drivers
Code from Maha Abou El-Rous - turn on cross platform Arabic Shaping


git-svn-id: svn://10.0.0.236/trunk@101801 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 12:52:30 +00:00
hyatt%netscape.com
73c873bf7c Fix linux bustage.
git-svn-id: svn://10.0.0.236/trunk@101800 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 06:44:46 +00:00
hyatt%netscape.com
880b78a482 Fix Mac bustage.
git-svn-id: svn://10.0.0.236/trunk@101799 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 06:42:37 +00:00
jaggernaut%netscape.com
0b77a4312a Part of bug 95475
git-svn-id: svn://10.0.0.236/trunk@101798 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 05:08:27 +00:00
pschwartau%netscape.com
ed5f1cc9be Technical change. Now test is accurate for Rhino as well as SpiderMonkey.
git-svn-id: svn://10.0.0.236/trunk@101797 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 05:01:50 +00:00
idk%eng.sun.com
1ad1e1d4db *not part of the build*
fix for 96935


git-svn-id: svn://10.0.0.236/trunk@101795 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 04:53:44 +00:00
jaggernaut%netscape.com
a1a0a0cbee One more for the speedracer bustage fix.
The problem is that the generated header contains the following bit:
  enum { MODIFICATION = 1U };
  enum { ADDITION = 2U };
  enum { REMOVAL = 3U };

So to speedracer's compiler, this line signals a potential programmer error:

PRInt32 modHint = modification ? nsIDOMMutationEvent::MODIFICATION : nsIDOMMutationEvent::ADDITION;

Apparently they value it like an error and not a warning.


git-svn-id: svn://10.0.0.236/trunk@101794 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 04:34:17 +00:00
jaggernaut%netscape.com
7dc4004e58 Fixing speedracer bustage. Not sure I like this, nor the reason why there's bustage in the first place. *grmbl*
git-svn-id: svn://10.0.0.236/trunk@101793 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 04:22:47 +00:00
jaggernaut%netscape.com
8f20bc9b54 Part of bug 95475.
git-svn-id: svn://10.0.0.236/trunk@101792 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 04:01:46 +00:00
jaggernaut%netscape.com
458c212d8b Fixing mac bustage.
git-svn-id: svn://10.0.0.236/trunk@101791 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 03:52:11 +00:00
racham%netscape.com
b802204244 Fixing bugs 84821 and 86992. Outgoing server panels are updated with correct user and server names instead of null values. Copies and Folders panel now fits all elements properly. r=ssu,naving sr=sspitzer a=roc+moz
git-svn-id: svn://10.0.0.236/trunk@101790 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 02:38:31 +00:00
hyatt%netscape.com
45af3d476f Fix for 95475. r=jag, sr=ben, a=dbaron
git-svn-id: svn://10.0.0.236/trunk@101789 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 02:31:56 +00:00
hyatt%netscape.com
4f51638ef4 Fix for 95475. r=jag, sr=ben, a=dbaron
git-svn-id: svn://10.0.0.236/trunk@101788 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 02:01:08 +00:00
idk%eng.sun.com
ad7d96c999 *not part of the build*
fix for 93888
a = ovk@sparc.spb.su
    jonsmirl@mediaone.net
r = jaggernaut@netscape.com
    idk@eng.sun.com


git-svn-id: svn://10.0.0.236/trunk@101787 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 01:32:15 +00:00
naving%netscape.com
4f4514acd4 95607 r=hwaara sr=bienvenu a=asa. Use nsCAutoString to avoid freeing mismatched memory.
git-svn-id: svn://10.0.0.236/trunk@101786 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 01:28:31 +00:00
pinkerton%netscape.com
82d4d6c55e remove #ifndef TARGET_CARBON since it's not needed. r=pchen/sr=sfraser/a=dbaron. bug# 96907.
git-svn-id: svn://10.0.0.236/trunk@101785 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 01:25:42 +00:00
mcafee%netscape.com
8b9153c578 startup test note
git-svn-id: svn://10.0.0.236/trunk@101784 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 01:09:38 +00:00
despotdaemon%netscape.com
9602278e24 Pseudo-automatic update of changes made by bmartin@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@101783 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 00:14:41 +00:00
jake%acutex.net
a4afec26d3 Fix for bug 95634 - Improvements to Param('voteremovedmail')
Patch by Matthew Tuck <matty@chariot.net.au>
r= jake@acutex.net


git-svn-id: svn://10.0.0.236/trunk@101782 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 00:12:12 +00:00
despotdaemon%netscape.com
641bfa7ace Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@101781 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-25 00:01:40 +00:00
vidur%netscape.com
bf7046a35b Fix for bug 96517. Fixing typo in NS_ISUPPORTS_IMPL_CI macros. r/sr=jband, brendan
git-svn-id: svn://10.0.0.236/trunk@101780 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 23:59:59 +00:00
darin%netscape.com
05e092f2d0 fixes bug 47041 "Unable to unregister an HTTP Notify listener"
r=bbaetz, sr=dougt, a=roc+moz


git-svn-id: svn://10.0.0.236/trunk@101779 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 22:27:06 +00:00
darin%netscape.com
556ee0cf4a fixes bug 95981 "Changes in background images on pages do not show on reload"
r/sr=rpotts,dougt a=roc+moz


git-svn-id: svn://10.0.0.236/trunk@101778 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 22:24:10 +00:00
morse%netscape.com
a2f243cd9c bug 92387, alignment problems in cookie and form manager, r=gemal, sr=hewitt, a=asa
git-svn-id: svn://10.0.0.236/trunk@101777 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 21:36:45 +00:00
ssu%netscape.com
4802a7cbda fixing bug 96801 - Win32 installer fails to detect if older mozilla is running. r=dveditz, sr=mscott, a=drivers@mozilla.org. not part of tinderbox builds. affects only windows platforms.
git-svn-id: svn://10.0.0.236/trunk@101776 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 21:32:29 +00:00
relyea%netscape.com
193baf4505 Land new PKCS #11 initialization code.
git-svn-id: svn://10.0.0.236/trunk@101775 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 21:16:48 +00:00
relyea%netscape.com
56a53bf5c3 Fix memory leak
git-svn-id: svn://10.0.0.236/trunk@101774 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 21:15:52 +00:00
av%netscape.com
47e21da3e9 Fixing 96528 -- crash on File/Exit with full page xpcom plugin, r=peterl, sr=attinasi, a=asa
git-svn-id: svn://10.0.0.236/trunk@101773 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 21:08:25 +00:00
av%netscape.com
0fc41edefe Adding missing file to the sample project, not part of the build
git-svn-id: svn://10.0.0.236/trunk@101772 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 21:03:50 +00:00
depstein%netscape.com
9f45520438 updated nsISHistory methods.
git-svn-id: svn://10.0.0.236/trunk@101771 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 21:03:15 +00:00
depstein%netscape.com
64dabd5a03 updating nsISHistory and nsIWebNav tests.
git-svn-id: svn://10.0.0.236/trunk@101770 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 20:05:45 +00:00
radha%netscape.com
328c8aa401 Fix for bug # 94926. assert in nsDocShell::SetTitle() r=adamlock sr=rpotts a=asa
git-svn-id: svn://10.0.0.236/trunk@101769 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 20:03:24 +00:00
nboyd%atg.com
e21b2a2198 Original problem in following mail. I implemented JDK1.1 compatibility and performance
improvements:

Subject:
        Rhino: Problem in NativeJavaMethod
   Date:
        Tue, 14 Aug 2001 10:23:35 +0200
   From:
        felix.meschberger@day.com
     To:
        Norris Boyd <nboyd@atg.com>




Hi Norris,

While working with wrapped Java classes we discovered a problem in
NativeJavaMethod : If the public method to be called is part of a
non-public class, the Sun Java VM throws an IllegalAccessException. This
bug in the Sun VM has been reported as Bug 4071593 to Sun, but has not been
resolved since....

I implemented a circumvention, for which I provide you the patch. I quickly
tested it, and it seems to work.

Regards
Felix

And here's the patch :

diff -w -r1.19 NativeJavaMethod.java
227a228,234
>        /**
>         * Due to a bug in Suns VM, public methods in private
>         * classes are not accessible by default (Sun Bug #4071593).
>         * We have to explicitly set the method accessible beforehand
>         */
>        meth.setAccessible(true);
>

-----------------------------------------------------------------
This message is a private communication. If you are not the intended
recipient, please do not read, copy, or use it, and do not disclose it
to others. Please notify the sender of the delivery error by replying to
this message, and then delete it from your system. Thank you.
The sender does not assume any liability for timely, trouble-free,
complete, virus free, secure, error free or uninterrupted arrival of
this e-mail. For verification please request a hard copy version.

mailto:felix.meschberger@day.com
http://www.day.com

Felix Meschberger
Development
Day Interactive AG
Steinenberg 21-23
4001 Basel
Switzerland

T  41 61 226 98 98
F  41 61 226 98 97


git-svn-id: svn://10.0.0.236/trunk@101768 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 20:01:49 +00:00
cmanske%netscape.com
c95183a711 Remove dialog utilities from editor c++ and nsIEditorShell interface (use nsIPromptService from JS instead). b=96649, r=brade, r=kin/sfraser, a=asa
git-svn-id: svn://10.0.0.236/trunk@101767 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 19:47:46 +00:00
mitesh%netscape.com
025e68f211 Fix for Bug 87661 - moving AutoConfig creation after reading of netscape.cfg
r=bnesse, sr=shaver and a=asa


git-svn-id: svn://10.0.0.236/trunk@101766 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 19:44:45 +00:00
cmanske%netscape.com
2bfa1db296 Fixed bad message dialog parent bug 96649, r=brade, sr=kin/sfraser, a=asa
git-svn-id: svn://10.0.0.236/trunk@101765 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 19:42:45 +00:00
chuang%netscape.com
e90eacf58d Bug96053 Executing a Query may not return an end-of-query,
fixed by john.marmion@ireland.sun.com., r=chuang, sr=mscott, a=asa


git-svn-id: svn://10.0.0.236/trunk@101764 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 19:34:50 +00:00
cmanske%netscape.com
beaee3a430 Fixed regression: Can't clear link via input field, b=96542, r=brade, sr=kin, a=asa
git-svn-id: svn://10.0.0.236/trunk@101763 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 19:32:36 +00:00
dsirnapalli%netscape.com
3ffab1967f renamed the image file.
git-svn-id: svn://10.0.0.236/trunk@101762 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 19:27:00 +00:00
mkaply%us.ibm.com
c5cc463b44 No bug
r=mkaply, a=asa for drivers
OS/2 ONLY - Code from Javier Pedemonte - more recovery from the libpr0n landing
This code makes all PNGs work and with it, all images should work on OS/2


git-svn-id: svn://10.0.0.236/trunk@101761 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 19:25:55 +00:00
jaggernaut%netscape.com
264679e48e Bug 96211: "Kill them darn js strict warnings", episode button.xml
Patch by Henrik Gemal <gemal@gemal.dk>, r=jag, sr=brendan, a=Asa


git-svn-id: svn://10.0.0.236/trunk@101760 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 18:54:28 +00:00
rpotts%netscape.com
da08e18b8e bug #96418 (r=valeski, sr=mscott). SaveAs dialog not shown when saving file...
git-svn-id: svn://10.0.0.236/trunk@101759 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 18:45:11 +00:00
brendan%mozilla.org
1fc56000f2 Fix all PL_strlen to be strlen, for 64-bit portability (shanmu's patch for 95838 generalized, sr=mscott&brendan, a=asa).
git-svn-id: svn://10.0.0.236/trunk@101758 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 18:38:30 +00:00
relyea%netscape.com
dadc39c1fb Memory leak fixes.
git-svn-id: svn://10.0.0.236/trunk@101757 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 18:34:34 +00:00
waterson%netscape.com
e9c570e73a Bug 96282. Make nsOutlinerRows::Last() work correctly when there are empty subtrees in the rows. r=varga, sr=kin, a=dbaron
git-svn-id: svn://10.0.0.236/trunk@101756 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 18:28:15 +00:00
relyea%netscape.com
fb609dc013 BLAPI is complete below the PKCS #11 line, so should not call high level initialization functions.
git-svn-id: svn://10.0.0.236/trunk@101755 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 18:21:09 +00:00
relyea%netscape.com
af9c01bd19 1) Open database RW if we are encrypting so that the SDR key can be created.
2) Return an error code if we fail to open the database.
3) Initialize the database if it wasn't already


git-svn-id: svn://10.0.0.236/trunk@101754 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 18:20:07 +00:00
justdave%syndicomm.com
21573c54a7 Fix for bug 95235: variables with untrusted content were being echoed back to the user in error messages. Those variables are now run through html_quote() first.
Patch by Gavin Shelley <gavins@iplbath.com>
r= justdave@syndicomm.com


git-svn-id: svn://10.0.0.236/trunk@101751 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 17:32:25 +00:00
dbaron%fas.harvard.edu
15963ce5ed Fix FMR with a band-aid on top of a band-aid, at least until we figure this one out for real. b=93105 r=jag sr=attinasi a=asa
git-svn-id: svn://10.0.0.236/trunk@101750 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 14:00:49 +00:00
dbaron%fas.harvard.edu
96bf1bc30f Make LABEL act like an inline element rather than inline-block by removing lots of special (and not-well-tested) logic from nsLabelFrame and making it inherit from nsInlineFrame. This means LABEL will essentially always have 'display: inline', but it's hard to avoid that as long as form controls are implemented in frames rather than content. b=47149 r=rods sr=attinasi a=asa
git-svn-id: svn://10.0.0.236/trunk@101749 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 13:58:53 +00:00
dinglis%qnx.com
73f8705e3b NOT PART OF BUILD (Photon port only)
- added new prompt service
- new history resource.


git-svn-id: svn://10.0.0.236/trunk@101748 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 13:51:21 +00:00
bryner%netscape.com
5d1fb8258e Bug 85946 - file picker not resiz[e]able. Patch from colin@theblakes.com, r=bryner, sr=blake, a=asa.
git-svn-id: svn://10.0.0.236/trunk@101747 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 06:53:22 +00:00
bryner%netscape.com
5bb50b750e Bug 96434 - open folder in xp filepicker attempts a save instead of an open. r=jag, sr=shaver, a=dbaron.
git-svn-id: svn://10.0.0.236/trunk@101746 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 06:50:45 +00:00
nicolson%netscape.com
6b60ee7fd7 add getEncryptedPrivateKeyInfo.
git-svn-id: svn://10.0.0.236/trunk@101744 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 05:23:15 +00:00
nicolson%netscape.com
543f77a6c1 add NSPR wrapper around java socket.
git-svn-id: svn://10.0.0.236/trunk@101743 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 05:16:27 +00:00
nicolson%netscape.com
0996f8151f add types and ids for NSPR wrapper around java socket.
git-svn-id: svn://10.0.0.236/trunk@101742 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 05:15:18 +00:00
nicolson%netscape.com
4b77628768 Add getEncryptedPrivateKeyInfo.
git-svn-id: svn://10.0.0.236/trunk@101741 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 05:14:55 +00:00
nicolson%netscape.com
32327a46a2 add getEncryptedPrivateKeyInfo to CryptoStore.
git-svn-id: svn://10.0.0.236/trunk@101740 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 05:14:30 +00:00
syd%netscape.com
f503628d5c Add QuickLaunch panel to the installer. r=ssu,dveditz sr=mscott, a=asa. Bug is
87038


git-svn-id: svn://10.0.0.236/trunk@101739 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 05:00:02 +00:00
wtc%netscape.com
c263db4585 Bugzilla bug 94685: fixed compiler warnings.
git-svn-id: svn://10.0.0.236/trunk@101738 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 03:52:23 +00:00
kaie%netscape.com
b01bbfd7f9 b=96696 r=kaie sr=darin a=dbaron
adding missing init code
checking in for bbaetz


git-svn-id: svn://10.0.0.236/trunk@101737 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 03:40:48 +00:00
brendan%mozilla.org
d72ef6fca0 Check keyword version when scanning, not by installing different keywords on version selection (when starting to compile; bug 96562, r=rogerl, sr=shaver&jband, a=dbaron).
git-svn-id: svn://10.0.0.236/trunk@101736 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 03:32:31 +00:00
sonmi%netscape.com
b9a1bf76d1 fixed typo
git-svn-id: svn://10.0.0.236/trunk@101735 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 01:11:58 +00:00
mcafee%netscape.com
16e058789c Fix for rh7.1/jvm1.3.0 hang bug
git-svn-id: svn://10.0.0.236/trunk@101734 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-24 01:02:07 +00:00
sonmi%netscape.com
9169523452 added p/f for generating objsign cert bug 96743
git-svn-id: svn://10.0.0.236/trunk@101733 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 23:41:16 +00:00
rginda%netscape.com
d27d8f9332 ChatZilla changes only, bug 89713, r=samuel@sieb.net, a=asa
set default nickname so it'll get saved


git-svn-id: svn://10.0.0.236/trunk@101732 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 22:12:43 +00:00
radha%netscape.com
7c3783e94d Fox for bug # 90098 and 83684 r=valeski sr=rpotts a=asa
git-svn-id: svn://10.0.0.236/trunk@101731 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 21:56:38 +00:00
radha%netscape.com
e9ee2beb7a Fix for bug 84519 r=adamlock sr=rpotts a=asa. history.go(toofar) gives problems to back/forward buttons
git-svn-id: svn://10.0.0.236/trunk@101730 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 21:55:57 +00:00
rginda%netscape.com
5b2f4793ab ChatZilla changes only, bug 89713, r=samuel@sieb.net, a=asa
move most of the rules to content/output-base.css; remianing rules are simple text style changes


git-svn-id: svn://10.0.0.236/trunk@101729 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 21:45:58 +00:00
rginda%netscape.com
9e4f2a2314 ChatZilla changes only, bug 89713, r=samuel@sieb.net, a=asa
make current tab bold
add spacers after 4th and 8th tab so they're easy to map to Fn keys


git-svn-id: svn://10.0.0.236/trunk@101728 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 21:44:41 +00:00
rginda%netscape.com
05a1b303e4 ChatZilla changes only, bug 89713, r=samuel@sieb.net, a=asa
add i18n strings for css, ping, and version commands


git-svn-id: svn://10.0.0.236/trunk@101727 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 21:43:11 +00:00
rginda%netscape.com
8c9d67fd23 ChatZilla changes only, bug 89713, r=samuel@sieb.net, a=asa
add i18n strings for new context menu


git-svn-id: svn://10.0.0.236/trunk@101726 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 21:42:07 +00:00
rginda%netscape.com
54d5a78a1e ChatZilla changes only, bug 89713, r=samuel@sieb.net, a=asa
bump version number to 0.8.4
reduce max word length to 20
s/toolbar/tabstrip/
dont connect to default urls if we're supposed to go to a specific irc:// url
add quakenet
add mailto: and #Channel links
remove target attribute from links that don't need one
modify smiley insertion to be css friendly
implement tooltips
add dynamic css code, not used yet
fix parsing of empty irc:// urls (irc:, irc:/, and irc://)
focus input on startup and [esc]
implement dnd for content pane and links
add getURL method for the client object


git-svn-id: svn://10.0.0.236/trunk@101725 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 21:41:24 +00:00
rginda%netscape.com
6e0185c279 ChatZilla changes only, bug 89713, r=samuel@sieb.net, a=asa
add initialScripts pref
remove old style prefs
add new "default style" pref


git-svn-id: svn://10.0.0.236/trunk@101724 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 21:35:45 +00:00
rginda%netscape.com
39dda15dc3 ChatZilla changes only, bug 89713, r=samuel@sieb.net, a=asa
fix function names


git-svn-id: svn://10.0.0.236/trunk@101723 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 21:34:58 +00:00
rginda%netscape.com
c35890a6b2 ChatZilla changes only, bug 89713, r=samuel@sieb.net, a=asa
add doctype to prevent quirks mode
add logic to take css file from querystring


git-svn-id: svn://10.0.0.236/trunk@101722 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 21:34:45 +00:00
rginda%netscape.com
d4b0f9ed57 ChatZilla changes only, bug 89713, r=samuel@sieb.net, a=asa
load initial scripts at startup
rename toolbar functions to tabstrip
add support for content area context menu
implement css command
fix i18n string concatenation to use formats instead
imlement ping and version commands
add unknown ctcp handler
put list reply header with the list
add nickname in use during initial connect logic (append an _ until it works)
add ctcp ping reply handler


git-svn-id: svn://10.0.0.236/trunk@101721 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 21:33:59 +00:00
rginda%netscape.com
831a75fe95 ChatZilla changes only, bug 89713, r=samuel@sieb.net, a=asa
add css, ping, voice commands
rename toolbar to tabstrip


git-svn-id: svn://10.0.0.236/trunk@101720 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 21:30:40 +00:00
rginda%netscape.com
de4053fc80 ChatZilla changes only, bug 89713, r=samuel@sieb.net, a=asa
add tooltip and drag and drop related <script>s
add <command>s and <key>s for the new context menu
add popupset for tooltip
add content area context menu
tweak main menu layout
add class name and op/voice attributes for nick column in userlist
add drag and drop handlers for content area


git-svn-id: svn://10.0.0.236/trunk@101719 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 20:38:57 +00:00
rginda%netscape.com
cbb6d621f1 ChatZilla changes only, bug 89713, r=samuel@sieb.net, a=asa
robustify dumpObjectTree()
whitespace cleanup
fix getStackTrace to get function name from the correct place


git-svn-id: svn://10.0.0.236/trunk@101718 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 20:33:24 +00:00
rginda%netscape.com
b31541f4f5 ChatZilla changes only, bug 89713, r=samuel@sieb.net, a=asa
add getURL methods
add default parameter for CTCP PING
route ctcp replies properly


git-svn-id: svn://10.0.0.236/trunk@101717 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 20:31:07 +00:00
rginda%netscape.com
529ff78392 ChatZilla changes only, bug 89713, r=samuel@sieb.net, a=asa
prepare to use sockets correctly, changes not used yet


git-svn-id: svn://10.0.0.236/trunk@101716 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 20:27:24 +00:00
rginda%netscape.com
f4d5d24d79 ChatZilla changes only, bug 89713, r=samuel@sieb.net, a=asa
remove debug dump
pass URL to new window via window.openDialog argument, instead of query string.


git-svn-id: svn://10.0.0.236/trunk@101715 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 20:25:42 +00:00
rginda%netscape.com
061db8269e ChatZilla changes only, bug 89713, r=samuel@sieb.net, a=asa
fix whitespace, add new files to chatzilla.jar


git-svn-id: svn://10.0.0.236/trunk@101714 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 20:24:42 +00:00
rginda%netscape.com
59bb8d2956 ChatZilla changes only, bug 89713, r=samuel@sieb.net, a=asa
initial add of dark and light output styles


git-svn-id: svn://10.0.0.236/trunk@101713 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 20:24:02 +00:00
rginda%netscape.com
aa32193ffa ChatZilla changes only, bug 89713, r=samuel@sieb.net, a=asa
initial add of blank "dynamic" stylesheet, and base styles for output window.


git-svn-id: svn://10.0.0.236/trunk@101712 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 20:23:16 +00:00
dp%netscape.com
793d0d0caf bug# 96469 caching xbl service r=jag, sr=waterson, a=asa
git-svn-id: svn://10.0.0.236/trunk@101711 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 20:07:10 +00:00
darin%netscape.com
fd7138d231 workaround fix for blocker bug 96440 r=harishd, sr=vidur, a=dbaron
git-svn-id: svn://10.0.0.236/trunk@101710 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 18:59:46 +00:00
darin%netscape.com
8957fc6413 backing out my patch for bug 95981 to fix blocker bug 96480
git-svn-id: svn://10.0.0.236/trunk@101709 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 18:58:25 +00:00
sonmi%netscape.com
90a4fd5b7e brought comments up to date
git-svn-id: svn://10.0.0.236/trunk@101708 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 18:46:44 +00:00
dbaron%fas.harvard.edu
bcd6d38e0f Fix warning / potential bustage. b=91794
git-svn-id: svn://10.0.0.236/trunk@101705 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 14:49:06 +00:00
bienvenu%netscape.com
8aa5b7d2d9 fix leak of undo transaction mgr and undo objects on window close r=naving, sr=sspitzer a=dbaron 96564
git-svn-id: svn://10.0.0.236/trunk@101704 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 14:36:55 +00:00
bienvenu%netscape.com
6426115aad implement offline undo of imap delete r=naving, sr=sspitzer a=asa 93128
git-svn-id: svn://10.0.0.236/trunk@101703 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 14:35:50 +00:00
barnboy%trilobyte.net
dca8acb15c Adding some pretty images for the Bugzilla Guide warning,
note, caution, and tip entries.


git-svn-id: svn://10.0.0.236/trunk@101702 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 14:30:20 +00:00
dbaron%fas.harvard.edu
a70babfcd5 Use the same information for max ascent/max descent (which is used for painting backgrounds) that we've been using all along for default line spacing (ascent/descent rather than max_bounds.ascent/max_bounds.descent), since max_bounds often gives extents larger than ascent/descent. Also clean up the metrics calculation a bit and clean up some debugging macros. b=91794 (also fixes 59825, 64807, 77067, 91776, and probably 89133) r=bstell sr=waterson a=tor
git-svn-id: svn://10.0.0.236/trunk@101701 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 13:44:06 +00:00
rods%netscape.com
ebbd7dca87 Disabling the auto radio seleciton and fixing a bug if it ever gets turned on
The bug is that when printing you don't want to do the auto default selection stuff because
it ends up calling into the DOM and changing the radios on the page.
Bug 96367 r=timeless sr=attinasi a=dbaron


git-svn-id: svn://10.0.0.236/trunk@101700 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 11:09:16 +00:00
mcafee%netscape.com
7bdb7f4da9 minor comment nit
git-svn-id: svn://10.0.0.236/trunk@101699 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 07:09:09 +00:00
kaie%netscape.com
f707b4e236 Fixing my checkin for bug 76915
git-svn-id: svn://10.0.0.236/trunk@101698 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 06:15:38 +00:00
kaie%netscape.com
11fac3f796 b=76915 r=dveditz sr=sfraser a=asa
Giving GUI feedback instead of crashing
Part 3 of 3 - changes to existing code


git-svn-id: svn://10.0.0.236/trunk@101697 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 05:25:15 +00:00
kaie%netscape.com
b2949675ed b=76915 r=dveditz sr=sfraser a=asa
Giving GUI feedback instead of crashing
Part 2 of 3 - changes to make files only


git-svn-id: svn://10.0.0.236/trunk@101696 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 05:23:21 +00:00
kaie%netscape.com
6bb8af13f6 b=76915 r=dveditz sr=sfraser a=asa
Giving GUI feedback instead of crashing
Part 1 of 3 - added files only


git-svn-id: svn://10.0.0.236/trunk@101695 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 05:20:33 +00:00
mscott%netscape.com
e8510a4778 Bug #92367--> fix a crash when closing a compose window while we are busy quoting. the fix is to cleanup some ref counting issues
using a combination of nsCOMPtr and nsWeakReferences
r=varada
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@101694 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 05:12:06 +00:00
mscott%netscape.com
35af079987 Bug #85825 --> don't resend messages which we weren't able to send when doing send later.
r=sspitzer
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@101693 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 05:09:58 +00:00
kaie%netscape.com
2e54ff276a b=93617 r=dcone sr=attinasi a=asa
Fixing print dialog focus problem on Unix


git-svn-id: svn://10.0.0.236/trunk@101692 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 05:04:06 +00:00
mcafee%netscape.com
7f2241dd13 Set MOZILLA_FIVE_HOME for each build loop. reduce sleep time to 10sec for performance tests. debug printouts.
git-svn-id: svn://10.0.0.236/trunk@101691 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 04:59:55 +00:00
kaie%netscape.com
0c7b4f3098 b=95987 r=relyea sr=sfraser a=asa
Fixing SSL crash by disabling ciphers


git-svn-id: svn://10.0.0.236/trunk@101690 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 04:58:27 +00:00
kaie%netscape.com
29aef92599 b=79153 r=kaie sr=sfraser a=asa
Making the new feature actually work on Mac.


git-svn-id: svn://10.0.0.236/trunk@101689 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 04:39:25 +00:00
shanjian%netscape.com
e8bca10914 #45187 Inherit character coding does not work in <a href= xxxx target="new">
r = rpotts, sr=waterson, a=tor


git-svn-id: svn://10.0.0.236/trunk@101688 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 04:24:25 +00:00
waldemar%netscape.com
1b74aa96ce Removed type-expression
git-svn-id: svn://10.0.0.236/trunk@101687 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 04:22:56 +00:00
waldemar%netscape.com
99aeb2f52f Added more basic semantics
git-svn-id: svn://10.0.0.236/trunk@101686 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 04:22:24 +00:00
waldemar%netscape.com
4496362776 Added vector subtyping, support for & on unions of tags, and the nonempty operator
git-svn-id: svn://10.0.0.236/trunk@101685 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 04:21:18 +00:00
dcone%netscape.com
91859fd4e4 b=58002 r=dcone sr=attinasi r=rods a=asa. Fix radio buttons to print the correct setting.
git-svn-id: svn://10.0.0.236/trunk@101682 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 02:25:14 +00:00
brendan%mozilla.org
a76cace18d Avoid corrupting backpatch chains by checking for jump offset operand overflow (90445, khanson's patch with minor changes, sr=shaver&me, a=asa).
git-svn-id: svn://10.0.0.236/trunk@101681 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 02:07:07 +00:00
bienvenu%netscape.com
0878f16ccb fix crash reading an imap message rs=mscott, a=asa 96518
git-svn-id: svn://10.0.0.236/trunk@101680 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 02:04:43 +00:00
sspitzer%netscape.com
25946e9f42 fix for #96499, account central not being shown on start up, "read messages" not working if server collapsed
fix for #95358, folder pane sorting should be case insensitive
fix for #18343, newsgroups in the folder pane should be in newsrc order, not alphabetical order.

plus, some clean up.

r=racham, sr=bienvenu, a=asa


git-svn-id: svn://10.0.0.236/trunk@101679 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 01:10:05 +00:00
mcafee%netscape.com
e22ce8c658 Adding java test, whitespace cleanup
git-svn-id: svn://10.0.0.236/trunk@101678 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 01:06:35 +00:00
sfraser%netscape.com
6df210f43c Fix bug 96232, crash while typing if tooltip is showing. Add kung fu death grip on the nsMacWindow. r=pinkerton/brade, sr=brendan, a=drivers
git-svn-id: svn://10.0.0.236/trunk@101675 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 00:23:45 +00:00
pinkerton%netscape.com
bf647de1f0 rollup popups when a toplevel window hides. makes popups go away about the same time in destruction sequences as on win32. r=pchen/sr=sfraser/a=asa. bug 89373.
git-svn-id: svn://10.0.0.236/trunk@101674 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 00:23:30 +00:00
wtc%netscape.com
266995ef87 Bugzilla bug 94685: defining SECUTIL_NEW caused the wrong function
declaration (with PRFileDesc* as the first parameter) to be used and
hence a compiler warning.


git-svn-id: svn://10.0.0.236/trunk@101673 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 00:22:07 +00:00
wtc%netscape.com
8baf9712df Bugzilla bug 94685: added 'const' to eliminate compiler warning.
Modified files: install.c instsec.c


git-svn-id: svn://10.0.0.236/trunk@101670 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 00:10:00 +00:00
cmanske%netscape.com
fd5f0f38b8 Finish fixing Fixed Width bug 79200, r=brade, sr=sfraser, a=asa
git-svn-id: svn://10.0.0.236/trunk@101669 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 00:05:53 +00:00
wtc%netscape.com
2e28d51dbd Bugzilla bug 94685: deleted unused variable 'iter'.
git-svn-id: svn://10.0.0.236/trunk@101668 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 00:05:46 +00:00
wtc%netscape.com
91fb185586 Bugzilla bug 94685: added 'const' to eliminate a compiler warning.
git-svn-id: svn://10.0.0.236/trunk@101665 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-23 00:00:05 +00:00
mitesh%netscape.com
bd06551cdd Fix for Bug 95795 Timer on Linux doesn't work in AutoConfig
r=bnesse , sr=sfraser and a=asa


git-svn-id: svn://10.0.0.236/trunk@101664 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 23:58:12 +00:00
wtc%netscape.com
055cb216bc Bugzilla bug 94685: added 'const' to eliminate compiler warnings.
git-svn-id: svn://10.0.0.236/trunk@101663 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 23:55:53 +00:00
harishd%netscape.com
b4cb458835 56245 - Misplaced /FONT was closing out TABLE. I've added logic such that if a residual style tag ( inline element ) cannot contain a tag ( block element ) then it
cannot close it either. Which implies that the end tag is misplaced. Also, made userdefined tags to act as inline elements.
r=heikki,sr=vidur,a=tor.


git-svn-id: svn://10.0.0.236/trunk@101661 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 23:43:43 +00:00
javi%netscape.com
11a5994ba7 Remove PSM 1 file from repository.
git-svn-id: svn://10.0.0.236/trunk@101660 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 23:36:18 +00:00
javi%netscape.com
68c83acfed Remove PSM 1 files from repository.
git-svn-id: svn://10.0.0.236/trunk@101659 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 23:34:43 +00:00
wtc%netscape.com
fda93275b2 Bugzilla bug 94685: eliminated a compiler warning about unreferenced label
'retry'.


git-svn-id: svn://10.0.0.236/trunk@101658 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 23:25:54 +00:00
javi%netscape.com
984e133ae5 Remove PSM 1 files from repository
git-svn-id: svn://10.0.0.236/trunk@101657 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 23:25:25 +00:00
wtc%netscape.com
d82456cdd4 Bugzilla bug 94685: added missing 'case' in a switch statement. I have
to say that switch statement looks unusual.


git-svn-id: svn://10.0.0.236/trunk@101656 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 23:22:12 +00:00
javi%netscape.com
8acd9a2f2a Remove PSM 1 files from repository.
git-svn-id: svn://10.0.0.236/trunk@101655 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 23:17:12 +00:00
wtc%netscape.com
8790f9d8ae Bugzilla bug 94685: deleted the unreferenced label 'no_wrapped_key'.
git-svn-id: svn://10.0.0.236/trunk@101654 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 23:15:45 +00:00
javi%netscape.com
5e24ed3bb5 Remove PSM 1 files from repository
git-svn-id: svn://10.0.0.236/trunk@101653 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 23:08:46 +00:00
javi%netscape.com
b884dca0fd Removing PSM 1 files from repository.
git-svn-id: svn://10.0.0.236/trunk@101652 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 23:04:38 +00:00
javi%netscape.com
de4209c234 Removing old psm files
git-svn-id: svn://10.0.0.236/trunk@101651 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 23:03:22 +00:00
javi%netscape.com
102f8d04c2 Check to make sure we're still logged into a slot when trying
to re-use a client-auth session.


git-svn-id: svn://10.0.0.236/trunk@101649 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 22:50:26 +00:00
wtc%netscape.com
115f45b12d Bugzilla bug 94685: fixed compiler warnings. The patch is from
timeless@mac.com.
Modified Files:
    cmd/certcgi/certcgi.c cmd/pk12util/pk12util.c
    lib/certdb/certdb.c


git-svn-id: svn://10.0.0.236/trunk@101646 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 22:40:42 +00:00
pinkerton%netscape.com
f8df04c373 fix for strlen being called on a null string when there is no text to convert to the platform charset. r=pchen/sr=sfraser/a=asa. bug# 92755.
git-svn-id: svn://10.0.0.236/trunk@101645 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 22:21:43 +00:00
sspitzer%netscape.com
405829e2aa fix for blocker #96282. use SelectFolder() to select the inbox on the default account
on startup.  r=mscott,sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@101644 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 18:41:59 +00:00
mcgreer%netscape.com
0a4cd7d781 Move functions to 3.3.1 to avoid confustion (they are not 3.2.x functions!)
git-svn-id: svn://10.0.0.236/trunk@101642 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 16:26:07 +00:00
cls%seawood.org
0c8b34787a Removing dos newlines (^M) to fix irix bustage
git-svn-id: svn://10.0.0.236/trunk@101640 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 07:30:46 +00:00
cls%seawood.org
6032c63285 Fixing REQUIRES bustage
git-svn-id: svn://10.0.0.236/trunk@101639 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 07:11:45 +00:00
blakeross%telocity.com
2941635522 smart browsing pref pane polish. r/sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@101638 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 06:59:21 +00:00
ccarlen%netscape.com
5c3ef884fc Bug 89854 - Confirm migration dialog won't fit on small screen. r=racham/sr=ben
git-svn-id: svn://10.0.0.236/trunk@101637 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 06:54:01 +00:00
dveditz%netscape.com
0c3fb27ad6 bug 91519 regression fix
git-svn-id: svn://10.0.0.236/trunk@101636 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 05:56:16 +00:00
brendan%mozilla.org
5bd9bfb18a Checking in khanson's patch for bug 85112, based on joemansh@interl.net's algorithm (r=beard, sr=me).
git-svn-id: svn://10.0.0.236/trunk@101635 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 05:42:16 +00:00
loadrunner%betak.net
d8e621de9c bug 70341, Non-ASCII attachment filename is not MIME encoded if filename is short, or with no or other extensions
r=ducarroz
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@101634 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 05:34:22 +00:00
brendan%mozilla.org
8404f27930 Forget to include jsopcode.h.
git-svn-id: svn://10.0.0.236/trunk@101633 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 05:33:32 +00:00
markh%activestate.com
243cc35e4f Fix unicode handling for octet arrays, and finally fix the test suite
for Python 2.2.

Not part of the build.


git-svn-id: svn://10.0.0.236/trunk@101632 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 05:33:05 +00:00
jfrancis%netscape.com
dc74067145 fixes:
bug 83918 - Not able to start a list (number or bullets) when using Bold style
bug 62347 - Selecting "Body Text" doesn't change style if in <pre> text that has <br>
bug 86476 - ubercaret appears on multi-line text block
bug 87882 - pasting text from one bullet to another yields extra bullet
---------------
r=sfraser; sr=kin


git-svn-id: svn://10.0.0.236/trunk@101631 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 05:32:44 +00:00
akkana%netscape.com
80d9d8aa50 94751: make validate use nsIFile so it will work on non-Unix platforms. r=bbaetz sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@101630 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 05:14:30 +00:00
ccarlen%netscape.com
29dc4f1588 Bug 92100 - When searching in frames, selection is visible in > 1 frame. r=valeski/sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@101629 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 05:14:15 +00:00
brendan%mozilla.org
97dea81da0 Support ref()++ etc. for native ref (75688) and fix exn_toSource (96284); sr=shaver&jband.
git-svn-id: svn://10.0.0.236/trunk@101627 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 04:59:28 +00:00
blakeross%telocity.com
b4e046129c minor polish for autocomplete prefs dialog. r=kerz sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@101626 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 04:42:32 +00:00
mkaply%us.ibm.com
32e8dc3056 #95651
r=mkaply, timeless a=blizzard
OS/2 only - code from Javier Pedemonte - fix Launch/Reveal behavior for Os/2


git-svn-id: svn://10.0.0.236/trunk@101624 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 04:33:17 +00:00
bryner%netscape.com
b8ce2ebf02 Removing this file since it's no longer needed.
git-svn-id: svn://10.0.0.236/trunk@101623 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 04:27:55 +00:00
karnaze%netscape.com
4072b4f8d3 bug 48827 - round column width to even pixel when calculating percent column. sr=attinasi,r=bernd
git-svn-id: svn://10.0.0.236/trunk@101622 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 04:24:10 +00:00
karnaze%netscape.com
1a0768b791 bug 60013 - make table with html width set to 0 behave like an auto table. sr=attinasi,r=bernd
git-svn-id: svn://10.0.0.236/trunk@101621 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 04:21:05 +00:00
karnaze%netscape.com
fd3fccbde9 bug 89315 - made CalculateRowHeights incremental by starting at a row other than the 1st. Row group dirty reflow passes in first reflowed row. sr=waterson,r=alexsavulov
git-svn-id: svn://10.0.0.236/trunk@101620 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 04:18:48 +00:00
markh%activestate.com
d25f7195de Remove an extra, incorrect comment I accidently left in.
Not part of the build.


git-svn-id: svn://10.0.0.236/trunk@101619 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 04:16:37 +00:00
eddyk%netscape.com
ac060ce4e2 bug 75469: move <script><![CDATA] ... into a .js file
r=timeless sr=ben


git-svn-id: svn://10.0.0.236/trunk@101618 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 04:15:28 +00:00
markh%activestate.com
1a0a3e63cc Fix a subtle bug in the weak-reference support - the weak reference must
always be made against the "base" interface for the instance, not one
of the tear-offs (as the tear-off may have a shorter life than the base)

Not part of the build.


git-svn-id: svn://10.0.0.236/trunk@101617 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 04:11:28 +00:00
markh%activestate.com
6f58a1ebcc Fix a bug when building on Windows from a binary install (rather than
from Python sources).
Not part of the build.


git-svn-id: svn://10.0.0.236/trunk@101616 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 04:10:08 +00:00
javi%netscape.com
64c06e8edd Fix for bug 91407 r=ddrinan, sr=tor
Make downloading a CA cert mime type blob smart enough
to handle blobs with more than one cert.


git-svn-id: svn://10.0.0.236/trunk@101615 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 04:05:45 +00:00
bienvenu%netscape.com
0e4f103070 attempt to fix linux bustage
git-svn-id: svn://10.0.0.236/trunk@101614 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 04:04:02 +00:00
bienvenu%netscape.com
dcc8931e52 attempt to fix linux bustage
git-svn-id: svn://10.0.0.236/trunk@101613 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 04:03:37 +00:00
bienvenu%netscape.com
58772b052b attempt to fix linux bustage
git-svn-id: svn://10.0.0.236/trunk@101612 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 04:02:12 +00:00
mscott%netscape.com
d981b838a6 Bug #59787 --> when showing the start page, clear the force charset on the document viewer. Then when we switch back to showing a message
force it to be UTF-8 again. This fixes problems with I18N start pages which attempt to specify a meta charset.
r=naving
sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@101611 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 03:57:56 +00:00
peterlubczynski%netscape.com
4933556d7a Fix for not opening bundles plugin resources on Mac fixing crashes (and tab clean up) bug 91988 r=bnesse sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@101610 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 03:55:53 +00:00
bienvenu%netscape.com
3914be8e45 fix 95601 crash after getting new pop mail before selecting pop inbox r=naving, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@101609 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 03:53:31 +00:00
hewitt%netscape.com
e49a6ab0ff 94870 - Autocomplete ignores history entires starting with www, r=dmose, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@101608 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 03:49:31 +00:00
hewitt%netscape.com
77db0135ff 89198 - add option to show comments column in autocomplete, r=blake, sr=ben
git-svn-id: svn://10.0.0.236/trunk@101607 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 03:47:04 +00:00
barnboy%trilobyte.net
305a7218e6 Big checkin of docs to resolve every
known outstanding doc bug! Yay release.
Still many things to fix. Aren't there always?


git-svn-id: svn://10.0.0.236/trunk@101604 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 03:44:35 +00:00
naving%netscape.com
6a8e0d6f5b 90640 r=bienvenu sr=sspitzer. Make the MarkFlagged filter action work for IMAP
git-svn-id: svn://10.0.0.236/trunk@101602 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 03:31:48 +00:00
sspitzer%netscape.com
6119b06110 fix for #96298. get "next unread" to work again now that we have switched to outliner.
when trying to "land" on folder, we need to make sure all the ancestors are "expanded".
r/sr=mscott,bienvenu


git-svn-id: svn://10.0.0.236/trunk@101601 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 03:24:52 +00:00
blakeross%telocity.com
64044fe4dc Fallout from box syntax changes. sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@101600 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 03:20:36 +00:00
blakeross%telocity.com
7bbe890752 Textfield for anon ftp password not same length as checkbox (94939). r=ben sr=hewitt
git-svn-id: svn://10.0.0.236/trunk@101599 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 02:55:33 +00:00
blakeross%telocity.com
4ffc8ef645 Send Link and Send Page in Manage Bookmarks do nothing, and some history polish (73904). r=hewitt sr=ben
git-svn-id: svn://10.0.0.236/trunk@101598 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 02:52:30 +00:00
blakeross%telocity.com
553835824a fixing a minor typo, no bug, rs=hewitt
git-svn-id: svn://10.0.0.236/trunk@101597 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 02:49:22 +00:00
dbradley%netscape.com
85eba49665 Fix for bustage, remove extra paren from my patch
git-svn-id: svn://10.0.0.236/trunk@101595 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 01:53:43 +00:00
tao%netscape.com
5b60844ecd 91217: update locale version in package/locale provider registry.
r=jbetak,sr=sspitzer. 0.9.3 ->0.9.4


git-svn-id: svn://10.0.0.236/trunk@101594 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 01:52:23 +00:00
cmanske%netscape.com
7788779500 Added new input filter to restrict first character: b=88881, r=brade, sr=kin
git-svn-id: svn://10.0.0.236/trunk@101593 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 01:49:36 +00:00
cmanske%netscape.com
51e74cc9eb Added text style to toggle 'TT' (fixed width) tag in Composer, b=79200, r=brade, sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@101592 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 01:43:22 +00:00
leif%netscape.com
1342a2ecf3 Bug 85452, 100% CPU usage in LDAP autocomplete. r=dmose, sr=mscott,
patch=leif.


git-svn-id: svn://10.0.0.236/trunk@101591 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 01:30:19 +00:00
sspitzer%netscape.com
d0d081dc51 fix the fix for #87177. thanks to walk84 for pointing it out.
r=walk84, sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@101590 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 01:18:40 +00:00
jdunn%netscape.com
b97569864f fixing dcone's checkin
in a enum, certain compilers don't like when the
last item has a ',' so I removed it

Fixing messina's tbox bustage


git-svn-id: svn://10.0.0.236/trunk@101589 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 01:10:21 +00:00
javi%netscape.com
3dc7e75605 Fix for Bug 44042, checking in for Gervase Markham
r=javi, sr=bin

Fix up some confusing wording in security dialgs.


git-svn-id: svn://10.0.0.236/trunk@101588 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 01:06:56 +00:00
dbradley%netscape.com
4869c56528 Bug 93792: This is the part to make passing nsID by value illegal in xpidl without notxpcom, see bug for a better explanation. sr=brendan, r=jband
git-svn-id: svn://10.0.0.236/trunk@101587 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 01:04:26 +00:00
sspitzer%netscape.com
b5a1706ebb fix for #90781. clean up the confirm dialog when you cancel the account wizard
and you don't have any existing accounts.  thanks to bhart00@yahoo.com
for the patch.  r=racham, sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@101585 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 00:56:21 +00:00
srilatha%netscape.com
2c0e523232 Fix for bug # 95047. removing dependency on csid.h
r=dbaron, sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@101583 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 00:54:29 +00:00
mscott%netscape.com
933ccd9648 Bug #86773 --> string bundle fix up for signed messages. checking in for ducarroz
r=sspitzer
sr=mscott


git-svn-id: svn://10.0.0.236/trunk@101582 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 00:51:12 +00:00
srilatha%netscape.com
77622f1166 Fix for bug #95047. Removing dependency on csid.h
r=dbaron, sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@101581 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 00:50:30 +00:00
stephend%netscape.com
fb03c5c83b Bug 88673. Cleaning up wording in history's prefs panel. Patch by Bradley Hart <bhart00@yahoo.com> r=jatin@netscape.com/timeless@mac.com sr=scc@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@101580 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 00:47:21 +00:00
darin%netscape.com
5ba03ff3ef fixes bug 95981 "Changes in background images on pages do not show on reload"
r=pavlov, sr=dougt


git-svn-id: svn://10.0.0.236/trunk@101579 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 00:46:08 +00:00
srilatha%netscape.com
3368ddf222 Fix for bug #87896. Hitting backspace creates bogus enty in the autompletion dropdown box. r=ducarroz, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@101578 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 00:41:20 +00:00
darin%netscape.com
c45df76363 fixes bug 90288 (part 2) "not honoring Pragma: no-cache from HTTP-EQUIV"
r=gagan, sr=dougt


git-svn-id: svn://10.0.0.236/trunk@101577 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 00:38:46 +00:00
darin%netscape.com
4570680930 fixes bug 90288 (part 1) "not honoring "Pragma: no-cache" from HTTP-EQUIV"
r=gagan, sr=dougt


git-svn-id: svn://10.0.0.236/trunk@101575 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 00:26:42 +00:00
darin%netscape.com
1d408a0e35 fixes bug 94811 "leaking sockets; nsISocketTransport::IsAlive not implemented reliably"
r=wtc, sr=dougt


git-svn-id: svn://10.0.0.236/trunk@101574 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 00:24:26 +00:00
pchen%netscape.com
377e9302d5 bug 91726, r=pinkerton, sr=sfraser, under carbon, Internet Config seems to return mappings with a null mime type string, if we see a null mime type string, set mime type in nsMimeInfo to octet-stream
git-svn-id: svn://10.0.0.236/trunk@101573 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 00:19:08 +00:00
danm%netscape.com
73d5550252 allow larger windows when sizing with the mouse. also moved standard-state calculation to nsMacWindow. some code by rjc@rjcdb.com. bugs 80431,95740 r=hyatt,pinkerton
git-svn-id: svn://10.0.0.236/trunk@101572 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 00:18:45 +00:00
dianesun%netscape.com
29c5504b82 Fix to bug 94961 (kB -> KB). r=buhvan, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@101571 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 00:17:55 +00:00
danm%netscape.com
2df78d7028 always adjust maximized ("standard") window size before zooming. some code by rjc@rjcdb.com. bugs 80431,95740 r=hyatt,pinkerton
git-svn-id: svn://10.0.0.236/trunk@101570 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 00:17:04 +00:00
dianesun%netscape.com
2c267c8f3c Fix to bug 94961 (kB -> KB). r=buvhan, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@101569 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 00:14:14 +00:00
dianesun%netscape.com
306136e548 Fix to bug (95201: disable Download/Sync) r=buhvan, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@101568 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 00:07:46 +00:00
loadrunner%betak.net
9d3611c19f bug 56304, HTML ja signature displays as garbage in the mail body
bug 91670, Signature file with the charset different from the system on
r=ducarroz, sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@101566 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-22 00:02:01 +00:00
timeless%mac.com
729a18f51e 1.206 <cavin@netscape.com> 21 Aug 2001 11:39 checked in ^Ms while fixing Bug #68296
a=bustage,sheriffs#mozilla


git-svn-id: svn://10.0.0.236/trunk@101564 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 23:49:54 +00:00
stephend%netscape.com
5d52c1ab97 Attempt to fix rjesup's bustage. a=sheriff
git-svn-id: svn://10.0.0.236/trunk@101562 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 22:43:47 +00:00
dp%netscape.com
1c97d50450 bug 94883 nsCreateInstanceByContractID() performance improvement
git-svn-id: svn://10.0.0.236/trunk@101561 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 22:42:35 +00:00
dcone%netscape.com
19670eec75 b=73884 r=peterl sr=attinasi invert mode support added
git-svn-id: svn://10.0.0.236/trunk@101560 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 22:37:17 +00:00
mkaply%us.ibm.com
7a0c0a2b08 OS/2 will take this as well, thank you very much.
Fixes transparent PNGs on OS/2.


git-svn-id: svn://10.0.0.236/trunk@101559 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 22:29:25 +00:00
sspitzer%netscape.com
2947c88829 bulletproofing fix for #96291 to prevent crashing on the first autocomplete.
there is still a bug here, so #96291 will stay open.  sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@101557 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 22:16:42 +00:00
ftang%netscape.com
79feec38c3 new file for 90804. not part of the build yet
git-svn-id: svn://10.0.0.236/trunk@101556 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 22:14:56 +00:00
tor%cs.brown.edu
0d3c9ba521 Bug 84980 - zero out the color components of transparent pixels
in a binary alpha PNG on win32 before handing them off to libpr0n.
r=pavlov, sr=brendan


git-svn-id: svn://10.0.0.236/trunk@101555 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 21:59:08 +00:00
mkaply%us.ibm.com
402f5c0a60 No bug
r=mkaply, a=blizzard
OS/2 only - Code from Dainis Jonitis - Fix fallout from imagelib removal
Add back in tiling support for OS/2


git-svn-id: svn://10.0.0.236/trunk@101554 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 21:56:36 +00:00
mkaply%us.ibm.com
9fe696d442 #95301
r=pedemonte, a=blizzard
OS/2 only - leaking presentation spaces


git-svn-id: svn://10.0.0.236/trunk@101553 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 21:53:46 +00:00
rjesup%wgate.com
9773ad26f7 bug 96289: mURLParsers cache wasn't. r=gagan@netscape.com,
sr=dougt@netscape.com


git-svn-id: svn://10.0.0.236/trunk@101552 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 21:49:04 +00:00
jj%netscape.com
bee31306ad bugscape #6794: updated 'vers' resources for Mozilla/Netscape installer
git-svn-id: svn://10.0.0.236/trunk@101551 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 21:43:53 +00:00
naving%netscape.com
79b33fc997 89698 r=robinf, jglick for alert wording changes.
git-svn-id: svn://10.0.0.236/trunk@101550 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 21:35:41 +00:00
sspitzer%netscape.com
8181258744 fix for #72869.
in the tree view (in subscribe) allow for multiple selection.
r/sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@101549 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 21:27:26 +00:00
bryner%netscape.com
efb03cfbd3 Bug 92210 - Window steals focus if you switch to another app during "Transferring data from...". r=saari, sr=hyatt.
git-svn-id: svn://10.0.0.236/trunk@101548 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 21:18:45 +00:00
mozilla.BenB%bucksch.org
7fe6346c58 76359: Fixing regression: namespace for CSS in Modern broke the mail msg display layout, incl. quotes and prefs.
Some reformatting (both skins).
r/sr=Ben Goodger, r=blake, sr=hewitt


git-svn-id: svn://10.0.0.236/trunk@101547 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 21:18:16 +00:00
pchen%netscape.com
a174005e00 bug 93195, r=brade, sr=sfraser, relax minimum macos requirement back to 8.5
git-svn-id: svn://10.0.0.236/trunk@101546 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 21:14:12 +00:00
naving%netscape.com
5c2ece1991 88251 r=bienvenu sr=sspitzer. Maintain the sort-order etc when emptying local trash.
git-svn-id: svn://10.0.0.236/trunk@101545 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 21:06:40 +00:00
brendan%mozilla.org
6abf5e7f73 Bit checkin for bug 68045, r/sr=waterson&shaver, second attempt. It all works
for me on optimized and debug gcc2.96, rh7.1.

- Better failure codes from nsXULPrototypeScript::Deserialize.

- Call nsXULDocument::AbortFastLoads after nsXULPrototypeScript::Serialize
  failure, instead of just nulling the FastLoad service's output stream.

- Expose nsXULDocument::AbortFastLoads via nsIXULPrototypeCache, for use from
  nsChromeProtocolHandler.cpp.  AbortFastLoads flushes the XUL cache now, for
  good measure.

- The needless "Current" adjective in nsIFastLoadService attribute and method
  names is no more.

- Add a do_GetFastLoadService() helper, to use CID instead of contractid, and
  to let the compiler consolidate the static inline CID.

- Add "nglayout.debug.checksum_xul_fastload_file" pref so people can do without
  the checksum verification step when reading a FastLoad file.

- Verify the FastLoad file checksum, by default.  Also, cache it in the FastLoad
  service so we don't recompute it when re-opening the FastLoad file as mailnews
  and other top-levels start up.  Fill the checksum cache in EndFastLoad, when
  the last pseudo-concurrent top-level finishes loading.

  My hope to compute the checksum while writing the FastLoad file ran afoul of
  misordered writes.  The old code to checksum the in-memory nsFastLoadHeader
  also was broken on little endian platforms.  Now all checksumming is done via
  a separate read pass over the complete file, save for the header's checksum
  field, which is summed as if it contained zero.

- Track and check FastLoad file dependencies.  This required groveling with a
  bunch of Necko interfaces in nsChromeProtocolHandler::NewChannel -- read it
  and weep.  Dependency checking, as well as checksum access and computation,
  use better-factored nsIFastLoad{File,Read,Write}Control interfaces.

- nsBufferedStream::Seek wasn't flushing the buffer when seeking backward
  within the buffer, but it must, because mCursor bounds the amount to write
  if the buffer contains the end of file.

- Add an unbufferedStream readonly attribute to nsIStreamBufferAccess, so we
  don't have to screw around with the bufferying layer when checksumming. Also
  implement nsIStreamBufferAccess in nsBufferedOutputStream.

- nsISeekableOutputStream was bogus, based on a bad state I had put the
  nsBufferedOutputStream code in on its way from being completely broken when
  you seek backwards outside of the buffer.  Removing this interface required
  using nsIFastLoadFileIO in nsFastLoadFileWriter, and it also required careful
  ordering of Close calls (the Reader must close after the Writer or Updater,
  so that the Reader's underlying, unbuffered input stream can be read by
  nsFastLoadFileWriter::Close to compute the checksum.

- Miscellaneous tab/indentation, comment typo, bracing, if( => if ( style,
  nsnull vs. 0, useless variable elimination, tortured control flow,
  AutoString instead of String, and gratuitous ; after nsISupportsUtils.h
  macro call cleanups.


git-svn-id: svn://10.0.0.236/trunk@101544 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 20:51:34 +00:00
chuang%netscape.com
63850355cc Bug 17476 Move/Copy menus should sort, r/sr=sspitzer, mscott
git-svn-id: svn://10.0.0.236/trunk@101543 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 20:41:33 +00:00
cotter%netscape.com
ec5fac7cdf ongoing security & privacy help content updates per b=85925, r=oeschger@netscape.com
git-svn-id: svn://10.0.0.236/trunk@101542 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 20:40:24 +00:00
hewitt%netscape.com
34ae532cda 63540 - make classic broken lock icon clearer
git-svn-id: svn://10.0.0.236/trunk@101541 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 20:40:08 +00:00
jat%princeton.edu
fd4eef96c5 Checking in for jesse. Replacing some eval() calls in chrome js with calls to parseInt() and new RegExp(). b=83314, r=mstoltz, sr=brendan.
git-svn-id: svn://10.0.0.236/trunk@101540 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 20:37:19 +00:00
andreas.otte%primus-online.de
a655de9c6e fix bug 84409 [Incorrect request for page components if main page URL contains ";" character] Implementing param support according to RFC 2396, r=dougt, sr=rpotts
git-svn-id: svn://10.0.0.236/trunk@101539 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 20:35:01 +00:00
pavlov%netscape.com
f2d747d729 fix for bug 87739 r=dougt sr=darin
git-svn-id: svn://10.0.0.236/trunk@101538 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 20:17:22 +00:00
dp%netscape.com
ec2d360be6 Bug 94366 Reducing url object creations by not converting urls schemes
that done need conversion to absolute. r,sr=waterson


git-svn-id: svn://10.0.0.236/trunk@101537 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 20:09:20 +00:00
naving%netscape.com
725d0f7df9 89698 r=suresh sr=bienvenu; Check if the newName for folder to be renamed has hierarchyDelimiter, if
so throw an alert. Also did some clean up in nsImapStringBundle.


git-svn-id: svn://10.0.0.236/trunk@101536 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 20:04:00 +00:00
jj%netscape.com
c2561ef554 #93164: bump up mac version number to 0.9.3+ on the trunk
git-svn-id: svn://10.0.0.236/trunk@101535 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 19:49:54 +00:00
pavlov%netscape.com
1602a591a1 fixing indentation of {
git-svn-id: svn://10.0.0.236/trunk@101533 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 19:45:18 +00:00
dougt%netscape.com
f702a21dc6 fixes 95671, 96129. Caching control connections fixed, removing check against browser.enabled.cache, fixing double list response handling error. r= gordon, darin, sr= darin
git-svn-id: svn://10.0.0.236/trunk@101532 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 19:40:55 +00:00
timeless%mac.com
4b17af72b7 Bugzilla Bug 24515 Cant build XPCOM standalone
Bugzilla Bug 88747 nsCRT::atoi should be removed or fixed
Whoops, i contributed to xpcom standalone not working
patch by jband, r=dbaron, sr=brendan

This makes nsCRT::atoi in standalone assert and functionally NOP


git-svn-id: svn://10.0.0.236/trunk@101531 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 19:36:07 +00:00
bernd.mielke%snafu.de
f5274636fb handle captions and innertable frames identical if the containing block is to small,
bug 76726 r=karnaze sr=waterson


git-svn-id: svn://10.0.0.236/trunk@101530 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 19:31:53 +00:00
ftang%netscape.com
6b10e406d5 fix 91193. r=nhotta, sr=blizzard
add universialchardet.dll to the window installer packages


git-svn-id: svn://10.0.0.236/trunk@101529 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 19:16:35 +00:00
javi%netscape.com
de755f9415 Fix for Bug 92003, r=ddrinan, sr=mscott
If the client of SSL/TLS socket provider doesn't provide callbacks,
use the window watcher service to get an nsIPrompt or whatever
interface is requested.


git-svn-id: svn://10.0.0.236/trunk@101528 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 19:10:56 +00:00
dp%netscape.com
719083975b adapting to CreateInstancebyContractID() perf improvement
git-svn-id: svn://10.0.0.236/trunk@101527 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 19:07:26 +00:00
ftang%netscape.com
5257d4fa4b fix 92988. r=shanjian rs=ftang
add more fallback font face for Japanese


git-svn-id: svn://10.0.0.236/trunk@101526 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 19:01:40 +00:00
jaggernaut%netscape.com
1859a898c0 Bug 91884: postpone focus() calls from browser onload till after the window is shown. r=jrgm, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@101524 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 18:54:51 +00:00
harishd%netscape.com
41b05e57a0 96117 - Cache Observer service. r=dp, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@101523 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 18:46:46 +00:00
shanjian%netscape.com
c7216dd2df #95162 Auto-detect doesn't work on kinokuniya page
r=yokoyama sr=jst


git-svn-id: svn://10.0.0.236/trunk@101522 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 18:46:44 +00:00
rjesup%wgate.com
02427b265c bug 93830. patch by gisburn. r=dcone@netscape.com, r=timeless,
sr=waterson@netscape.com


git-svn-id: svn://10.0.0.236/trunk@101521 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 18:43:55 +00:00
cavin%netscape.com
d51fea8551 Bug #68296: In SubscribeToFolder(), make sure we pass the right folder object to SubscribeFolder(). In PossibleImapMailbox(), set the correct delimiter for unsubscribed folders. r=bienvenu, sr=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@101520 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 18:39:46 +00:00
rjesup%wgate.com
ea72c243bc Bug 96132. ~nsTypedSelection misuses arrays. r=dbaron,
sr=jst@netscape.com sr=kin@netscape.com


git-svn-id: svn://10.0.0.236/trunk@101519 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 18:38:20 +00:00
cavin%netscape.com
b6a249a49e Bug #55774: In GetListOfFoldersWithPath(), make sure we pass the right folder object to DiscoverChildren(). r=bienvenu, sr=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@101518 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 18:38:02 +00:00
rjesup%wgate.com
a5c27c09f2 Bug 96137. Fix array accesses. r=pavlov@netscape.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@101517 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 18:34:40 +00:00
varada%netscape.com
bad97a6c43 fix for bug#79053-identity crisis mail compose;r=ducarroz;sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@101516 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 18:33:33 +00:00
rods%netscape.com
bd6fc5b878 Oops, left in a rule I used for testing.
It's removed.


git-svn-id: svn://10.0.0.236/trunk@101510 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 15:12:45 +00:00
dbaron%fas.harvard.edu
c9b9e16848 Fixing MOZ_TRACK_MODULE_DEPS bustage by adding pref to REQUIRES (for nsRuleNode.cpp).
git-svn-id: svn://10.0.0.236/trunk@101505 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 14:27:36 +00:00
morse%netscape.com
9aa7e24589 bug 84432, wallet menu items missing when inside certain frames, r=matt, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@101504 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 14:25:48 +00:00
kaie%netscape.com
8bee469992 addon for b=79153 rs=wtc@netscape.com
Fixes obvious portability error, moving thread starter function from C++ static method to C function.
No change in logic or functionality.
You can reach me at kai.engert@gmx.de


git-svn-id: svn://10.0.0.236/trunk@101503 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 14:22:11 +00:00
rods%netscape.com
48fbd4f113 Disabling Quirks sizing for form controls, it can be put back in via a pref
and uncommenting a line in quirk.css
Bug 91602 r=dcone sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@101502 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 14:01:55 +00:00
cmanske%netscape.com
845c66cf30 Fixed Doc title in Revert dialog message bug=96073, r=brade, sr=kin; Composer part of 'noshade' syntax bug 88761, r=kin, sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@101501 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 13:45:01 +00:00
dbradley%netscape.com
7ddcdbae03 Bug 44989: the memory allocated via g_malloc() should be freed via g_free(). sr=blizzard, r=jst
git-svn-id: svn://10.0.0.236/trunk@101500 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 12:33:28 +00:00
dbradley%netscape.com
1582213550 Bug 83591: XPIDL does not store the file length in the header in XPT Files. sr=scc, r=jband
git-svn-id: svn://10.0.0.236/trunk@101499 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 12:29:34 +00:00
peterv%netscape.com
0893039a53 Adding null checks to fix crash. No bug. r=Pike, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@101498 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 09:14:51 +00:00
jst%netscape.com
f263b2fd0c Fixing bug 92272. Avoid malloc(0), patch mostly by mkaply@us.ibm.com. sr=me, r=nobody (trivial fix)
git-svn-id: svn://10.0.0.236/trunk@101497 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 09:02:22 +00:00
jst%netscape.com
474e77dd29 Fixing bug 95871. Making it possible to put null pointers in nsISupportArrays. r=pavlov@netscape.com, sr=waterson@netscape.com
git-svn-id: svn://10.0.0.236/trunk@101496 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 08:51:19 +00:00
rpotts%netscape.com
5478c3dde3 Fix warnings...
git-svn-id: svn://10.0.0.236/trunk@101495 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 08:13:04 +00:00
darin%netscape.com
a29a5f6d7f fixes bug 92563 "Bad comment in nsIInputStream?" r/sr=jst
git-svn-id: svn://10.0.0.236/trunk@101494 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 06:49:46 +00:00
stephend%netscape.com
c3a6298c89 Bug 40191. Bad 'connection refused' message. Patch by Jessico Blanco <jblanco@us.ibm.com> r=jglick@netscape.com/stephend@netscape.com sr=sspitzer@netscape.com
git-svn-id: svn://10.0.0.236/trunk@101493 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 06:43:46 +00:00
hyatt%netscape.com
d22f2c03ba Fix for 96179. r=sspitzer, sr=darin
git-svn-id: svn://10.0.0.236/trunk@101492 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 06:41:21 +00:00
rpotts%netscape.com
52ded30b9f bug #96029 (r=valeski, sr=mscott) Loading cnn.com caused the sav-as dialog to appear...
git-svn-id: svn://10.0.0.236/trunk@101491 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 06:26:59 +00:00
sspitzer%netscape.com
ededf45bdc backing out an accidental check in.
git-svn-id: svn://10.0.0.236/trunk@101490 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 06:26:51 +00:00
rpotts%netscape.com
78f013faba bug #92425 (r=adamlock, sr=jst). OnLoad() handler which executes a javascript URL causes an infinite loop...
git-svn-id: svn://10.0.0.236/trunk@101489 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 06:20:53 +00:00
sspitzer%netscape.com
acaa48c1b7 fix for #95457. the open / closed state of servers and folders in the folder pane
was not persisting across sessions.  I added a new attribute to outliner "statedatasource"
that you can set to use for state, otherwise, if you are "trusted" it will use the localstore.
if not trusted, it will use an in memory datasource, which will not persist across sessions.

r/sr=bienvenu for the mailnews part, r/sr=waterson for the content part.


git-svn-id: svn://10.0.0.236/trunk@101488 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 06:18:58 +00:00
blakeross%telocity.com
8025a894e1 More fallout from xul syntax changes. r=ben sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@101487 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 06:16:33 +00:00
hyatt%netscape.com
015c7b4e92 Fix for 95422. r/sr=the usuals (brendan et al)
git-svn-id: svn://10.0.0.236/trunk@101486 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 06:14:38 +00:00
blakeross%telocity.com
24f3afdd62 Removing files used for performance testing that shouldn't be part of default build. r=hewitt sr=ben
git-svn-id: svn://10.0.0.236/trunk@101485 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 06:14:21 +00:00
sspitzer%netscape.com
d16c4dec7a more mac bustage fixage. sr=waterson
git-svn-id: svn://10.0.0.236/trunk@101484 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 05:56:48 +00:00
waterson%netscape.com
d15b77ae3e Fix Mac build bustage.
git-svn-id: svn://10.0.0.236/trunk@101481 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 04:26:03 +00:00
sspitzer%netscape.com
f05d062183 fix for #96164.
don't make a connection to the news server when updating unread counts
if there are no groups.  r/sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@101480 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 04:17:27 +00:00
waterson%netscape.com
a7ccc20459 Attempt to fix build bustage.
git-svn-id: svn://10.0.0.236/trunk@101479 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 03:30:03 +00:00
hewitt%netscape.com
20a39cba9b 93936 - die, 'work offline' text, die!, r=blake, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@101477 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 03:11:54 +00:00
hewitt%netscape.com
bb13ef3aef 95190 - buttons too tall, r=blake, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@101476 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 02:59:14 +00:00
dbaron%fas.harvard.edu
fdd5d25c83 fixing Mac bustage. b=45797
git-svn-id: svn://10.0.0.236/trunk@101475 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 02:58:44 +00:00
hewitt%netscape.com
11930ff64b 91430 - precache back and forward images, r=blake, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@101474 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 02:58:25 +00:00
brendan%mozilla.org
5f91bd99d8 Checking in shaver's patch for bug 78100, adding JS_GetExternalStringGCType (sr=brendan&jband).
git-svn-id: svn://10.0.0.236/trunk@101473 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 02:53:19 +00:00
kaie%netscape.com
2859af72c0 Fixes #88303
r=wtc@netscape.com rs=darin@netscape.com
You can reach me at kai.engert@gmx.de


git-svn-id: svn://10.0.0.236/trunk@101472 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 02:45:43 +00:00
dmose%netscape.com
894c700200 LDAP addressbook code cleanup changes from John Marmion <john.marmion@ireland.sun.com> for bug 17879 review. r=dmose@netscape.com; sr=mscott@netscape.com
git-svn-id: svn://10.0.0.236/trunk@101470 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 02:35:19 +00:00
saari%netscape.com
c3957a5361 I messed up my checkin for bug93521, I screwed up nesting when applying a patch that needed merging. Bah.
git-svn-id: svn://10.0.0.236/trunk@101469 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 02:27:34 +00:00
Xiaobin.Lu%eng.Sun.com
85ca40dcdb Fix for 77194 (liveconnect does not work for non-applet case)
r=edburns & beard sr=brendan


git-svn-id: svn://10.0.0.236/trunk@101468 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 02:23:24 +00:00
Xiaobin.Lu%eng.Sun.com
a6ddde9413 Fix for 77194 (liveconnect does not work for non-applet case)
r=edburns&beard sr=brendan


git-svn-id: svn://10.0.0.236/trunk@101467 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 02:11:10 +00:00
Xiaobin.Lu%eng.Sun.com
bdf0db8824 Fix for 77194 (liveconnect does not work for non-applet case)
r=edburns & beard sr=brendan


git-svn-id: svn://10.0.0.236/trunk@101466 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 02:04:12 +00:00
jband%netscape.com
71d7122618 bug 65727. Make it an error to not have XP_WIN defined if you are compiling on Win32. Too many people with their own build projects stumble into this hole. r=valeski sr=scc (turns out this was reviewed months ago and I neglected to check it in. My bad)
git-svn-id: svn://10.0.0.236/trunk@101465 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 01:59:55 +00:00
nicolson%netscape.com
3a78c98174 remove superfluous trace message.
git-svn-id: svn://10.0.0.236/trunk@101464 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 01:59:22 +00:00
Xiaobin.Lu%eng.Sun.com
b5a12dfb12 Fix for 77194 (liveconnect does not work for non applet case)
r=edburns & beard sr= brendan


git-svn-id: svn://10.0.0.236/trunk@101463 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 01:57:48 +00:00
dbaron%fas.harvard.edu
3485888237 Replace uses of deprecated NS_IMPL_ISUPPORTS and NS_IMPL_QUERYINTERFACE macros with NS_IMPL_{ISUPPORTS,QUERYINTERFACE}{1,0}. r=jag rs=brendan b=45797
git-svn-id: svn://10.0.0.236/trunk@101462 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 01:48:11 +00:00
waterson%netscape.com
a54036173e Bug 93100. Change NS_DECL_NSGETMODULE to be table driven so we can get at module ctor & dtor callbacks. Update meta-module and static-module stuff for this change, fix meta-module to not register stuff twice. r=cls,leaf
git-svn-id: svn://10.0.0.236/trunk@101461 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 01:47:31 +00:00
jst%netscape.com
9485c0e78a Fixing bug 95904. Comment changes only, patch mostly by drepper@cygnus.com.
git-svn-id: svn://10.0.0.236/trunk@101460 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 01:43:29 +00:00
waterson%netscape.com
e75b4e9d1a Bug 93100. Missed one file.
git-svn-id: svn://10.0.0.236/trunk@101458 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 01:25:10 +00:00
gerv%gerv.net
bf4b2f5e3e Bug 30208 - fix to avoid breaking gcc 2.7.2.3. Thanks to dbaron. r=dbaron, sr=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@101455 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 01:15:55 +00:00
rangansen%netscape.com
31382162ac Activating choice of smart card when new cert is requested
bug# 89972, r=javi, sr=blizzard


git-svn-id: svn://10.0.0.236/trunk@101454 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 01:12:38 +00:00
rangansen%netscape.com
d633dc86c5 Activating view button in download cert
bug# 81257, r=javi, sr=hewitt


git-svn-id: svn://10.0.0.236/trunk@101453 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 01:11:29 +00:00
rangansen%netscape.com
4ee328f248 Making delete crl work
bug# 95328, r=kaie, sr=hewitt


git-svn-id: svn://10.0.0.236/trunk@101452 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 01:08:48 +00:00
rangansen%netscape.com
0e9e8ab353 Localizing access keys
bug# 95578, r=rangansen sr=hewitt


git-svn-id: svn://10.0.0.236/trunk@101451 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 01:07:35 +00:00
rangansen%netscape.com
703cd83058 Making sure password strength is between 0 and 100
bug# 94179. r=ddrinan, sr=hewitt


git-svn-id: svn://10.0.0.236/trunk@101450 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 00:59:20 +00:00
rangansen%netscape.com
b472d57a07 Makes the label appear on enable/disable fips button
Bug# 95683; r=ddrinan; sr=hewitt


git-svn-id: svn://10.0.0.236/trunk@101449 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 00:57:20 +00:00
waterson%netscape.com
4e63322b10 Bug 93100. Change NS_DECL_NSGETMODULE to be table driven so we can get at module ctor & dtor callbacks. Update meta-module and static-module stuff for this change, fix meta-module to not register stuff twice. r=cls,leaf
git-svn-id: svn://10.0.0.236/trunk@101447 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 00:55:20 +00:00
locka%iol.ie
ecfed0d85b Fix for anchors that try and load content into a docshell that has already been destroyed. b=94229 r=ccarlen@netscape.com sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@101446 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 00:50:26 +00:00
aaronl%netscape.com
887b433600 Bug 96065. Active Accessibility text nodes should not be focusable. r=jgaunt, sr=brendan\
git-svn-id: svn://10.0.0.236/trunk@101445 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 00:47:07 +00:00
gerv%gerv.net
ad1e86251d Bug 96063 - the old method of doing this barfed on long URL strings.
git-svn-id: svn://10.0.0.236/trunk@101444 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 00:36:54 +00:00
mcafee%netscape.com
10c30f5782 moving cvsroot out to tinder-defaults.pl, getting rid of netscape default. Fixed a my variable so I can comment out the run_shell_command line for testing.
git-svn-id: svn://10.0.0.236/trunk@101443 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-20 22:45:25 +00:00
mcafee%netscape.com
c926aee195 minor stuff, comments, using right cvs command
git-svn-id: svn://10.0.0.236/trunk@101442 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-20 22:43:36 +00:00
sspitzer%netscape.com
903f3a55dc build changes for hyatt.
git-svn-id: svn://10.0.0.236/trunk@101441 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-20 21:58:04 +00:00
sspitzer%netscape.com
3d8afd2681 build changes for hyatt.
git-svn-id: svn://10.0.0.236/trunk@101439 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-20 21:52:15 +00:00
hyatt%netscape.com
b06293d4c4 Fix for 96042. r=dbaron, sr=sspitzer
git-svn-id: svn://10.0.0.236/trunk@101437 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-20 21:42:14 +00:00
sonmi%netscape.com
8e4502355e took hardcoded reference to clio out
git-svn-id: svn://10.0.0.236/trunk@101436 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-20 21:25:56 +00:00
sonmi%netscape.com
0a71722bf1 changed handeling of $RSH - if already set keep value
RSH is needed to be set to the current installation of WinNT,
problems on multiboot machines if c:/winnt/system32/rsh is being used
when running the Win2K from d:
also problems with MKS and cygnus rsh


git-svn-id: svn://10.0.0.236/trunk@101435 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-20 20:50:17 +00:00
sonmi%netscape.com
2f0fef135d added OSF 5.1
git-svn-id: svn://10.0.0.236/trunk@101434 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-20 20:47:52 +00:00
myk%mozilla.org
063c2aa355 Fix for bug 96085: don't allow unauthorized users to access restricted bugs that do not have a QA contact.
Patch by Myk Melez <myk@mozilla.org>
r=Jake <jake@acutex.net>


git-svn-id: svn://10.0.0.236/trunk@101433 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-20 20:36:10 +00:00
dianesun%netscape.com
682ec4ea31 Fix for bug 87177. R=buhvan, SR=sspitzer
git-svn-id: svn://10.0.0.236/trunk@101432 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-20 19:09:39 +00:00
wtc%netscape.com
fdb50e4111 Bugzilla bug 95797: fixed a typo. Thanks to Joerg Brunsmann
<joerg_brunsmann@yahoo.de> for the bug report and patch.


git-svn-id: svn://10.0.0.236/trunk@101431 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-20 19:05:34 +00:00
kestes%walrus.com
3a338c583b current as of mon aug 20
git-svn-id: svn://10.0.0.236/trunk@101430 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-20 18:59:56 +00:00
kestes%walrus.com
fc856d74e9 catch io errors from storable and give better discriptions.
git-svn-id: svn://10.0.0.236/trunk@101429 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-20 18:57:12 +00:00
jst%netscape.com
c396d662a0 Followup to Attribute --> Attr renaming...
git-svn-id: svn://10.0.0.236/trunk@101428 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-20 09:03:25 +00:00
mkaply%us.ibm.com
ea433b853c No bug - NOT PART OF BUILD
Initial checkin of xpinstall wizard for OS/2


git-svn-id: svn://10.0.0.236/trunk@101427 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-20 04:00:19 +00:00
blakeross%telocity.com
5b74314f22 another missed case of renamed command method. rs=hyatt
git-svn-id: svn://10.0.0.236/trunk@101426 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-20 02:43:34 +00:00
hyatt%netscape.com
03ac984644 Fix for 96017. r-bryner, sr-blake
git-svn-id: svn://10.0.0.236/trunk@101425 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-20 00:36:52 +00:00
myk%mozilla.org
9d8541adf1 Fix for bug 95890: Correctly convert/record keyword changes in the bugs_activity table for keywords containing a plus sign or other
regular expression meta-characters.  Myk's first ever Bugzilla checkin!
Patch by Dave Miller <justdave@syndicomm.com> and Myk Melez <myk@mozilla.org>.
r=myk@mozilla.org,justdave@syndicomm.com


git-svn-id: svn://10.0.0.236/trunk@101424 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-19 18:26:21 +00:00
gerv%gerv.net
8a61e44563 Do not add "-- " if already present in .sig file. Attempt 2. Bug 30208. r=bratell, sr=sspitzer.
git-svn-id: svn://10.0.0.236/trunk@101422 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-19 15:59:26 +00:00
varga%utcru.sk
3778ea3b2c Fix for 94652.
allow for no multiple select in outliner.
r=bryner, sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@101421 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-19 08:24:42 +00:00
blakeross%telocity.com
a3483b3aa9 add null check to prevent 6.1 topcrash (84832). r=saari sr=ben
git-svn-id: svn://10.0.0.236/trunk@101420 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-19 04:48:34 +00:00
wtc%netscape.com
540c9d67e4 Merged brendan's fix from NSPRPUB_CLIENT_BRANCH (now obsolete).
git-svn-id: svn://10.0.0.236/trunk@101419 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-19 01:22:59 +00:00
bryner%netscape.com
205255fdcd Bug 92879 - textbox select() causes window to steal focus. r=dbaron, sr=hyatt.
git-svn-id: svn://10.0.0.236/trunk@101418 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 23:55:01 +00:00
hwaara%chello.se
75ce2b24db #67369, "Bcc: field doesn't change when switching From:"
Patch by kazhik@mozilla.gr.jp

r=varada, sr=blizzard


git-svn-id: svn://10.0.0.236/trunk@101417 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 22:15:58 +00:00
wtc%netscape.com
16fc64dde5 fix unitialized key_type variable. Add asserts to it doesn't happen again.
git-svn-id: svn://10.0.0.236/trunk@101416 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 19:15:46 +00:00
dbaron%fas.harvard.edu
af4cfa0c47 Remove obsolete references to nsImageManager to fix build bustage after imglib1 removal.
git-svn-id: svn://10.0.0.236/trunk@101415 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 16:51:20 +00:00
dbaron%fas.harvard.edu
fec1844dd7 Remove obsolete references to nsImageManager to fix build bustage after imglib1 removal.
git-svn-id: svn://10.0.0.236/trunk@101414 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 16:43:50 +00:00
ccarlen%netscape.com
54c6894257 Bug 78498 - Carbonize PPEmbed. r=pinkerton/sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@101413 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 15:10:38 +00:00
markh%activestate.com
d1f00a5439 Fix a bug in interface flattening when an attribute was set before one
on the same interface was fetched.  Added test for this case too.

Not part of the build.


git-svn-id: svn://10.0.0.236/trunk@101412 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 14:27:46 +00:00
dbaron%fas.harvard.edu
f45cbae471 Add CallGetInterface. b=92602 r=jag sr=scc
git-svn-id: svn://10.0.0.236/trunk@101411 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 14:15:07 +00:00
hwaara%chello.se
64a4ea989b #3745, "Must handle Followup-to: poster in news", part II; add an alert warning the user when followup-to: poster is being used, as per the GNKSA.
r=ducarroz, sr=sspitzer


git-svn-id: svn://10.0.0.236/trunk@101410 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 12:19:49 +00:00
locka%iol.ie
b99fbdffe8 Added res/arrow.gif and res/arrowd.gif to embedding manifests to fix drawing problem with form combo boxes. b=95310 r=jeff@tcbnetworks.com sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@101409 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 10:18:09 +00:00
locka%iol.ie
00261ca7b8 Changed memory allocation and stack usage to be less brutal as the DOM is being walked. b=92534 r=rjesup@wgate.com sr=blizzard@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@101408 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 09:59:28 +00:00
bryner%netscape.com
bf9fa1fa2f Bug 66617 - if tabbing scrolls page, focus outline doesn't leave first link (second try). r=saari, sr=hyatt.
git-svn-id: svn://10.0.0.236/trunk@101405 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 07:25:52 +00:00
sfraser%netscape.com
c3f049538f Fix the output file of the headers target, which is a dummy file used for dependency tracking. It was the same as that in AutoCompleteIDL.mcp, which caused these IDL-generated headers to not be created.
git-svn-id: svn://10.0.0.236/trunk@101400 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 04:27:05 +00:00
cls%seawood.org
8b17e5e0ca Making sure that we export & build LDAP before mailnews like we do on every other platform. This might fix the current bustage possibly related to bug #89198
git-svn-id: svn://10.0.0.236/trunk@101399 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 04:15:19 +00:00
jake%acutex.net
4d649ab63c Refixing bug 95875 - The code that breakes the typed in CC list into individual lists is now slightly more robust and allows perl to handle the splitting more efficiently (by using a space as the delimiter).
r= myk@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@101398 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 03:35:36 +00:00
dbaron%fas.harvard.edu
29b48554fd Fix accumulated P3P build bustage. b=75924 (and 62399) moa=harishd sr=tor
git-svn-id: svn://10.0.0.236/trunk@101397 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 03:05:48 +00:00
blakeross%telocity.com
f7df03c0cb First cut of drag and drop bookmark filing (53707: dragging a link onto bookmarks button should open menu; dragging over subfolders should open them). r=hewitt sr=ben
git-svn-id: svn://10.0.0.236/trunk@101396 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 02:44:35 +00:00
jaggernaut%netscape.com
df49ed7ff7 Fix mac bustage (I hope)
git-svn-id: svn://10.0.0.236/trunk@101394 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 02:12:35 +00:00
hyatt%netscape.com
a9b4d33720 Fix leaks. r=jag, sr=blake
git-svn-id: svn://10.0.0.236/trunk@101392 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 02:03:37 +00:00
ccarlen%netscape.com
7cfbc7bde4 Bug 78498 - Carbonize PPEmbed - adding new files. r=pinkerton/sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@101391 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 01:57:33 +00:00
justdave%syndicomm.com
1136151446 Fix for bug 95857: process_bugs.cgi sees blank address in cc: line (would show up as __UNKNOWN__)
Patch by Myk Melez <myk@mozilla.org>
r= justdave@syndicomm.com


git-svn-id: svn://10.0.0.236/trunk@101390 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 01:49:02 +00:00
dbaron%fas.harvard.edu
2049bb32c3 Add REQUIRES lines. b=75924 r=cls
git-svn-id: svn://10.0.0.236/trunk@101389 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 01:17:02 +00:00
syd%netscape.com
255b5688c7 Fix for 65672. Add CRC checking and single connection ftp to install.
r=dveditz, sr=mscott


git-svn-id: svn://10.0.0.236/trunk@101388 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 01:15:59 +00:00
dbaron%fas.harvard.edu
4e410a3ede Clean up makefile listings for extensions. b=75924 r=cls
git-svn-id: svn://10.0.0.236/trunk@101387 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 01:14:23 +00:00
dbaron%fas.harvard.edu
c4495112a3 At least list all the files we do have. b=75924 r=cls
git-svn-id: svn://10.0.0.236/trunk@101386 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 01:12:29 +00:00
dbaron%fas.harvard.edu
e8cd401a1c Add REQUIRES lines. b=75924 r=cls
git-svn-id: svn://10.0.0.236/trunk@101385 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 01:09:46 +00:00
dbaron%fas.harvard.edu
e05c7dff20 Add autoconf |Makefile.in|s. r=cls b=75924
git-svn-id: svn://10.0.0.236/trunk@101384 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 01:08:54 +00:00
dbaron%fas.harvard.edu
1f2556263d Fix makefile to work with objdir builds. b=75924 r=cls
git-svn-id: svn://10.0.0.236/trunk@101383 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 01:07:08 +00:00
hyatt%netscape.com
83bb56dc40 Fix for 94943. r=jag, sr=blake
git-svn-id: svn://10.0.0.236/trunk@101382 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 01:04:47 +00:00
thesteve%netscape.com
0319de1366 Bug #81373: landing the mac static build: making MailNews a meta-component.
This new file is Mac ONLY. Furthermore, it is specific to the mac static build, and CAN NOT break the existing mac builds.


git-svn-id: svn://10.0.0.236/trunk@101379 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 00:55:03 +00:00
thesteve%netscape.com
bacecdfe25 Bug #81373: landing the mac static build: making security a meta-component.
This new file is Mac ONLY. Furthermore, it is specific to the mac static build, and CAN NOT break the existing mac builds.


git-svn-id: svn://10.0.0.236/trunk@101378 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 00:54:03 +00:00
dmose%netscape.com
e2fb9a8f10 Update REQUIRES line to fix MOZ_TRACK_MODULE_DEPS bustage; the dependency on 'widget' might conceivably be avoidable, however.
git-svn-id: svn://10.0.0.236/trunk@101377 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 00:39:53 +00:00
av%netscape.com
e971f4e9e1 Fixing 73436 -- hiding platform specific calls in xp files, not part of the build, r=peterl
git-svn-id: svn://10.0.0.236/trunk@101376 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 00:13:37 +00:00
av%netscape.com
c3a92267af Fixing project file for the spy plugin reflecting new folder structure, not part of the build, r=av
git-svn-id: svn://10.0.0.236/trunk@101375 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 00:11:16 +00:00
cmanske%netscape.com
cd82b1c709 Add 'List Item' property menuitem by neil@parkwaycc.co.uk, b=95085, r=cmanske, sr=kin
git-svn-id: svn://10.0.0.236/trunk@101374 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 00:10:37 +00:00
dmose%netscape.com
bb7a2da9d4 Build ordering issues busted the clobber builds; forward declaring an interface and moving a #include around to fix.
git-svn-id: svn://10.0.0.236/trunk@101373 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 00:04:54 +00:00
rangansen%netscape.com
facf701071 Rolling back last change
git-svn-id: svn://10.0.0.236/trunk@101372 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-18 00:02:16 +00:00
rangansen%netscape.com
46e3a96ae3 Rolling back last change
git-svn-id: svn://10.0.0.236/trunk@101371 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 23:55:46 +00:00
dsirnapalli%netscape.com
6114c5757a Made some changes to put the test case on ngdriver.
git-svn-id: svn://10.0.0.236/trunk@101369 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 23:41:14 +00:00
rangansen%netscape.com
a9835bd5ed Changing xul window id to remove effect of persistence
bug# 95441, r=javi sr=hewitt


git-svn-id: svn://10.0.0.236/trunk@101368 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 23:35:44 +00:00
rangansen%netscape.com
4fb0f4ca49 Changing dialog title
bug# 94026, r=rangansen. sr=hewitt


git-svn-id: svn://10.0.0.236/trunk@101367 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 23:34:36 +00:00
heikki%netscape.com
57ec326731 Bug 15089, make XML parser error messages localizable. r=harishd,ftang, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@101364 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 23:27:20 +00:00
ian%hixie.ch
2fa1204013 Make the canvas background use the root element's frame's origin instead of the canvas frame's origin. Bug 46446; r=dcone, sr=attinasi
git-svn-id: svn://10.0.0.236/trunk@101363 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 23:26:29 +00:00
av%netscape.com
41c8b588ee Fixing 73430 -- removing MFC dependency from Windows project, not part of the build patch by timeless, r=av
git-svn-id: svn://10.0.0.236/trunk@101362 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 23:11:02 +00:00
akkana%netscape.com
877c882bea 92331: revert plaintext quote pref back to using pre. r=mcafee sr=blizzard
git-svn-id: svn://10.0.0.236/trunk@101361 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 23:00:41 +00:00
peterlubczynski%netscape.com
fdc7d9f811 Fix for crash on Mac when we don't have an mWidget, bug 83155 Browser crashes when trying to load html parameter test on mac, r=bnesse sr=waterson
git-svn-id: svn://10.0.0.236/trunk@101360 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 22:52:12 +00:00
sicking%bigfoot.com
5c701fdeff Fix default-priorities for patterns and priorities for templates.
b=84677 r=Pike sr=shaver


git-svn-id: svn://10.0.0.236/trunk@101359 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 22:42:16 +00:00
cmanske%netscape.com
19ddbf2e73 Fixed Advanced Editor dialog bugs (fixed warnings, user input filter rules, dynamic value menulist for particular attributes): bugs 86710, 86712, 86713, 86934, 88878, 88888, 88917, 88923, 88930, 88935, 89445, 92554 (includes help from stephend), r=brade (86713=rcassin, 92554=glazman), sr=kin; fix to 95085 by neil@parkwayscc.co.uk, r=cmanske, sr=kin
git-svn-id: svn://10.0.0.236/trunk@101358 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 22:41:52 +00:00
naving%netscape.com
58e1261023 95720 r/sr=bienvenu. Make minor change to pop3 NSPR_LOG
git-svn-id: svn://10.0.0.236/trunk@101357 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 22:38:26 +00:00
av%netscape.com
54b5c1e0ad Bug 73874 -- sample plugin (4.x scriptability), not part of the build, r=peterl
git-svn-id: svn://10.0.0.236/trunk@101356 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 22:36:46 +00:00
brade%netscape.com
61b6143771 not in the build
git-svn-id: svn://10.0.0.236/trunk@101355 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 22:34:11 +00:00
dmose%netscape.com
78ac63fcea Fix RFC 822 quoting for LDAP autocompleted display names (bug 89198). Fix works by creating a new "formatter" interface and implementing an addressbook-specific version of it which uses the mailnews quoting code to fix it up. Also provides infrastructure for setting the LDAP autocomplete dropdown comment field, and fixes some error-handling issues in the compose window code for setting up LDAP autocompletion. r=leif@netscape.com (backend changes), srilatha@netscape.com (compose window changes); sr=bienvenu@netscape.com'
git-svn-id: svn://10.0.0.236/trunk@101354 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 22:32:35 +00:00
dmose%netscape.com
956ad82821 Fix RFC 822 quoting for LDAP autocompleted display names (bug 89198). Fix works by creating a new "formatter" interface and implementing an addressbook-specific version of it which uses the mailnews quoting code to fix it up. Also provides infrastructure for setting the LDAP autocomplete dropdown comment field, and fixes some error-handling issues in the compose window code for setting up LDAP autocompletion. r=leif@netscape.com (backend changes), srilatha@netscape.com (compose window changes); sr=bienvenu@netscape.com
git-svn-id: svn://10.0.0.236/trunk@101353 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 22:32:28 +00:00
harishd%netscape.com
9a07a3e168 94903 - Don't forgot to resume parsing if loading external js fails.
r=heikki,sr=jst


git-svn-id: svn://10.0.0.236/trunk@101351 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 22:24:39 +00:00
av%netscape.com
ec4a2b1c71 Bug 73874 -- sample plugin (4.x scriptability), not part of the build, r=peterl
git-svn-id: svn://10.0.0.236/trunk@101350 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 22:23:41 +00:00
heikki%netscape.com
1dcce3a581 Bug 85554, xml-stylesheet PI should work only in prolog. r=peterv, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@101349 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 22:19:37 +00:00
loadrunner%betak.net
61e9fc5f07 bug 76444, JavaScript error when Adding Language in Preferences, r=jag, sr=blizzard
git-svn-id: svn://10.0.0.236/trunk@101348 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 22:17:56 +00:00
dcone%netscape.com
9647b47a8d b=91290 fix for printing regression tests r=karnaze sr=waterson
git-svn-id: svn://10.0.0.236/trunk@101347 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 22:16:17 +00:00
dcone%netscape.com
70733590f6 b=91290 fix for printing regression test. r=karnaze sr=waterson
git-svn-id: svn://10.0.0.236/trunk@101346 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 22:14:22 +00:00
sicking%bigfoot.com
06d6d324d4 Fix crash by makeing sure that no Expr objects are deleted until the entire transform is done.
b=91332 r=Pike sr=shaver


git-svn-id: svn://10.0.0.236/trunk@101345 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 22:12:07 +00:00
wtc%netscape.com
2bc7a42751 Added to support Tru64 Unix V5.1.
git-svn-id: svn://10.0.0.236/trunk@101344 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 22:03:33 +00:00
wtc%netscape.com
ab3cc687dd Bugzilla bug 82259: added the XP_OS2 case.
git-svn-id: svn://10.0.0.236/trunk@101341 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 20:58:05 +00:00
jake%acutex.net
e7597bc03e Fix for bug 95747 - CC List validation (for additions) wasn't happening until after the bug's changes were in the process of being commited. This caused problems if a typo was made in the e-mail address.
r= myk@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@101338 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 20:18:33 +00:00
waldemar%netscape.com
0f612cd98b Renamed a few semantic types. Added 'named' parameter attribute.
git-svn-id: svn://10.0.0.236/trunk@101337 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 20:04:04 +00:00
waldemar%netscape.com
0fff7a6ee9 Tags with fields are now depicted with the 'tuple' keyword instead of 'tag'
git-svn-id: svn://10.0.0.236/trunk@101336 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 20:03:11 +00:00
blizzard%redhat.com
ac9d1a4c2e Back out brendan's checkin to try and get linux starting up again.
git-svn-id: svn://10.0.0.236/trunk@101334 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 19:45:11 +00:00
waterson%netscape.com
2d8777b061 Oops. Cut too deep.
git-svn-id: svn://10.0.0.236/trunk@101333 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 19:40:45 +00:00
sonmi%netscape.com
2ba4ec7a94 removed AIX 32 bit and HP 32 bit
git-svn-id: svn://10.0.0.236/trunk@101330 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 18:34:05 +00:00
waterson%netscape.com
cbaa99ac97 Bug 95780. Rename locale.dll back to nslocale.dll so installer doesn't freak out.
git-svn-id: svn://10.0.0.236/trunk@101329 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 18:00:14 +00:00
javi%netscape.com
85681d6c82 Add NSS.prefix to the optimized target of NSSckbi.shlb
git-svn-id: svn://10.0.0.236/trunk@101328 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 17:29:57 +00:00
thayes%netscape.com
ac5431535c Bug 95531 - correct ref count on certificate in CMS (SMIME) recipient
handling.


git-svn-id: svn://10.0.0.236/trunk@101324 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 16:48:50 +00:00
vishy%netscape.com
4a46dcf20b bugscape 7843, there was a typo in bookmarks.xul, changed label to accesskey so that keyboard access works properly, sorry for no review but this is trivial
git-svn-id: svn://10.0.0.236/trunk@101320 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 14:46:52 +00:00
kaie%netscape.com
b5a29b81c7 #95334, adding mime types for download certificate revocation lists
r=ssaux@netscape.com sr=blizzard@mozilla.org
You can reach me at kai.engert@gmx.de


git-svn-id: svn://10.0.0.236/trunk@101319 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 14:44:35 +00:00
kaie%netscape.com
f92c6df558 #92131, SSL client authentication,
fixing memory leak, fixing crash, fixing spacing, adding extra space to layout
r=javi@netscape.com sr=blizzard@mozilla.org
You can reach me at kai.engert@gmx.de


git-svn-id: svn://10.0.0.236/trunk@101318 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 14:41:01 +00:00
despotdaemon%netscape.com
4cc466f6f1 Pseudo-automatic update of changes made by cls@seawood.org.
git-svn-id: svn://10.0.0.236/trunk@101317 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 14:33:14 +00:00
peterlubczynski%netscape.com
ffbd960a99 Fixing Carbon bustage (where is the carbon tinderbox?)
git-svn-id: svn://10.0.0.236/trunk@101313 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 14:30:45 +00:00
nboyd%atg.com
d78515b0e1 Subject:
Rhino: Problem in NativeJavaMethod
   Date:
        Tue, 14 Aug 2001 10:23:35 +0200
   From:
        felix.meschberger@day.com
     To:
        Norris Boyd <nboyd@atg.com>




Hi Norris,

While working with wrapped Java classes we discovered a problem in
NativeJavaMethod : If the public method to be called is part of a
non-public class, the Sun Java VM throws an IllegalAccessException. This
bug in the Sun VM has been reported as Bug 4071593 to Sun, but has not been
resolved since....

I implemented a circumvention, for which I provide you the patch. I quickly
tested it, and it seems to work.

Regards
Felix


git-svn-id: svn://10.0.0.236/trunk@101312 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 14:29:48 +00:00
dcone%netscape.com
a288b8f058 b=94546 r=peterl sr=attinasi. Fixed the printdialog so it is Modal for windows.
git-svn-id: svn://10.0.0.236/trunk@101308 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 14:11:05 +00:00
cmanske%netscape.com
19dab37d4e Remove reference to unused variables, b=86705, r=mjudge, sr=kin
git-svn-id: svn://10.0.0.236/trunk@101307 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 14:07:33 +00:00
cmanske%netscape.com
a7f2ac4447 Use href URL as link text in Link properties dialog, b=90230, r=brade, sr=kin
git-svn-id: svn://10.0.0.236/trunk@101305 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 13:54:41 +00:00
wtc%netscape.com
1f779f80d2 Bugzilla bug 95744: handle the case that ENOTEMPTY and EEXIST have the
same value.  (They do on AIX 4.3.)


git-svn-id: svn://10.0.0.236/trunk@101302 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 13:31:15 +00:00
jake%acutex.net
c097cb3b32 Fix for bug 95731: "INSERT INTO shadowlog" failed because "Table 'shadowlog' not locked", fixed typo in lock tables command.
Patch by Myk Melez <myk@mozilla.org>
r= jake@acutex.net


git-svn-id: svn://10.0.0.236/trunk@101301 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 12:42:34 +00:00
leaf%mozilla.org
46984d96e6 Automated update
git-svn-id: svn://10.0.0.236/trunk@101300 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 12:13:57 +00:00
cls%seawood.org
4df6348887 Do not set initial variables to 0 unless you explicitly test using ifeq (1,$(var)) in the makefiles. gmake will treat variables set to 0 as defined.
git-svn-id: svn://10.0.0.236/trunk@101299 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 12:11:48 +00:00
cls%seawood.org
99b12b961f Use mozLock instead of flock() when building lists.
git-svn-id: svn://10.0.0.236/trunk@101298 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 12:06:03 +00:00
cls%seawood.org
a3454095af Pull using the NSPRPUB_PRE_4_2_CLIENT_BRANCH instead of the static tag.
r=leaf


git-svn-id: svn://10.0.0.236/trunk@101297 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 11:17:02 +00:00
justdave%syndicomm.com
b2c6ce4e69 Fix for bug 95743: the role-accessible checkboxes were getting cleared if a user with group access had to log in to make changes to a public bug.
Patch by Myk Melez <myk@mozilla.org>
r= justdave@syndicomm.com


git-svn-id: svn://10.0.0.236/trunk@101296 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 11:15:04 +00:00
brendan%mozilla.org
f6e26a3367 Don't resolve standard classes if JSRESOLVE_ASSIGNING (NOT PART OF BUILD).
git-svn-id: svn://10.0.0.236/trunk@101295 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 10:40:15 +00:00
brendan%mozilla.org
9bf59a0feb Checking in khanson's patch with whitespace cleanups for bug 89443, to avoid stack overflow on too many || operators in one expression (r=rogerl, sr=me).
git-svn-id: svn://10.0.0.236/trunk@101294 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 10:29:59 +00:00
brendan%mozilla.org
89a27dff8f Shrinking realloc can fail (95517, basic patch from epstein@tellme.com, r=brendan, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@101292 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 09:56:48 +00:00
bryner%netscape.com
6c440dcc36 Fixing SVG bustage.
git-svn-id: svn://10.0.0.236/trunk@101291 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 09:56:46 +00:00
bryner%netscape.com
7b3ce3a03b Fixing mathml bustage.
git-svn-id: svn://10.0.0.236/trunk@101290 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 09:54:04 +00:00
brendan%mozilla.org
cad980f881 - Better failure codes from nsXULPrototypeScript::Deserialize.
- Call nsXULDocument::AbortFastLoads after nsXULPrototypeScript::Serialize
  failure, instead of just nulling the FastLoad service's output stream.

- Expose nsXULDocument::AbortFastLoads via nsIXULPrototypeCache, for use from
  nsChromeProtocolHandler.cpp.  AbortFastLoads flushes the XUL cache now, for
  good measure.

- The needless "Current" adjective in nsIFastLoadService attribute and method
  names is no more.

- Add a do_GetFastLoadService() helper, to use CID instead of contractid, and
  to let the compiler consolidate the static inline CID.

- Add "nglayout.debug.checksum_xul_fastload_file" pref so people can do without
  the checksum verification step when reading a FastLoad file.

- Verify the FastLoad file checksum, by default.  Also, cache it in the FastLoad
  service so we don't recompute it when re-opening the FastLoad file as mailnews
  and other top-levels start up.  Fill the checksum cache in EndFastLoad, when
  the last pseudo-concurrent top-level finishes loading.

  My hope to compute the checksum while writing the FastLoad file ran afoul of
  misordered writes.  The old code to checksum the in-memory nsFastLoadHeader
  also was broken on little endian platforms.  Now all checksumming is done via
  a separate read pass over the complete file, save for the header's checksum
  field, which is summed as if it contained zero.

- Track and check FastLoad file dependencies.  This required groveling with a
  bunch of Necko interfaces in nsChromeProtocolHandler::NewChannel -- read it
  and weep.  Dependency checking, as well as checksum access and computation,
  use better-factored nsIFastLoad{File,Read,Write}Control interfaces.

- nsBufferedStream::Seek wasn't flushing the buffer when seeking backward
  within the buffer, but it must, because mCursor bounds the amount to write
  if the buffer contains the end of file.

- Add an unbufferedStream readonly attribute to nsIStreamBufferAccess, so we
  don't have to screw around with the bufferying layer when checksumming. Also
  implement nsIStreamBufferAccess in nsBufferedOutputStream.

- nsISeekableOutputStream was bogus, based on a bad state I had put the
  nsBufferedOutputStream code in on its way from being completely broken when
  you seek backwards outside of the buffer.  Removing this interface required
  using nsIFastLoadFileIO in nsFastLoadFileWriter, and it also required careful
  ordering of Close calls (the Writer or Updater must close after the Reader,
  so that the Reader's underlying, unbuffered input stream can be read by
  nsFastLoadFileWriter::Close to compute the checksum.

- Miscellaneous tab/indentation, comment typo, bracing, if( => if ( style,
  nsnull vs. 0, useless variable elimination, tortured control flow,
  AutoString instead of String, and gratuitous ; after nsISupportsUtils.h
  macro call cleanups.


git-svn-id: svn://10.0.0.236/trunk@101289 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 09:52:55 +00:00
bryner%netscape.com
89ad8fb4c6 Fixing mac bustage, I hope.
git-svn-id: svn://10.0.0.236/trunk@101288 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 09:44:54 +00:00
waterson%netscape.com
375fff5fe0 Stab at fixing OS/2 bustage.
git-svn-id: svn://10.0.0.236/trunk@101287 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 09:40:23 +00:00
bryner%netscape.com
fc0aad073f Fixing win32 bustage.
git-svn-id: svn://10.0.0.236/trunk@101286 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 09:09:27 +00:00
justdave%syndicomm.com
715a4d1008 Fix for bug 95731: "INSERT INTO shadowlog" failed because "Table 'shadowlog' not locked", fixed typo in lock tables command.
Patch by Myk Melez <myk@mozilla.org>
r= justdave@syndicomm.com


git-svn-id: svn://10.0.0.236/trunk@101285 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 08:38:54 +00:00
waterson%netscape.com
0a0078ba6a Bug 94831, redux. Fix windows static build stuff.
git-svn-id: svn://10.0.0.236/trunk@101284 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 08:38:26 +00:00
bryner%netscape.com
7da361b479 Bug 66835 - fix method hiding warnings by renaming some methods on nsIContent. r=jag, sr=jst.
git-svn-id: svn://10.0.0.236/trunk@101283 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 08:14:14 +00:00
cls%seawood.org
7c473115e1 Removing hardcoded test for TestGtkEmbed as not all of our platforms build TestGtkEmbed by default
git-svn-id: svn://10.0.0.236/trunk@101282 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 08:12:31 +00:00
cls%seawood.org
bf0ad62e6b Stop pulling psm1. Bug #78975 r=leaf sr=sfraser
git-svn-id: svn://10.0.0.236/trunk@101281 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 07:50:15 +00:00
waterson%netscape.com
556a7ee768 Bug 94831. Convert locale into a generic module. r/sr=nobody
git-svn-id: svn://10.0.0.236/trunk@101279 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 05:54:29 +00:00
waterson%netscape.com
d11171b5e7 Bug 94831. Convert locale stuff to generic module. r/sr=nobody: I am the devil.
git-svn-id: svn://10.0.0.236/trunk@101278 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 05:52:48 +00:00
jst%netscape.com
541f0e0bd9 Fixing bug 88151, anchor.accessKey wasn't working correctly. r=heikki@netscape.com, sr=waterson@netscape.com
git-svn-id: svn://10.0.0.236/trunk@101277 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 04:52:13 +00:00
rjesup%wgate.com
e55dbe1a1e Fix for evil win32 compiler to unhork build. sr=hyatt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@101274 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 04:46:35 +00:00
rjesup%wgate.com
eb7a5f2ca8 Checkin for buig 92641. Cuts 1000ish allocations from startup; doesn't dup schem as often. r=dougt@netscape.com sr=hyatt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@101273 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 04:01:38 +00:00
leaf%mozilla.org
b7f2f63bb9 Automated update
git-svn-id: svn://10.0.0.236/trunk@101272 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 03:13:56 +00:00
jgaunt%netscape.com
92c01c45b6 fix for bug 94768
r=smfr,leaf
sr=hyatt


git-svn-id: svn://10.0.0.236/trunk@101271 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 03:13:07 +00:00
saari%netscape.com
0a7ae8e975 Fix for bug 93521, selections are sometimes grayed out. r=bryner, sr=hyatt
git-svn-id: svn://10.0.0.236/trunk@101268 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 02:38:41 +00:00
saari%netscape.com
64bddd3cc3 Fix for bug 82569, a simple null check to patch over a crash some people are seeing from talkback.
r=blake, sr=jst


git-svn-id: svn://10.0.0.236/trunk@101267 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 02:30:22 +00:00
leaf%mozilla.org
4f878214fe Automated update
git-svn-id: svn://10.0.0.236/trunk@101266 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 02:14:02 +00:00
waterson%netscape.com
5af445c54c modify mac project files for MOZ_TIMELINE tool, bug 78793
git-svn-id: svn://10.0.0.236/trunk@101265 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 02:04:20 +00:00
69 changed files with 9230 additions and 5885 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,219 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
* ex: set tabstop=8 softtabstop=2 shiftwidth=2 expandtab:
*
* 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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef nsFontMetricsGTK_h__
#define nsFontMetricsGTK_h__
#include "nsDeviceContextGTK.h"
#include "nsIFontMetrics.h"
#include "nsIFontEnumerator.h"
#include "nsFont.h"
#include "nsString.h"
#include "nsUnitConversion.h"
#include "nsIDeviceContext.h"
#include "nsCRT.h"
#include "nsCOMPtr.h"
#include "nsRenderingContextGTK.h"
#include "nsICharRepresentable.h"
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#undef FONT_HAS_GLYPH
#define FONT_HAS_GLYPH(map, char) IS_REPRESENTABLE(map, char)
typedef struct nsFontCharSetInfo nsFontCharSetInfo;
typedef gint (*nsFontCharSetConverter)(nsFontCharSetInfo* aSelf,
XFontStruct* aFont, const PRUnichar* aSrcBuf, PRInt32 aSrcLen,
char* aDestBuf, PRInt32 aDestLen);
struct nsFontCharSet;
struct nsFontFamily;
struct nsFontNode;
struct nsFontStretch;
class nsFontGTKUserDefined;
class nsFontMetricsGTK;
class nsFontGTK
{
public:
nsFontGTK();
virtual ~nsFontGTK();
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
void LoadFont(void);
PRBool IsEmptyFont(GdkFont*);
inline int SupportsChar(PRUnichar aChar)
{ return mFont && FONT_HAS_GLYPH(mMap, aChar); };
virtual GdkFont* GetGDKFont(void);
virtual PRBool GetGDKFontIs10646(void);
virtual gint GetWidth(const PRUnichar* aString, PRUint32 aLength) = 0;
virtual gint DrawString(nsRenderingContextGTK* aContext,
nsDrawingSurfaceGTK* aSurface, nscoord aX,
nscoord aY, const PRUnichar* aString,
PRUint32 aLength) = 0;
#ifdef MOZ_MATHML
// bounding metrics for a string
// remember returned values are not in app units
// - to emulate GetWidth () above
virtual nsresult
GetBoundingMetrics(const PRUnichar* aString,
PRUint32 aLength,
nsBoundingMetrics& aBoundingMetrics) = 0;
#endif
PRUint32* mMap;
nsFontCharSetInfo* mCharSetInfo;
char* mName;
nsFontGTKUserDefined* mUserDefinedFont;
PRUint16 mSize;
PRInt16 mBaselineAdjust;
protected:
GdkFont* mFont;
PRBool mAlreadyCalledLoadFont;
};
class nsFontMetricsGTK : public nsIFontMetrics
{
public:
nsFontMetricsGTK();
virtual ~nsFontMetricsGTK();
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
NS_DECL_ISUPPORTS
NS_IMETHOD Init(const nsFont& aFont, nsIAtom* aLangGroup,
nsIDeviceContext* aContext);
NS_IMETHOD Destroy();
NS_IMETHOD GetXHeight(nscoord& aResult);
NS_IMETHOD GetSuperscriptOffset(nscoord& aResult);
NS_IMETHOD GetSubscriptOffset(nscoord& aResult);
NS_IMETHOD GetStrikeout(nscoord& aOffset, nscoord& aSize);
NS_IMETHOD GetUnderline(nscoord& aOffset, nscoord& aSize);
NS_IMETHOD GetHeight(nscoord &aHeight);
NS_IMETHOD GetNormalLineHeight(nscoord &aHeight);
NS_IMETHOD GetLeading(nscoord &aLeading);
NS_IMETHOD GetEmHeight(nscoord &aHeight);
NS_IMETHOD GetEmAscent(nscoord &aAscent);
NS_IMETHOD GetEmDescent(nscoord &aDescent);
NS_IMETHOD GetMaxHeight(nscoord &aHeight);
NS_IMETHOD GetMaxAscent(nscoord &aAscent);
NS_IMETHOD GetMaxDescent(nscoord &aDescent);
NS_IMETHOD GetMaxAdvance(nscoord &aAdvance);
NS_IMETHOD GetFont(const nsFont *&aFont);
NS_IMETHOD GetLangGroup(nsIAtom** aLangGroup);
NS_IMETHOD GetFontHandle(nsFontHandle &aHandle);
virtual nsresult GetSpaceWidth(nscoord &aSpaceWidth);
nsFontGTK* FindFont(PRUnichar aChar);
nsFontGTK* FindUserDefinedFont(PRUnichar aChar);
nsFontGTK* FindStyleSheetSpecificFont(PRUnichar aChar);
nsFontGTK* FindStyleSheetGenericFont(PRUnichar aChar);
nsFontGTK* FindLangGroupPrefFont(nsIAtom* aLangGroup, PRUnichar aChar);
nsFontGTK* FindLangGroupFont(nsIAtom* aLangGroup, PRUnichar aChar, nsCString* aName);
nsFontGTK* FindAnyFont(PRUnichar aChar);
nsFontGTK* FindSubstituteFont(PRUnichar aChar);
nsFontGTK* SearchNode(nsFontNode* aNode, PRUnichar aChar);
nsFontGTK* TryAliases(nsCString* aName, PRUnichar aChar);
nsFontGTK* TryFamily(nsCString* aName, PRUnichar aChar);
nsFontGTK* TryNode(nsCString* aName, PRUnichar aChar);
nsFontGTK* TryNodes(nsAWritableCString &aFFREName, PRUnichar aChar);
nsFontGTK* TryLangGroup(nsIAtom* aLangGroup, nsCString* aName, PRUnichar aChar);
nsFontGTK* AddToLoadedFontsList(nsFontGTK* aFont);
nsFontGTK* PickASizeAndLoad(nsFontStretch* aStretch,
nsFontCharSetInfo* aCharSet,
PRUnichar aChar,
const char *aName);
static nsresult FamilyExists(const nsString& aFontName);
//friend struct nsFontGTK;
nsFontGTK **mLoadedFonts;
PRUint16 mLoadedFontsAlloc;
PRUint16 mLoadedFontsCount;
nsFontGTK *mSubstituteFont;
nsCStringArray mFonts;
PRUint16 mFontsIndex;
nsVoidArray mFontIsGeneric;
nsCAutoString mDefaultFont;
nsCString *mGeneric;
nsCOMPtr<nsIAtom> mLangGroup;
nsCAutoString mUserDefined;
PRUint8 mTriedAllGenerics;
PRUint8 mIsUserDefined;
protected:
void RealizeFont();
nsIDeviceContext *mDeviceContext;
nsFont *mFont;
nsFontGTK *mWesternFont;
nscoord mLeading;
nscoord mEmHeight;
nscoord mEmAscent;
nscoord mEmDescent;
nscoord mMaxHeight;
nscoord mMaxAscent;
nscoord mMaxDescent;
nscoord mMaxAdvance;
nscoord mXHeight;
nscoord mSuperscriptOffset;
nscoord mSubscriptOffset;
nscoord mStrikeoutSize;
nscoord mStrikeoutOffset;
nscoord mUnderlineSize;
nscoord mUnderlineOffset;
nscoord mSpaceWidth;
PRUint16 mPixelSize;
PRUint8 mStretchIndex;
PRUint8 mStyleIndex;
nsFontCharSetConverter mDocConverterType;
};
class nsFontEnumeratorGTK : public nsIFontEnumerator
{
public:
nsFontEnumeratorGTK();
NS_DECL_ISUPPORTS
NS_DECL_NSIFONTENUMERATOR
};
#endif

View File

@@ -0,0 +1,78 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Srilatha Moturi <srilatha@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
interface nsIDOMWindow;
/**
* This interface provides support for registering Mozilla as the default
* Mail Client. This interface can also be used to get/set the user preference
* for the default Mail Client.
*
*/
[scriptable, uuid(c5be14ba-4e0a-4eec-a1b8-04363761d63c)]
interface nsIMapiRegistry: nsISupports {
/** This is set to TRUE if Mozilla is the default Application
*/
readonly attribute boolean isDefaultMailClient;
/** This is set TRUE only once per session.
*/
readonly attribute boolean showDialog;
/** This will update the registry keys to set Mozilla as default Mail Client.
*/
void setDefaultMailClient();
/** This will reset the registry keys for the default Mail Client.
*/
void unsetDefaultMailClient();
/** This will bring the dialog asking the user if he/she wants to set
* Mozilla as default Mail Client.
* Call this only if Mozilla is not the default Mail client
*/
void showMailIntegrationDialog(in nsIDOMWindow parentWindow);
};
%{C++
#define NS_IMAPIWINHOOK_CONTRACTID "@mozilla.org/mapiregistry;1"
#define NS_IMAPIWINHOOK_CLASSNAME "Mozilla MAPI Registry"
%}

View File

@@ -0,0 +1,57 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 97">
<meta name="GENERATOR" content="Mozilla/4.7 [en] (WinNT; U) [Netscape]">
</head>
<body>
<blockquote><b><u><font face="Arial"><font size=+0>Instruction for using
the MAPI_SUPP_BRANCH for the Mapi Support feature</font></font></u></b></blockquote>
<ol>
<li>
<font face="Arial"><font size=+0>Get the latest 0.94 branch or the the
trunk and build it</font></font></li>
</ol>
<ol>
<li>
<font face="Arial"><font size=+0>Now go to the dir where u have mozilla
and get the branch from Mapi, do :</font></font></li>
</ol>
<font face="Arial"><font size=+0>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
"cvs co -rMAPI_SUPP_BRANCH mozilla/mailnews/mapi".</font></font>
<p><font face="Arial"><font size=+0>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
This will get the latest branch for mapi support. The branch MAPI_SUPP_BRANCH
for mapi support is NOT the full tree,</font></font>
<br><i><font face="Arial"><font size=+0>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
it is just the mapi&nbsp; dir within mozilla/mailnews.</font></font></i>
<ol>
<li>
<font face="Arial"><font size=+0>Go to mozilla/mailnews/mapi, build the
mapi dir : 'nmake -f makefile.win'.&nbsp; This completes the building part.</font></font></li>
</ol>
<ol>
<li>
<font face="Arial"><font size=+0>Now run mozilla from your build. Go to
menuitem Edit/Preferences, this will&nbsp; bring up the Preferences dialog.
Go to category Mail &amp; NewsGroups. In the General setting section u
will see the checkbox 'Use Mozilla Mail as the default mail application.'
Check the checkbox to enable the MAPI support in Mozilla and close the
Prefs dialog.</font></font></li>
</ol>
<ol>
<li>
<font face="Arial"><font size=+0>You are now ready to test the mozilla's
MAPI support. Run Word, WordPad, Powerpoint, or Excel. Open a document
in the app and do File/Send from the app. You should see the Mozilla mailnews
compose window come up with your document attached to the opened mail.
Type in the recipients (To, Cc, etc) and send the mail.</font></font></li>
</ol>
</body>
</html>

View File

@@ -0,0 +1,47 @@
; ***** BEGIN LICENSE BLOCK *****
; Version: MPL 1.1/GPL 2.0/LGPL 2.1
;
; The contents of this file are subject to the Mozilla 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/MPL/
;
; 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.
;
; The Initial Developer of the Original Code is
; Netscape Communications Corp.
; Portions created by the Initial Developer are Copyright (C) 2001
; the Initial Developer. All Rights Reserved.
;
; Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
;
; Alternatively, the contents of this file may be used under the terms of
; either the GNU General Public License Version 2 or later (the "GPL"), or
; the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
; in which case the provisions of the GPL or the LGPL are applicable instead
; of those above. If you wish to allow use of your version of this file only
; under the terms of either the GPL or the LGPL, and not to allow others to
; use your version of this file under the terms of the MPL, indicate your
; decision by deleting the provisions above and replace them with the notice
; and other provisions required by the GPL or the LGPL. If you do not delete
; the provisions above, a recipient may use your version of this file under
; the terms of any one of the MPL, the GPL or the LGPL.
;
; ***** END LICENSE BLOCK *****
LIBRARY MapiProxy.dll
DESCRIPTION 'Proxy/Stub DLL'
EXPORTS
DllGetClassObject @1 PRIVATE
DllCanUnloadNow @2 PRIVATE
GetProxyDllInfo @3 PRIVATE
DllRegisterServer @4 PRIVATE
DllUnregisterServer @5 PRIVATE

View File

@@ -0,0 +1,68 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corp.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH=..\..\..
MODULE = MapiProxy
EXPORT_LIBRARY = $(MODULE)
LIBRARY_NAME = $(MODULE)
DEFFILE = MapiProxy.def
include <$(DEPTH)\config\config.mak>
##################################################################
LCFLAGS=-DREGISTER_PROXY_DLL -DUNICODE -D_UNICODE
OBJS= .\$(OBJDIR)\dlldata.obj \
.\$(OBJDIR)\msgMapi_p.obj \
.\$(OBJDIR)\msgMapi_i.obj \
$(NULL)
WIN_LIBS= rpcrt4.lib
EXPORTS= msgMapi.h \
$(NULL)
include <$(DEPTH)\config\rules.mak>
msgMapi.h msgMapi_p.c msgMapi_i.c dlldata.c : msgMapi.idl
midl $(UNICODE_FLAGS) msgMapi.idl
clobber::
rm -f dlldata.c msgMapi_i.c msgMapi_p.c msgMapi.h

View File

@@ -0,0 +1,114 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
* Contributor(s): Rajiv Dayal (rdayal@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
// This idl will be compiled by MIDL. MS-COM is used
// as brdige between MAPI clients and the Mozilla.
import "unknwn.idl";
typedef wchar_t LOGIN_PW_TYPE[256];
typedef struct
{
unsigned long ulReserved;
unsigned long flFlags; /* Flags */
unsigned long nPosition_NotUsed; /* character in text to be replaced by attachment */
LPTSTR lpszPathName; /* Full path name including file name */
LPTSTR lpszFileName; /* Real (original) file name */
unsigned char * lpFileType_NotUsed ;
} nsMapiFileDesc, * lpnsMapiFileDesc;
typedef struct
{
unsigned long ulReserved;
unsigned long ulRecipClass; /* MAPI_TO, MAPI_CC, MAPI_BCC, MAPI_ORIG */
LPTSTR lpszName; /* Recipient name to display */
LPTSTR lpszAddress; /* Recipient email address */
unsigned long ulEIDSize_NotUsed;
unsigned char * lpEntryID_NotUsed ;
} nsMapiRecipDesc, * lpnsMapiRecipDesc;
typedef struct
{
unsigned long ulReserved;
LPTSTR lpszSubject; /* Message Subject */
LPTSTR lpszNoteText; /* Message Text */
LPTSTR lpszMessageType_NotUsed;
LPTSTR lpszDateReceived_notUsed; /* in YYYY/MM/DD HH:MM format */
LPTSTR lpszConversationID_NotUsed; /* conversation thread ID */
unsigned long flFlags; /* unread,return receipt */
lpnsMapiRecipDesc lpOriginator; /* Originator descriptor */
unsigned long nRecipCount; /* Number of recipients */
lpnsMapiRecipDesc lpRecips; /* Recipient descriptors */
unsigned long nFileCount; /* # of file attachments */
lpnsMapiFileDesc lpFiles; /* Attachment descriptors */
} nsMapiMessage, * lpnsMapiMessage;
[
object,
uuid(6EDCD38E-8861-11d5-A3DD-00B0D0F3BAA7),
helpstring("nsIMapi Inteface"),
pointer_default(unique)
]
interface nsIMapi : IUnknown
{
HRESULT Login(unsigned long aUIArg, LOGIN_PW_TYPE aLogin,
LOGIN_PW_TYPE aPassWord, unsigned long aFlags,
[out] unsigned long *aSessionId);
HRESULT Initialize();
HRESULT IsValid();
HRESULT IsValidSession([in] unsigned long aSession);
HRESULT SendMail([in] unsigned long aSession, [in] lpnsMapiMessage aMessage,
[in] short aRecipCount, [in, size_is(aRecipCount)] lpnsMapiRecipDesc aRecips,
[in] short aFileCount, [in, size_is(aFileCount)] lpnsMapiFileDesc aFiles,
[in] unsigned long aFlags, [in] unsigned long aReserved) ;
HRESULT SendDocuments( [in] unsigned long aSession,
[in] LPTSTR aDelimChar, [in] LPTSTR aFilePaths,
[in] LPTSTR aFileNames, [in] ULONG aFlags ) ;
HRESULT Logoff (unsigned long aSession);
HRESULT CleanUp();
};

View File

@@ -0,0 +1,27 @@
# !nmake
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 2001 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Krishna Mohan Khandrika <kkhandrika@netscape.com>
#
DEPTH=..\..
DIRS=build mapiDll mapihook resources registry
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,54 @@
; ***** BEGIN LICENSE BLOCK *****
; Version: MPL 1.1/GPL 2.0/LGPL 2.1
;
; The contents of this file are subject to the Mozilla 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/MPL/
;
; 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.
;
; The Initial Developer of the Original Code is
; Netscape Communications Corp.
; Portions created by the Initial Developer are Copyright (C) 2001
; the Initial Developer. All Rights Reserved.
;
; Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
;
; Alternatively, the contents of this file may be used under the terms of
; either the GNU General Public License Version 2 or later (the "GPL"), or
; the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
; in which case the provisions of the GPL or the LGPL are applicable instead
; of those above. If you wish to allow use of your version of this file only
; under the terms of either the GPL or the LGPL, and not to allow others to
; use your version of this file under the terms of the MPL, indicate your
; decision by deleting the provisions above and replace them with the notice
; and other provisions required by the GPL or the LGPL. If you do not delete
; the provisions above, a recipient may use your version of this file under
; the terms of any one of the MPL, the GPL or the LGPL.
;
; ***** END LICENSE BLOCK *****
LIBRARY mozMapi32.dll
DESCRIPTION 'Mozilla Simple MAPI Support'
EXPORTS
MAPILogon
MAPILogoff
MAPISendMail
MAPISendDocuments
MAPIFindNext
MAPIReadMail
MAPISaveMail
MAPIDeleteMail
MAPIAddress
MAPIDetails
MAPIResolveName
MAPIFreeBuffer
GetMapiDllVersion

View File

@@ -0,0 +1,335 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
* Contributor(s): Rajiv Dayal (rdayal@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <windows.h>
#include <tchar.h>
#include <assert.h>
#include <mapidefs.h>
#include <mapi.h>
#include "msgMapi.h"
#include "msgMapiMain.h"
#define MAX_RECIPS 100
#define MAX_FILES 100
const CLSID CLSID_nsMapiImp = {0x29f458be, 0x8866, 0x11d5,
{0xa3, 0xdd, 0x0, 0xb0, 0xd0, 0xf3, 0xba, 0xa7}};
const IID IID_nsIMapi = {0x6EDCD38E,0x8861,0x11d5,
{0xA3,0xDD,0x00,0xB0,0xD0,0xF3,0xBA,0xA7}};
DWORD tId = 0;
BOOL WINAPI DllMain(HINSTANCE aInstance, DWORD aReason, LPVOID aReserved)
{
switch (aReason)
{
case DLL_PROCESS_ATTACH : tId = TlsAlloc();
if (tId == 0xFFFFFFFF)
return FALSE;
break;
case DLL_PROCESS_DETACH : TlsFree(tId);
break;
}
return TRUE;
}
BOOL InitMozillaReference(nsIMapi **aRetValue)
{
// Check wehther this thread has a valid Interface
// by looking into thread-specific-data variable
*aRetValue = (nsIMapi *)TlsGetValue(tId);
// Check whether the pointer actually resolves to
// a valid method call; otherwise mozilla is not running
if ((*aRetValue) && (*aRetValue)->IsValid() == S_OK)
return TRUE;
HRESULT hRes = CoInitialize(NULL);
hRes = ::CoCreateInstance(CLSID_nsMapiImp, NULL, CLSCTX_LOCAL_SERVER,
IID_nsIMapi, (LPVOID *)aRetValue);
if (hRes == S_OK && (*aRetValue)->Initialize() == S_OK)
if (TlsSetValue(tId, (LPVOID)(*aRetValue)))
return TRUE;
// Either CoCreate or TlsSetValue failed; so return FALSE
if ((*aRetValue))
(*aRetValue)->Release();
::CoUninitialize();
return FALSE;
}
////////////////////////////////////////////////////////////////////////////////////////
// The MAPILogon function begins a Simple MAPI session, loading the default message ////
// store and address book providers ////
////////////////////////////////////////////////////////////////////////////////////////
ULONG FAR PASCAL MAPILogon(ULONG aUIParam, LPTSTR aProfileName,
LPTSTR aPassword, FLAGS aFlags,
ULONG aReserved, LPLHANDLE aSession)
{
HRESULT hr = 0;
ULONG nSessionId = 0;
nsIMapi *pNsMapi = NULL;
if (!InitMozillaReference(&pNsMapi))
return MAPI_E_FAILURE;
if (!(aFlags & MAPI_UNICODE))
{
// Need to convert the parameters to Unicode.
char *pUserName = (char *) aProfileName;
char *pPassWord = (char *) aPassword;
TCHAR ProfileName[MAX_NAME_LEN] = {0};
TCHAR PassWord[MAX_PW_LEN] = {0};
if (pUserName != NULL)
{
if (!MultiByteToWideChar(CP_ACP, 0, pUserName, -1, ProfileName,
MAX_NAME_LEN))
return MAPI_E_FAILURE;
}
if (pPassWord != NULL)
{
if (!MultiByteToWideChar(CP_ACP, 0, pPassWord, -1, PassWord,
MAX_NAME_LEN))
return MAPI_E_FAILURE;
}
hr = pNsMapi->Login(aUIParam, ProfileName, PassWord, aFlags,
&nSessionId);
}
else
hr = pNsMapi->Login(aUIParam, aProfileName, aPassword,
aFlags, &nSessionId);
if (hr == S_OK)
(*aSession) = (LHANDLE) nSessionId;
else
return nSessionId;
return SUCCESS_SUCCESS;
}
ULONG FAR PASCAL MAPILogoff (LHANDLE aSession, ULONG aUIParam,
FLAGS aFlags, ULONG aReserved)
{
nsIMapi *pNsMapi = (nsIMapi *)TlsGetValue(tId);
if (pNsMapi != NULL)
{
if (pNsMapi->Logoff((ULONG) aSession) == S_OK)
pNsMapi->Release();
pNsMapi = NULL;
}
TlsSetValue(tId, NULL);
::CoUninitialize();
return SUCCESS_SUCCESS;
}
ULONG FAR PASCAL MAPISendMail (LHANDLE lhSession, ULONG ulUIParam, lpnsMapiMessage lpMessage,
FLAGS flFlags, ULONG ulReserved )
{
HRESULT hr = 0;
BOOL bTempSession = FALSE ;
nsIMapi *pNsMapi = NULL;
if (!InitMozillaReference(&pNsMapi))
return MAPI_E_FAILURE;
if (lpMessage->nRecipCount > MAX_RECIPS)
return MAPI_E_TOO_MANY_RECIPIENTS ;
if (lpMessage->nFileCount > MAX_FILES)
return MAPI_E_TOO_MANY_FILES ;
if ( (!(flFlags & MAPI_DIALOG)) && (lpMessage->lpRecips == NULL) )
return MAPI_E_UNKNOWN_RECIPIENT ;
if (!lhSession || pNsMapi->IsValidSession(lhSession) != S_OK)
{
FLAGS LoginFlag ;
if ( (flFlags & MAPI_LOGON_UI) && (flFlags & MAPI_NEW_SESSION) )
LoginFlag = MAPI_LOGON_UI | MAPI_NEW_SESSION ;
else if (flFlags & MAPI_LOGON_UI)
LoginFlag = MAPI_LOGON_UI ;
hr = MAPILogon (ulUIParam, (LPTSTR) NULL, (LPTSTR) NULL, LoginFlag, 0, &lhSession) ;
if (hr != SUCCESS_SUCCESS)
return MAPI_E_LOGIN_FAILURE ;
bTempSession = TRUE ;
}
// we need to deal with null data passed in by MAPI clients, specially when MAPI_DIALOG is set.
// The MS COM type lib code generated by MIDL for the MS COM interfaces checks for these parameters
// to be non null, although null is a valid value for them here.
nsMapiRecipDesc * lpRecips ;
nsMapiFileDesc * lpFiles ;
nsMapiMessage Message ;
memset (&Message, 0, sizeof (nsMapiMessage) ) ;
nsMapiRecipDesc Recipient ;
memset (&Recipient, 0, sizeof (nsMapiRecipDesc) );
nsMapiFileDesc Files ;
memset (&Files, 0, sizeof (nsMapiFileDesc) ) ;
if(!lpMessage)
{
lpMessage = &Message ;
}
if(!lpMessage->lpRecips)
{
lpRecips = &Recipient ;
}
else
lpRecips = lpMessage->lpRecips ;
if(!lpMessage->lpFiles)
{
lpFiles = &Files ;
}
else
lpFiles = lpMessage->lpFiles ;
hr = pNsMapi->SendMail (lhSession, lpMessage,
(short) lpMessage->nRecipCount, lpRecips,
(short) lpMessage->nFileCount, lpFiles,
flFlags, ulReserved);
if (bTempSession)
MAPILogoff (lhSession, ulUIParam, 0,0) ;
// we are seeing a problem when using Word, although we return success from the MAPI support
// MS COM interface in mozilla, we are getting this error here. This is a temporary hack !!
if (hr == 0x800703e6)
return SUCCESS_SUCCESS;
return hr ;
}
ULONG FAR PASCAL MAPISendDocuments(ULONG ulUIParam, LPTSTR lpszDelimChar, LPTSTR lpszFilePaths,
LPTSTR lpszFileNames, ULONG ulReserved)
{
LHANDLE lhSession ;
nsIMapi *pNsMapi = NULL;
if (!InitMozillaReference(&pNsMapi))
return MAPI_E_FAILURE;
unsigned long result = MAPILogon (ulUIParam, (LPTSTR) NULL, (LPTSTR) NULL, MAPI_LOGON_UI, 0, &lhSession) ;
if (result != SUCCESS_SUCCESS)
return MAPI_E_LOGIN_FAILURE ;
HRESULT hr;
hr = pNsMapi->SendDocuments(lhSession, (LPTSTR) lpszDelimChar, (LPTSTR) lpszFilePaths,
(LPTSTR) lpszFileNames, ulReserved) ;
MAPILogoff (lhSession, ulUIParam, 0,0) ;
return hr ;
}
ULONG FAR PASCAL MAPIFindNext(LHANDLE lhSession, ULONG ulUIParam, LPTSTR lpszMessageType,
LPTSTR lpszSeedMessageID, FLAGS flFlags, ULONG ulReserved,
LPTSTR lpszMessageID)
{
return MAPI_E_FAILURE;
}
ULONG FAR PASCAL MAPIReadMail(LHANDLE lhSession, ULONG ulUIParam, LPTSTR lpszMessageID,
FLAGS flFlags, ULONG ulReserved, lpMapiMessage FAR *lppMessage)
{
return MAPI_E_FAILURE;
}
ULONG FAR PASCAL MAPISaveMail(LHANDLE lhSession, ULONG ulUIParam, lpMapiMessage lpMessage,
FLAGS flFlags, ULONG ulReserved, LPTSTR lpszMessageID)
{
return MAPI_E_FAILURE;
}
ULONG FAR PASCAL MAPIDeleteMail(LHANDLE lhSession, ULONG ulUIParam, LPTSTR lpszMessageID,
FLAGS flFlags, ULONG ulReserved)
{
return MAPI_E_FAILURE;
}
ULONG FAR PASCAL MAPIAddress(LHANDLE lhSession, ULONG ulUIParam, LPTSTR lpszCaption,
ULONG nEditFields, LPTSTR lpszLabels, ULONG nRecips,
lpMapiRecipDesc lpRecips, FLAGS flFlags,
ULONG ulReserved, LPULONG lpnNewRecips,
lpMapiRecipDesc FAR *lppNewRecips)
{
return MAPI_E_FAILURE;
}
ULONG FAR PASCAL MAPIDetails(LHANDLE lhSession, ULONG ulUIParam, lpMapiRecipDesc lpRecip,
FLAGS flFlags, ULONG ulReserved)
{
return MAPI_E_FAILURE;
}
ULONG FAR PASCAL MAPIResolveName(LHANDLE lhSession, ULONG ulUIParam, LPTSTR lpszName,
FLAGS flFlags, ULONG ulReserved, lpMapiRecipDesc FAR *lppRecip)
{
return MAPI_E_FAILURE;
}
ULONG FAR PASCAL MAPIFreeBuffer(LPVOID pv)
{
return MAPI_E_FAILURE;
}
ULONG FAR PASCAL GetMapiDllVersion()
{
return 94;
}

View File

@@ -0,0 +1,54 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corp.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH=..\..\..
MODULE = mozMapi32
EXPORT_LIBRARY = $(MODULE)
LIBRARY_NAME = $(MODULE)
DEFFILE = Mapi32.def
include <$(DEPTH)\config\config.mak>
###############################################################
LCFLAGS=-DUNICODE -D_UNICODE
OBJS= .\$(OBJDIR)\MapiDll.obj
WIN_LIBS= ole32.lib
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,47 @@
; ***** BEGIN LICENSE BLOCK *****
; Version: MPL 1.1/GPL 2.0/LGPL 2.1
;
; The contents of this file are subject to the Mozilla 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/MPL/
;
; 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.
;
; The Initial Developer of the Original Code is
; Netscape Communications Corp.
; Portions created by the Initial Developer are Copyright (C) 2001
; the Initial Developer. All Rights Reserved.
;
; Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
;
; Alternatively, the contents of this file may be used under the terms of
; either the GNU General Public License Version 2 or later (the "GPL"), or
; the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
; in which case the provisions of the GPL or the LGPL are applicable instead
; of those above. If you wish to allow use of your version of this file only
; under the terms of either the GPL or the LGPL, and not to allow others to
; use your version of this file under the terms of the MPL, indicate your
; decision by deleting the provisions above and replace them with the notice
; and other provisions required by the GPL or the LGPL. If you do not delete
; the provisions above, a recipient may use your version of this file under
; the terms of any one of the MPL, the GPL or the LGPL.
;
; ***** END LICENSE BLOCK *****
LIBRARY MapiProxy.dll
DESCRIPTION 'Proxy/Stub DLL'
EXPORTS
DllGetClassObject @1 PRIVATE
DllCanUnloadNow @2 PRIVATE
GetProxyDllInfo @3 PRIVATE
DllRegisterServer @4 PRIVATE
DllUnregisterServer @5 PRIVATE

View File

@@ -0,0 +1,68 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corp.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH=..\..\..
MODULE = MapiProxy
EXPORT_LIBRARY = $(MODULE)
LIBRARY_NAME = $(MODULE)
DEFFILE = MapiProxy.def
include <$(DEPTH)\config\config.mak>
##################################################################
LCFLAGS=-DREGISTER_PROXY_DLL -DUNICODE -D_UNICODE
OBJS= .\$(OBJDIR)\dlldata.obj \
.\$(OBJDIR)\msgMapi_p.obj \
.\$(OBJDIR)\msgMapi_i.obj \
$(NULL)
WIN_LIBS= rpcrt4.lib
EXPORTS= msgMapi.h \
$(NULL)
include <$(DEPTH)\config\rules.mak>
msgMapi.h msgMapi_p.c msgMapi_i.c dlldata.c : msgMapi.idl
midl $(UNICODE_FLAGS) msgMapi.idl
clobber::
rm -f dlldata.c msgMapi_i.c msgMapi_p.c msgMapi.h

View File

@@ -0,0 +1,114 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
* Contributor(s): Rajiv Dayal (rdayal@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
// This idl will be compiled by MIDL. MS-COM is used
// as brdige between MAPI clients and the Mozilla.
import "unknwn.idl";
typedef wchar_t LOGIN_PW_TYPE[256];
typedef struct
{
unsigned long ulReserved;
unsigned long flFlags; /* Flags */
unsigned long nPosition_NotUsed; /* character in text to be replaced by attachment */
LPTSTR lpszPathName; /* Full path name including file name */
LPTSTR lpszFileName; /* Real (original) file name */
unsigned char * lpFileType_NotUsed ;
} nsMapiFileDesc, * lpnsMapiFileDesc;
typedef struct
{
unsigned long ulReserved;
unsigned long ulRecipClass; /* MAPI_TO, MAPI_CC, MAPI_BCC, MAPI_ORIG */
LPTSTR lpszName; /* Recipient name to display */
LPTSTR lpszAddress; /* Recipient email address */
unsigned long ulEIDSize_NotUsed;
unsigned char * lpEntryID_NotUsed ;
} nsMapiRecipDesc, * lpnsMapiRecipDesc;
typedef struct
{
unsigned long ulReserved;
LPTSTR lpszSubject; /* Message Subject */
LPTSTR lpszNoteText; /* Message Text */
LPTSTR lpszMessageType_NotUsed;
LPTSTR lpszDateReceived_notUsed; /* in YYYY/MM/DD HH:MM format */
LPTSTR lpszConversationID_NotUsed; /* conversation thread ID */
unsigned long flFlags; /* unread,return receipt */
lpnsMapiRecipDesc lpOriginator; /* Originator descriptor */
unsigned long nRecipCount; /* Number of recipients */
lpnsMapiRecipDesc lpRecips; /* Recipient descriptors */
unsigned long nFileCount; /* # of file attachments */
lpnsMapiFileDesc lpFiles; /* Attachment descriptors */
} nsMapiMessage, * lpnsMapiMessage;
[
object,
uuid(6EDCD38E-8861-11d5-A3DD-00B0D0F3BAA7),
helpstring("nsIMapi Inteface"),
pointer_default(unique)
]
interface nsIMapi : IUnknown
{
HRESULT Login(unsigned long aUIArg, LOGIN_PW_TYPE aLogin,
LOGIN_PW_TYPE aPassWord, unsigned long aFlags,
[out] unsigned long *aSessionId);
HRESULT Initialize();
HRESULT IsValid();
HRESULT IsValidSession([in] unsigned long aSession);
HRESULT SendMail([in] unsigned long aSession, [in] lpnsMapiMessage aMessage,
[in] short aRecipCount, [in, size_is(aRecipCount)] lpnsMapiRecipDesc aRecips,
[in] short aFileCount, [in, size_is(aFileCount)] lpnsMapiFileDesc aFiles,
[in] unsigned long aFlags, [in] unsigned long aReserved) ;
HRESULT SendDocuments( [in] unsigned long aSession,
[in] LPTSTR aDelimChar, [in] LPTSTR aFilePaths,
[in] LPTSTR aFileNames, [in] ULONG aFlags ) ;
HRESULT Logoff (unsigned long aSession);
HRESULT CleanUp();
};

View File

@@ -0,0 +1,77 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corp.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s): Srilatha Moturi (srilatha@netscape.com)
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH=..\..\..
MODULE = msgMapi
EXPORT_LIBRARY = $(MODULE)
LIBRARY_NAME = $(MODULE)
include <$(DEPTH)\config\config.mak>
############################################################################
REQUIRES = xpcom \
string \
$(NULL)
LCFLAGS=-DUNICODE -D_UNICODE
OBJS= \
..\build\$(OBJDIR)\msgMapi_i.obj \
.\$(OBJDIR)\msgMapiFactory.obj \
.\$(OBJDIR)\msgMapiHook.obj \
.\$(OBJDIR)\msgMapiImp.obj \
.\$(OBJDIR)\msgMapiMain.obj \
.\$(OBJDIR)\msgMapiSupport.obj \
$(NULL)
LLIBS= \
$(DIST)\lib\xpcom.lib \
$(DIST)\lib\msgbsutl.lib \
$(LIBNSPR) \
$(NULL)
WIN_LIBS= ole32.lib
EXPORTS= \
msgMapiFactory.h \
msgMapiHook.h \
msgMapiImp.h \
msgMapiMain.h \
msgMapiSupport.h \
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,121 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#undef UNICODE
#undef _UNICODE
#include "msgMapiFactory.h"
#include "msgMapiImp.h"
#include "msgMapi.h"
const CLSID CLSID_nsMapiImp = {0x29f458be, 0x8866, 0x11d5, {0xa3, 0xdd, 0x0, 0xb0, 0xd0, 0xf3, 0xba, 0xa7}};
nsMapiFactory::nsMapiFactory()
: m_cRef(1)
{
}
nsMapiFactory::~nsMapiFactory()
{
}
STDMETHODIMP nsMapiFactory::QueryInterface(const IID& aIid, void** aPpv)
{
if ((aIid == IID_IUnknown) || (aIid == IID_IClassFactory))
{
*aPpv = static_cast<IClassFactory*>(this);
}
else
{
*aPpv = nsnull;
return E_NOINTERFACE;
}
reinterpret_cast<IUnknown*>(*aPpv)->AddRef();
return S_OK;
}
STDMETHODIMP_(ULONG) nsMapiFactory::AddRef()
{
return (PR_AtomicIncrement(&m_cRef));
}
STDMETHODIMP_(ULONG) nsMapiFactory::Release()
{
PRInt32 temp;
temp = PR_AtomicDecrement(&m_cRef);
if (m_cRef == 0)
{
delete this;
return 0;
}
return temp;
}
STDMETHODIMP nsMapiFactory::CreateInstance(IUnknown* aUnknownOuter,
const IID& aIid,
void** aPpv)
{
// Cannot aggregate.
if (aUnknownOuter != nsnull)
{
return CLASS_E_NOAGGREGATION ;
}
// Create component.
nsMapiImp* pImp = new nsMapiImp();
if (pImp == nsnull)
{
return E_OUTOFMEMORY ;
}
// Get the requested interface.
HRESULT hr = pImp->QueryInterface(aIid, aPpv);
// Release the IUnknown pointer.
// (If QueryInterface failed, component will delete itself.)
pImp->Release();
return hr;
}
STDMETHODIMP nsMapiFactory::LockServer(PRBool aLock)
{
return S_OK ;
}

View File

@@ -0,0 +1,69 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef MSG_MAPI_FACTORY_H
#define MSG_MAPI_FACTORY_H
#include <windows.h>
#include <objbase.h>
#include "nspr.h"
class nsMapiFactory : public IClassFactory
{
public :
// IUnknown
STDMETHODIMP QueryInterface (REFIID aIid, void** aPpv);
STDMETHODIMP_(ULONG) AddRef(void);
STDMETHODIMP_(ULONG) Release(void);
// IClassFactory
STDMETHODIMP CreateInstance (LPUNKNOWN aUnkOuter, REFIID aIid, void **aPpv);
STDMETHODIMP LockServer (BOOL aLock);
nsMapiFactory();
~nsMapiFactory();
private :
PRInt32 m_cRef;
};
#endif // MSG_MAPI_FACTORY_H

View File

@@ -0,0 +1,842 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
* Contributor(s): Srilatha Moturi (srilatha@netscape.com)
* Contributor(s): Rajiv Dayal (rdayal@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#define MAPI_STARTUP_ARG "/MAPIStartUp"
#define MAPI_STARTUP_ARG "/MAPIStartUp"
#include <mapidefs.h>
#include <mapi.h>
#include "nsCOMPtr.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "nsISupports.h"
#include "nsIPromptService.h"
#include "nsAppShellCIDs.h"
#include "nsIDOMWindowInternal.h"
#include "nsIAppShellService.h"
#include "nsINativeAppSupport.h"
#include "nsICmdLineService.h"
#include "nsIProfileInternal.h"
#include "nsIMsgAccountManager.h"
#include "nsIDOMWindowInternal.h"
#include "nsXPIDLString.h"
#include "nsReadableUtils.h"
#include "nsMsgBaseCID.h"
#include "nsIStringBundle.h"
#include "nsIPref.h"
#include "nsString.h"
#include "nsIMsgCompFields.h"
#include "nsIMsgComposeParams.h"
#include "nsIMsgCompose.h"
#include "nsMsgCompCID.h"
#include "nsIMsgSend.h"
#include "nsIProxyObjectManager.h"
#include "nsIMsgComposeService.h"
#include "nsProxiedService.h"
#include "nsSpecialSystemDirectory.h"
#include "nsMsgI18N.h"
#include "msgMapi.h"
#include "msgMapiHook.h"
#include "msgMapiSupport.h"
#include "msgMapiMain.h"
static NS_DEFINE_CID(kCmdLineServiceCID, NS_COMMANDLINE_SERVICE_CID);
#define MAPI_PROPERTIES_CHROME "chrome://messenger/locale/mapi.properties"
#define PREF_MAPI_WARN_PRIOR_TO_BLIND_SEND "mapi.blind-send.warn"
#define PREF_MAPI_BLIND_SEND_ENABLED "mapi.blind-send.enabled"
class nsMAPISendListener : public nsIMsgSendListener
{
public:
virtual ~nsMAPISendListener() { }
// nsISupports interface
NS_DECL_ISUPPORTS
/* void OnStartSending (in string aMsgID, in PRUint32 aMsgSize); */
NS_IMETHOD OnStartSending(const char *aMsgID, PRUint32 aMsgSize) { return NS_OK; }
/* void OnProgress (in string aMsgID, in PRUint32 aProgress, in PRUint32 aProgressMax); */
NS_IMETHOD OnProgress(const char *aMsgID, PRUint32 aProgress, PRUint32 aProgressMax) { return NS_OK;}
/* void OnStatus (in string aMsgID, in wstring aMsg); */
NS_IMETHOD OnStatus(const char *aMsgID, const PRUnichar *aMsg) { return NS_OK;}
/* void OnStopSending (in string aMsgID, in nsresult aStatus, in wstring aMsg, in nsIFileSpec returnFileSpec); */
NS_IMETHOD OnStopSending(const char *aMsgID, nsresult aStatus, const PRUnichar *aMsg,
nsIFileSpec *returnFileSpec) {
#ifdef RAJIV_DEBUG
printf("Sending Done - OnStopSending \n");
#endif
m_done = PR_TRUE;
return NS_OK ;
}
/* void OnGetDraftFolderURI (); */
NS_IMETHOD OnGetDraftFolderURI(const char *aFolderURI) {return NS_OK;}
static nsresult CreateMAPISendListener( nsIMsgSendListener **ppListener);
PRBool IsDone() { return m_done ; }
protected :
nsMAPISendListener() {
NS_INIT_REFCNT();
m_done = PR_FALSE;
}
PRBool m_done;
};
NS_IMPL_THREADSAFE_ISUPPORTS1(nsMAPISendListener, nsIMsgSendListener)
nsresult nsMAPISendListener::CreateMAPISendListener( nsIMsgSendListener **ppListener)
{
NS_ENSURE_ARG_POINTER(ppListener) ;
*ppListener = new nsMAPISendListener();
if (! *ppListener)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*ppListener);
return NS_OK;
}
PRBool nsMapiHook::isMapiService = PR_FALSE;
PRBool nsMapiHook::Initialize()
{
nsresult rv;
nsCOMPtr<nsINativeAppSupport> native;
nsCOMPtr<nsICmdLineService> cmdLineArgs(do_GetService(kCmdLineServiceCID, &rv));
if (NS_FAILED(rv)) return PR_FALSE;
nsCOMPtr<nsIAppShellService> appShell (do_GetService( "@mozilla.org/appshell/appShellService;1", &rv));
if (NS_FAILED(rv)) return PR_FALSE;
rv = appShell->GetNativeAppSupport( getter_AddRefs( native ));
if (NS_FAILED(rv)) return PR_FALSE;
rv = native->EnsureProfile(cmdLineArgs);
if (NS_FAILED(rv)) return PR_FALSE;
return PR_TRUE;
}
void nsMapiHook::CleanUp()
{
// This routine will be fully implemented in future
// to cleanup mapi related stuff inside mozilla code.
}
PRBool nsMapiHook::DisplayLoginDialog(PRBool aLogin, PRUnichar **aUsername, \
PRUnichar **aPassword)
{
nsresult rv;
PRBool btnResult = PR_FALSE;
nsCOMPtr<nsIAppShellService> appShell(do_GetService( "@mozilla.org/appshell/appShellService;1", &rv));
if (NS_FAILED(rv) || !appShell) return PR_FALSE;
nsCOMPtr<nsIPromptService> dlgService(do_GetService("@mozilla.org/embedcomp/prompt-service;1", &rv));
if (NS_SUCCEEDED(rv) && dlgService)
{
nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv));
if (NS_FAILED(rv) || !bundleService) return PR_FALSE;
nsCOMPtr<nsIStringBundle> bundle;
rv = bundleService->CreateBundle(MAPI_PROPERTIES_CHROME, getter_AddRefs(bundle));
if (NS_FAILED(rv) || !bundle) return PR_FALSE;
nsCOMPtr<nsIStringBundle> brandBundle;
rv = bundleService->CreateBundle(
"chrome://global/locale/brand.properties",
getter_AddRefs(brandBundle));
if (NS_FAILED(rv)) return PR_FALSE;
nsXPIDLString brandName;
rv = brandBundle->GetStringFromName(
NS_LITERAL_STRING("brandShortName").get(),
getter_Copies(brandName));
if (NS_FAILED(rv)) return PR_FALSE;
nsXPIDLString loginTitle;
const PRUnichar *brandStrings[] = { brandName.get() };
NS_NAMED_LITERAL_STRING(loginTitlePropertyTag, "loginTitle");
const PRUnichar *dTitlePropertyTag = loginTitlePropertyTag.get();
rv = bundle->FormatStringFromName(dTitlePropertyTag, brandStrings, 1,
getter_Copies(loginTitle));
if (NS_FAILED(rv)) return PR_FALSE;
if (aLogin)
{
nsXPIDLString loginText;
rv = bundle->GetStringFromName(NS_LITERAL_STRING("loginTextwithName").get(),
getter_Copies(loginText));
if (NS_FAILED(rv) || !loginText) return PR_FALSE;
rv = dlgService->PromptUsernameAndPassword(nsnull, loginTitle,
loginText, aUsername, aPassword,
nsnull, PR_FALSE, &btnResult);
}
else
{
//nsString loginString;
nsXPIDLString loginText;
const PRUnichar *userNameStrings[] = { *aUsername };
NS_NAMED_LITERAL_STRING(loginTextPropertyTag, "loginText");
const PRUnichar *dpropertyTag = loginTextPropertyTag.get();
rv = bundle->FormatStringFromName(dpropertyTag, userNameStrings, 1,
getter_Copies(loginText));
if (NS_FAILED(rv)) return PR_FALSE;
rv = dlgService->PromptPassword(nsnull, loginTitle, loginText,
aPassword, nsnull, PR_FALSE, &btnResult);
}
}
return btnResult;
}
PRBool nsMapiHook::VerifyUserName(const PRUnichar *aUsername, char **aIdKey)
{
nsresult rv;
if (aUsername == nsnull)
return PR_FALSE;
nsCOMPtr<nsIMsgAccountManager> accountManager(do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv));
if (NS_FAILED(rv)) return PR_FALSE;
nsCOMPtr<nsISupportsArray> identities;
rv = accountManager->GetAllIdentities(getter_AddRefs(identities));
if (NS_FAILED(rv)) return PR_FALSE;
PRUint32 numIndentities;
identities->Count(&numIndentities);
for (PRUint32 i = 0; i < numIndentities; i++)
{
// convert supports->Identity
nsCOMPtr<nsISupports> thisSupports;
rv = identities->GetElementAt(i, getter_AddRefs(thisSupports));
if (NS_FAILED(rv)) continue;
nsCOMPtr<nsIMsgIdentity> thisIdentity(do_QueryInterface(thisSupports, &rv));
if (NS_SUCCEEDED(rv) && thisIdentity)
{
nsXPIDLCString email;
rv = thisIdentity->GetEmail(getter_Copies(email));
if (NS_FAILED(rv)) continue;
// get the username from the email and compare with the username
nsCAutoString aEmail(email.get());
PRInt32 index = aEmail.FindChar('@');
if (index != -1)
aEmail.Truncate(index);
if (nsDependentString(aUsername) == NS_ConvertASCIItoUCS2(aEmail)) // == overloaded
return NS_SUCCEEDED(thisIdentity->GetKey(aIdKey));
}
}
return PR_FALSE;
}
PRBool
nsMapiHook::IsBlindSendAllowed()
{
PRBool enabled = PR_FALSE;
PRBool warn = PR_TRUE;
nsCOMPtr<nsIPref> prefs = do_GetService(NS_PREF_CONTRACTID);
if (prefs) {
prefs->GetBoolPref(PREF_MAPI_WARN_PRIOR_TO_BLIND_SEND,&warn);
prefs->GetBoolPref(PREF_MAPI_BLIND_SEND_ENABLED,&enabled);
}
if (!enabled)
return PR_FALSE;
if (!warn)
return PR_TRUE; // Everything is okay.
nsresult rv;
nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv));
if (NS_FAILED(rv) || !bundleService) return PR_FALSE;
nsCOMPtr<nsIStringBundle> bundle;
rv = bundleService->CreateBundle(MAPI_PROPERTIES_CHROME, getter_AddRefs(bundle));
if (NS_FAILED(rv) || !bundle) return PR_FALSE;
nsXPIDLString warningMsg;
rv = bundle->GetStringFromName(NS_LITERAL_STRING("mapiBlindSendWarning").get(),
getter_Copies(warningMsg));
if (NS_FAILED(rv)) return PR_FALSE;
nsXPIDLString dontShowAgainMessage;
rv = bundle->GetStringFromName(NS_LITERAL_STRING("mapiBlindSendDontShowAgain").get(),
getter_Copies(dontShowAgainMessage));
if (NS_FAILED(rv)) return PR_FALSE;
nsCOMPtr<nsIPromptService> dlgService(do_GetService("@mozilla.org/embedcomp/prompt-service;1", &rv));
if (NS_FAILED(rv) || !dlgService) return PR_FALSE;
PRBool continueToWarn = PR_TRUE;
PRBool okayToContinue = PR_FALSE;
dlgService->ConfirmCheck(nsnull, nsnull, warningMsg, dontShowAgainMessage, &continueToWarn, &okayToContinue);
if (!continueToWarn && okayToContinue && prefs)
prefs->SetBoolPref(PREF_MAPI_WARN_PRIOR_TO_BLIND_SEND,PR_FALSE);
return okayToContinue;
}
// this is used for Send without UI
nsresult nsMapiHook::BlindSendMail (unsigned long aSession, nsIMsgCompFields * aCompFields)
{
nsresult rv = NS_OK ;
if (!IsBlindSendAllowed())
return NS_ERROR_FAILURE;
/** create nsIMsgComposeParams obj and other fields to populate it **/
// get parent window
nsCOMPtr<nsIAppShellService> appService = do_GetService( "@mozilla.org/appshell/appShellService;1", &rv);
if (NS_FAILED(rv)|| (!appService) ) return rv ;
nsCOMPtr<nsIDOMWindowInternal> hiddenWindow;
rv = appService->GetHiddenDOMWindow(getter_AddRefs(hiddenWindow));
if ( NS_FAILED(rv) ) return rv ;
// smtp password and Logged in used IdKey from MapiConfig (session obj)
nsMAPIConfiguration * pMapiConfig = nsMAPIConfiguration::GetMAPIConfiguration() ;
if (!pMapiConfig) return NS_ERROR_FAILURE ; // get the singelton obj
PRUnichar * password = pMapiConfig->GetPassWord(aSession) ;
// password
nsCAutoString smtpPassword ;
smtpPassword.AssignWithConversion (password) ;
// Id key
char * MsgIdKey = pMapiConfig->GetIdKey(aSession) ;
// get the MsgIdentity for the above key using AccountManager
nsCOMPtr <nsIMsgAccountManager> accountManager = do_GetService (NS_MSGACCOUNTMANAGER_CONTRACTID) ;
if (NS_FAILED(rv) || (!accountManager) ) return rv ;
nsCOMPtr <nsIMsgIdentity> pMsgId ;
rv = accountManager->GetIdentity (MsgIdKey, getter_AddRefs(pMsgId)) ;
if (NS_FAILED(rv) ) return rv ;
// create a send listener to get back the send status
nsCOMPtr <nsIMsgSendListener> sendListener ;
rv = nsMAPISendListener::CreateMAPISendListener(getter_AddRefs(sendListener)) ;
if (NS_FAILED(rv) || (!sendListener) ) return rv;
// create the compose params object
nsCOMPtr<nsIMsgComposeParams> pMsgComposeParams (do_CreateInstance(NS_MSGCOMPOSEPARAMS_CONTRACTID, &rv));
if (NS_FAILED(rv) || (!pMsgComposeParams) ) return rv ;
// populate the compose params
pMsgComposeParams->SetType(nsIMsgCompType::New);
pMsgComposeParams->SetFormat(nsIMsgCompFormat::Default);
pMsgComposeParams->SetIdentity(pMsgId);
pMsgComposeParams->SetComposeFields(aCompFields);
pMsgComposeParams->SetSendListener(sendListener) ;
pMsgComposeParams->SetSmtpPassword(smtpPassword);
// create the nsIMsgCompose object to send the object
nsCOMPtr<nsIMsgCompose> pMsgCompose (do_CreateInstance(NS_MSGCOMPOSE_CONTRACTID, &rv));
if (NS_FAILED(rv) || (!pMsgCompose) ) return rv ;
/** initialize nsIMsgCompose, Send the message, wait for send completion response **/
rv = pMsgCompose->Initialize(hiddenWindow, pMsgComposeParams) ;
if (NS_FAILED(rv)) return rv ;
pMsgCompose->SendMsg(nsIMsgSend::nsMsgDeliverNow, pMsgId, nsnull) ;
if (NS_FAILED(rv)) return rv ;
// assign to interface pointer from nsCOMPtr to facilitate typecast below
nsIMsgSendListener * pSendListener = sendListener ;
// we need to wait here to make sure that we return only after send is completed
// so we will have a event loop here which will process the events till the Send IsDone.
nsCOMPtr<nsIEventQueueService> pEventQService = do_GetService(NS_EVENTQUEUESERVICE_CONTRACTID, &rv);
nsCOMPtr<nsIEventQueue> eventQueue;
pEventQService->GetThreadEventQueue(NS_CURRENT_THREAD,getter_AddRefs(eventQueue));
while ( !((nsMAPISendListener *) pSendListener)->IsDone() )
eventQueue->ProcessPendingEvents();
return rv ;
}
// this is used to populate comp fields with Unicode data
nsresult nsMapiHook::PopulateCompFields(lpnsMapiMessage aMessage,
nsIMsgCompFields * aCompFields)
{
nsresult rv = NS_OK ;
if (aMessage->lpOriginator)
{
PRUnichar * From = aMessage->lpOriginator->lpszAddress ;
aCompFields->SetFrom (From) ;
}
nsAutoString To ;
nsAutoString Cc ;
nsAutoString Bcc ;
nsAutoString Comma ;
Comma.AssignWithConversion(",");
if (aMessage->lpRecips)
{
for (int i=0 ; i < (int) aMessage->nRecipCount ; i++)
{
if (aMessage->lpRecips[i].lpszAddress)
{
switch (aMessage->lpRecips[i].ulRecipClass)
{
case MAPI_TO :
if (To.Length() > 0)
To += Comma ;
To += (PRUnichar *) aMessage->lpRecips[i].lpszAddress ;
break ;
case MAPI_CC :
if (Cc.Length() > 0)
Cc += Comma ;
Cc += (PRUnichar *) aMessage->lpRecips[i].lpszAddress ;
break ;
case MAPI_BCC :
if (Bcc.Length() > 0)
Bcc += Comma ;
Bcc += (PRUnichar *) aMessage->lpRecips[i].lpszAddress ;
break ;
}
}
}
}
// set To, Cc, Bcc
aCompFields->SetTo (To.get()) ;
aCompFields->SetCc (Cc.get()) ;
aCompFields->SetBcc (Bcc.get()) ;
// set subject
if (aMessage->lpszSubject)
{
PRUnichar * Subject = aMessage->lpszSubject ;
aCompFields->SetSubject(Subject) ;
}
// handle attachments as File URL
rv = HandleAttachments (aCompFields, aMessage->nFileCount, aMessage->lpFiles, PR_TRUE) ;
if (NS_FAILED(rv)) return rv ;
// set body
if (aMessage->lpszNoteText)
{
PRUnichar * Body = aMessage->lpszNoteText ;
rv = aCompFields->SetBody(Body) ;
}
#ifdef RAJIV_DEBUG
// testing what all was set in CompFields
printf ("To : %S \n", To.get()) ;
printf ("CC : %S \n", Cc.get() ) ;
printf ("BCC : %S \n", Bcc.get() ) ;
#endif
return rv ;
}
nsresult nsMapiHook::HandleAttachments (nsIMsgCompFields * aCompFields, PRInt32 aFileCount,
lpnsMapiFileDesc aFiles, BOOL aIsUnicode)
{
nsresult rv = NS_OK ;
nsCAutoString Attachments ;
nsCAutoString TempFiles ;
nsCOMPtr <nsILocalFile> pFile = do_CreateInstance (NS_LOCAL_FILE_CONTRACTID, &rv) ;
if (NS_FAILED(rv) || (!pFile) ) return rv ;
nsCOMPtr <nsILocalFile> pTempDir = do_CreateInstance (NS_LOCAL_FILE_CONTRACTID, &rv) ;
if (NS_FAILED(rv) || (!pTempDir) ) return rv ;
for (int i=0 ; i < aFileCount ; i++)
{
PRBool bTempFile = PR_FALSE ;
if (aFiles[i].lpszPathName)
{
if (aIsUnicode)
pFile->InitWithUnicodePath (aFiles[i].lpszPathName) ;
else
pFile->InitWithPath ((char *) aFiles[i].lpszPathName) ;
PRBool bExist ;
rv = pFile->Exists(&bExist) ;
if (NS_FAILED(rv) || (!bExist) ) return NS_ERROR_FILE_TARGET_DOES_NOT_EXIST ;
// we do this since MS Office apps create a temp file when sending
// the currently open document in that app
if (aFiles[i].lpszFileName)
{
// Win temp Path
nsAutoString tempPath ;
nsSpecialSystemDirectory tmpDir(nsSpecialSystemDirectory::OS_TemporaryDirectory);
((nsFileSpec*)&tmpDir)->GetNativePathString(tempPath);
tempPath.ToLowerCase() ;
// filename of the file attachment
nsXPIDLString pLeafName ;
pFile->GetUnicodeLeafName (getter_Copies(pLeafName)) ;
// dir path of the file attachment
nsXPIDLString pPath ;
pFile->GetUnicodePath (getter_Copies(pPath)) ;
nsAutoString Path ;
Path.Assign(pPath.get()) ;
nsAutoString LeafName ;
LeafName.Assign (pLeafName.get());
PRInt32 offset = Path.RFind (LeafName) ;
Path.SetLength(offset) ;
Path.ToLowerCase() ;
if (tempPath == Path)
{
// create another temp dir for mapi within Win temp dir
nsAutoString strTempDir ;
strTempDir += tempPath.get() ;
strTempDir.AppendWithConversion("moz_mapi") ;
pTempDir->InitWithUnicodePath (strTempDir.get()) ;
pTempDir->Exists (&bExist) ;
if (!bExist)
{
rv = pTempDir->Create(nsIFile::DIRECTORY_TYPE, 777) ;
if (NS_FAILED(rv)) return rv ;
}
// filename passed for the file attachment
if (aIsUnicode)
{
nsAutoString RealFileName ;
RealFileName.Assign (aFiles[i].lpszFileName) ;
// copy to our mapi temp dir with real name
rv = pFile->CopyToUnicode(pTempDir, RealFileName.get()) ;
if (NS_FAILED(rv)) return rv ;
pFile->InitWithUnicodePath(strTempDir.get()) ;
pFile->AppendUnicode (RealFileName.get()) ;
}
else
{
nsCAutoString asciiRealFileName ;
asciiRealFileName.Assign((char *) aFiles[i].lpszFileName) ;
nsCAutoString asciiLeafName ;
asciiLeafName.AssignWithConversion (pLeafName.get());
// copy to our mapi temp dir with real name
rv = pFile->CopyTo(pTempDir, asciiRealFileName.get()) ;
if (NS_FAILED(rv)) return rv ;
pFile->InitWithUnicodePath(strTempDir.get()) ;
pFile->Append (asciiRealFileName.get()) ;
}
// this one is a temp file
bTempFile = PR_TRUE ;
}
}
// get url
nsXPIDLCString pURL ;
pFile->GetURL (getter_Copies(pURL)) ;
if (pURL)
{
if (Attachments.Length() > 0)
Attachments.Append(",") ;
Attachments.Append(pURL) ;
if (bTempFile)
{
if (TempFiles.Length() > 0)
TempFiles.Append(",") ;
TempFiles.Append(pURL) ;
}
}
}
}
// set attachment
if (Attachments.Length() > 0)
rv = aCompFields->SetAttachments (Attachments.get());
// set temp file
if (TempFiles.Length() > 0)
rv = aCompFields->SetTemporaryFiles(TempFiles.get());
#ifdef RAJIV_DEBUG
printf ("Attachments : %s \n", Attachments.get()) ;
printf ("TempFiles : %s \n", TempFiles.get()) ;
#endif
return rv ;
}
// this is used to convert non Unicode data and then populate comp fields
nsresult nsMapiHook::PopulateCompFieldsWithConversion(lpnsMapiMessage aMessage,
nsIMsgCompFields * aCompFields)
{
nsresult rv = NS_OK ;
if (aMessage->lpOriginator)
{
nsAutoString From ;
From.AssignWithConversion((char *) aMessage->lpOriginator->lpszAddress);
aCompFields->SetFrom (From.get()) ;
}
nsAutoString To ;
nsAutoString Cc ;
nsAutoString Bcc ;
nsAutoString Comma ;
Comma.AssignWithConversion(",");
if (aMessage->lpRecips)
{
for (int i=0 ; i < (int) aMessage->nRecipCount ; i++)
{
if (aMessage->lpRecips[i].lpszAddress)
{
switch (aMessage->lpRecips[i].ulRecipClass)
{
case MAPI_TO :
if (To.Length() > 0)
To += Comma ;
To.AppendWithConversion ((char *) aMessage->lpRecips[i].lpszAddress);
break ;
case MAPI_CC :
if (Cc.Length() > 0)
Cc += Comma ;
Cc.AppendWithConversion ((char *) aMessage->lpRecips[i].lpszAddress);
break ;
case MAPI_BCC :
if (Bcc.Length() > 0)
Bcc += Comma ;
Bcc.AppendWithConversion ((char *) aMessage->lpRecips[i].lpszAddress) ;
break ;
}
}
}
}
// set To, Cc, Bcc
aCompFields->SetTo (To.get()) ;
aCompFields->SetCc (Cc.get()) ;
aCompFields->SetBcc (Bcc.get()) ;
nsAutoString platformCharSet;
// set subject
if (aMessage->lpszSubject)
{
nsAutoString Subject ;
if (platformCharSet.IsEmpty())
platformCharSet.Assign(nsMsgI18NFileSystemCharset());
rv = ConvertToUnicode(platformCharSet, (char *) aMessage->lpszSubject, Subject);
if (NS_FAILED(rv)) return rv ;
aCompFields->SetSubject(Subject.get()) ;
}
// handle attachments as File URL
rv = HandleAttachments (aCompFields, aMessage->nFileCount, aMessage->lpFiles, PR_FALSE) ;
if (NS_FAILED(rv)) return rv ;
// set body
if (aMessage->lpszNoteText)
{
nsAutoString Body ;
if (platformCharSet.IsEmpty())
platformCharSet.Assign(nsMsgI18NFileSystemCharset());
rv = ConvertToUnicode(platformCharSet, (char *) aMessage->lpszNoteText, Body);
if (NS_FAILED(rv)) return rv ;
rv = aCompFields->SetBody(Body.get()) ;
}
#ifdef RAJIV_DEBUG
// testing what all was set in CompFields
printf ("To : %S \n", To.get()) ;
printf ("CC : %S \n", Cc.get() ) ;
printf ("BCC : %S \n", Bcc.get() ) ;
#endif
return rv ;
}
// this is used to populate the docs as attachments in the Comp fields for Send Documents
nsresult nsMapiHook::PopulateCompFieldsForSendDocs(nsIMsgCompFields * aCompFields, ULONG aFlags,
PRUnichar * aDelimChar, PRUnichar * aFilePaths)
{
nsAutoString strDelimChars ;
nsString strFilePaths;
nsresult rv = NS_OK ;
if (aFlags & MAPI_UNICODE)
{
if (aDelimChar)
strDelimChars.Assign (aDelimChar) ;
if (aFilePaths)
strFilePaths.Assign (aFilePaths) ;
}
else
{
if (aDelimChar)
strDelimChars.AssignWithConversion ((char*) aDelimChar) ;
if (aFilePaths)
strFilePaths.AssignWithConversion ((char *) aFilePaths) ;
}
// check for comma in filename
if (strDelimChars.Find (",") == kNotFound) // if comma is not in the delimiter specified by user
{
if (strFilePaths.Find(",") != kNotFound) // if comma found in filenames return error
return NS_ERROR_FILE_INVALID_PATH ;
}
nsCString Attachments ;
// only 1 file is to be sent, no delim specified
if ((!strDelimChars.Length()) && (strFilePaths.Length()>0))
{
nsCOMPtr <nsILocalFile> pFile = do_CreateInstance (NS_LOCAL_FILE_CONTRACTID, &rv) ;
if (NS_FAILED(rv) || (!pFile) ) return rv ;
pFile->InitWithUnicodePath (strFilePaths.get()) ;
PRBool bExist ;
rv = pFile->Exists(&bExist) ;
if (NS_FAILED(rv) || (!bExist) ) return NS_ERROR_FILE_TARGET_DOES_NOT_EXIST ;
nsXPIDLCString pURL ;
pFile->GetURL (getter_Copies(pURL)) ;
if (pURL)
Attachments.Assign(pURL) ;
// set attachments for comp field and return
rv = aCompFields->SetAttachments (Attachments.get());
return rv ;
}
// multiple files to be sent, delim specified
nsCOMPtr <nsILocalFile> pFile = do_CreateInstance (NS_LOCAL_FILE_CONTRACTID, &rv) ;
if (NS_FAILED(rv) || (!pFile) ) return rv ;
PRInt32 offset = 0 ;
PRInt32 FilePathsLen = strFilePaths.Length() ;
if (FilePathsLen)
{
PRUnichar * newFilePaths = (PRUnichar *) strFilePaths.get() ;
while (offset != kNotFound)
{
nsString RemainingPaths ;
RemainingPaths.Assign(newFilePaths) ;
offset = RemainingPaths.Find (strDelimChars) ;
if (offset != kNotFound)
{
RemainingPaths.SetLength (offset) ;
if ((offset + strDelimChars.Length()) < FilePathsLen)
newFilePaths += offset + strDelimChars.Length() ;
}
pFile->InitWithUnicodePath (RemainingPaths.get()) ;
#ifdef RAJIV_DEBUG
printf ("File : %S \n", RemainingPaths.get()) ;
#endif
PRBool bExist ;
rv = pFile->Exists(&bExist) ;
if (NS_FAILED(rv) || (!bExist) ) return NS_ERROR_FILE_TARGET_DOES_NOT_EXIST ;
nsXPIDLCString pURL ;
pFile->GetURL (getter_Copies(pURL)) ;
if (pURL)
{
if (Attachments.Length() > 0)
Attachments.Append(",") ;
Attachments.Append(pURL) ;
}
}
rv = aCompFields->SetAttachments (Attachments.get());
}
return rv ;
}
// this used for Send with UI
nsresult nsMapiHook::ShowComposerWindow (unsigned long aSession, nsIMsgCompFields * aCompFields)
{
nsresult rv = NS_OK ;
// create a send listener to get back the send status
nsCOMPtr <nsIMsgSendListener> sendListener ;
rv = nsMAPISendListener::CreateMAPISendListener(getter_AddRefs(sendListener)) ;
if (NS_FAILED(rv) || (!sendListener) ) return rv ;
// create the compose params object
nsCOMPtr<nsIMsgComposeParams> pMsgComposeParams (do_CreateInstance(NS_MSGCOMPOSEPARAMS_CONTRACTID, &rv));
if (NS_FAILED(rv) || (!pMsgComposeParams) ) return rv ;
// populate the compose params
pMsgComposeParams->SetType(nsIMsgCompType::New);
pMsgComposeParams->SetFormat(nsIMsgCompFormat::Default);
pMsgComposeParams->SetComposeFields(aCompFields);
pMsgComposeParams->SetSendListener(sendListener) ;
/** get the nsIMsgComposeService object to open the compose window **/
nsCOMPtr <nsIMsgComposeService> compService = do_GetService (NS_MSGCOMPOSESERVICE_CONTRACTID) ;
if (NS_FAILED(rv)|| (!compService) ) return rv ;
rv = compService->OpenComposeWindowWithParams(nsnull, pMsgComposeParams) ;
if (NS_FAILED(rv)) return rv ;
return rv ;
}

View File

@@ -0,0 +1,66 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef MSG_MAPI_HOOK_H_
#define MSG_MAPI_HOOK_H_
#include "prtypes.h"
class nsMapiHook
{
public :
static PRBool Initialize();
static PRBool DisplayLoginDialog(PRBool aLogin, PRUnichar **aUsername,
PRUnichar **aPassword);
static PRBool VerifyUserName(const PRUnichar *aUsername, char **aIdKey);
static PRBool IsBlindSendAllowed () ;
static nsresult BlindSendMail (unsigned long aSession, nsIMsgCompFields * aCompFields) ;
static nsresult ShowComposerWindow (unsigned long aSession, nsIMsgCompFields * aCompFields) ;
static nsresult PopulateCompFields(lpnsMapiMessage aMessage, nsIMsgCompFields * aCompFields) ;
static nsresult PopulateCompFieldsWithConversion(lpnsMapiMessage aMessage,
nsIMsgCompFields * aCompFields) ;
static nsresult PopulateCompFieldsForSendDocs(nsIMsgCompFields * aCompFields,
ULONG aFlags, LPTSTR aDelimChar, LPTSTR aFilePaths) ;
static nsresult HandleAttachments (nsIMsgCompFields * aCompFields, PRInt32 aFileCount,
lpnsMapiFileDesc aFiles, BOOL aIsUnicode) ;
static void CleanUp();
static PRBool isMapiService;
};
#endif // MSG_MAPI_HOOK_H_

View File

@@ -0,0 +1,335 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
* Contributor(s): Rajiv Dayal (rdayal@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <mapidefs.h>
#include <mapi.h>
#include "msgMapi.h"
#include "msgMapiImp.h"
#include "msgMapiFactory.h"
#include "msgMapiMain.h"
#include "nsMsgCompFields.h"
#include "msgMapiHook.h"
#include "nsString.h"
#include "nsCOMPtr.h"
#include "nsISupports.h"
#include "nsMsgCompCID.h"
#include "nsMsgComposeStringBundle.h"
const CLSID CLSID_nsMapiImp = {0x29f458be, 0x8866, 0x11d5, {0xa3, 0xdd, 0x0, 0xb0, 0xd0, 0xf3, 0xba, 0xa7}};
nsMapiImp::nsMapiImp()
: m_cRef(1)
{
m_Lock = PR_NewLock();
}
nsMapiImp::~nsMapiImp()
{
if (m_Lock)
PR_DestroyLock(m_Lock);
}
STDMETHODIMP nsMapiImp::QueryInterface(const IID& aIid, void** aPpv)
{
if (aIid == IID_IUnknown)
{
*aPpv = static_cast<nsIMapi*>(this);
}
else if (aIid == IID_nsIMapi)
{
*aPpv = static_cast<nsIMapi*>(this);
}
else
{
*aPpv = nsnull;
return E_NOINTERFACE;
}
reinterpret_cast<IUnknown*>(*aPpv)->AddRef();
return S_OK;
}
STDMETHODIMP_(ULONG) nsMapiImp::AddRef()
{
return PR_AtomicIncrement(&m_cRef);
}
STDMETHODIMP_(ULONG) nsMapiImp::Release()
{
PRInt32 temp;
temp = PR_AtomicDecrement(&m_cRef);
if (m_cRef == 0)
{
delete this;
return 0;
}
return temp;
}
STDMETHODIMP nsMapiImp::IsValid()
{
return S_OK;
}
STDMETHODIMP nsMapiImp::IsValidSession(unsigned long aSession)
{
nsMAPIConfiguration *pConfig = nsMAPIConfiguration::GetMAPIConfiguration();
if (pConfig && pConfig->IsSessionValid(aSession))
return S_OK;
return E_FAIL;
}
STDMETHODIMP nsMapiImp::Initialize()
{
HRESULT hr = E_FAIL;
if (!m_Lock)
return E_FAIL;
PR_Lock(m_Lock);
// Initialize MAPI Configuration
nsMAPIConfiguration *pConfig = nsMAPIConfiguration::GetMAPIConfiguration();
if (pConfig != nsnull)
if (nsMapiHook::Initialize())
hr = S_OK;
PR_Unlock(m_Lock);
return hr;
}
STDMETHODIMP nsMapiImp::Login(unsigned long aUIArg, LOGIN_PW_TYPE aLogin, LOGIN_PW_TYPE aPassWord,
unsigned long aFlags, unsigned long *aSessionId)
{
HRESULT hr = E_FAIL;
PRBool bNewSession = PR_FALSE;
char *id_key = nsnull;
if (aFlags & MAPI_NEW_SESSION)
bNewSession = PR_TRUE;
// Check For Profile Name
if (aLogin != nsnull && aLogin[0] != '\0')
{
if (nsMapiHook::VerifyUserName(aLogin, &id_key) == PR_FALSE)
{
*aSessionId = MAPI_E_LOGIN_FAILURE;
return hr;
}
}
// finally register(create) the session.
PRUint32 nSession_Id;
PRInt16 nResult = 0;
nsMAPIConfiguration *pConfig = nsMAPIConfiguration::GetMAPIConfiguration();
if (pConfig != nsnull)
nResult = pConfig->RegisterSession(aUIArg, aLogin, aPassWord,
(aFlags & MAPI_FORCE_DOWNLOAD), bNewSession,
&nSession_Id, id_key);
switch (nResult)
{
case -1 :
{
*aSessionId = MAPI_E_TOO_MANY_SESSIONS;
return hr;
}
case 0 :
{
*aSessionId = MAPI_E_INSUFFICIENT_MEMORY;
return hr;
}
default :
{
*aSessionId = nSession_Id;
break;
}
}
return S_OK;
}
STDMETHODIMP nsMapiImp::SendMail( unsigned long aSession, lpnsMapiMessage aMessage,
short aRecipCount, lpnsMapiRecipDesc aRecips , short aFileCount, lpnsMapiFileDesc aFiles ,
unsigned long aFlags, unsigned long aReserved)
{
HRESULT hr = SUCCESS_SUCCESS ;
// Assign the pointers in the aMessage struct to the array of Recips and Files
// recieved here from MS COM. These are used in BlindSendMail and ShowCompWin fns
aMessage->lpRecips = aRecips ;
aMessage->lpFiles = aFiles ;
nsresult rv ;
/** create nsIMsgCompFields obj and populate it **/
nsCOMPtr<nsIMsgCompFields> pCompFields = do_CreateInstance(NS_MSGCOMPFIELDS_CONTRACTID, &rv) ;
if (NS_FAILED(rv) || (!pCompFields) ) return MAPI_E_INSUFFICIENT_MEMORY ;
if (aFlags & MAPI_UNICODE)
rv = nsMapiHook::PopulateCompFields(aMessage, pCompFields) ;
else
rv = nsMapiHook::PopulateCompFieldsWithConversion(aMessage, pCompFields) ;
if (NS_SUCCEEDED (rv))
{
// see flag to see if UI needs to be brought up
if (!(aFlags & MAPI_DIALOG))
{
rv = nsMapiHook::BlindSendMail(aSession, pCompFields);
}
else
{
rv = nsMapiHook::ShowComposerWindow(aSession, pCompFields);
}
}
// return success
if (NS_SUCCEEDED (rv)) return hr ;
// if failure return the related MAPI failure code
switch (rv)
{
case NS_MSG_NO_RECIPIENTS :
hr = MAPI_E_BAD_RECIPTYPE ;
break ;
case NS_ERROR_COULD_NOT_GET_USERS_MAIL_ADDRESS :
hr = MAPI_E_INVALID_RECIPS ;
break ;
case NS_ERROR_COULD_NOT_LOGIN_TO_SMTP_SERVER :
hr = MAPI_E_LOGIN_FAILURE ;
break ;
case NS_MSG_UNABLE_TO_OPEN_FILE :
case NS_MSG_UNABLE_TO_OPEN_TMP_FILE :
case NS_MSG_COULDNT_OPEN_FCC_FOLDER :
case NS_ERROR_FILE_INVALID_PATH :
hr = MAPI_E_ATTACHMENT_OPEN_FAILURE ;
break ;
case NS_ERROR_FILE_TARGET_DOES_NOT_EXIST :
hr = MAPI_E_ATTACHMENT_NOT_FOUND ;
break ;
case NS_MSG_CANCELLING :
hr = MAPI_E_USER_ABORT ;
break ;
case NS_MSG_ERROR_WRITING_FILE :
case NS_MSG_UNABLE_TO_SAVE_TEMPLATE :
case NS_MSG_UNABLE_TO_SAVE_DRAFT :
hr = MAPI_E_ATTACHMENT_WRITE_FAILURE ;
break ;
default :
hr = MAPI_E_FAILURE ;
break ;
}
return hr ;
}
STDMETHODIMP nsMapiImp::SendDocuments( unsigned long aSession, LPTSTR aDelimChar,
LPTSTR aFilePaths, LPTSTR aFileNames, ULONG aFlags)
{
HRESULT hr = SUCCESS_SUCCESS ;
nsresult rv = NS_OK ;
/** create nsIMsgCompFields obj and populate it **/
nsCOMPtr<nsIMsgCompFields> pCompFields = do_CreateInstance(NS_MSGCOMPFIELDS_CONTRACTID, &rv) ;
if (NS_FAILED(rv) || (!pCompFields) ) return MAPI_E_INSUFFICIENT_MEMORY ;
if (aFilePaths)
{
rv = nsMapiHook::PopulateCompFieldsForSendDocs(pCompFields, aFlags, aDelimChar, aFilePaths) ;
}
if (NS_SUCCEEDED (rv))
rv = nsMapiHook::ShowComposerWindow(aSession, pCompFields);
// return success
if (NS_SUCCEEDED (rv)) return hr ;
// if failure return the related MAPI failure code
switch (rv)
{
case NS_ERROR_COULD_NOT_LOGIN_TO_SMTP_SERVER :
hr = MAPI_E_LOGIN_FAILURE ;
break ;
case NS_MSG_UNABLE_TO_OPEN_FILE :
case NS_MSG_UNABLE_TO_OPEN_TMP_FILE :
case NS_MSG_COULDNT_OPEN_FCC_FOLDER :
case NS_ERROR_FILE_INVALID_PATH :
hr = MAPI_E_ATTACHMENT_OPEN_FAILURE ;
break ;
case NS_ERROR_FILE_TARGET_DOES_NOT_EXIST :
hr = MAPI_E_ATTACHMENT_NOT_FOUND ;
break ;
case NS_MSG_CANCELLING :
hr = MAPI_E_USER_ABORT ;
break ;
case NS_MSG_ERROR_WRITING_FILE :
case NS_MSG_UNABLE_TO_SAVE_TEMPLATE :
case NS_MSG_UNABLE_TO_SAVE_DRAFT :
hr = MAPI_E_ATTACHMENT_WRITE_FAILURE ;
break ;
default :
hr = MAPI_E_FAILURE ;
break ;
}
return hr ;
}
STDMETHODIMP nsMapiImp::Logoff (unsigned long aSession)
{
nsMAPIConfiguration *pConfig = nsMAPIConfiguration::GetMAPIConfiguration();
if (pConfig->UnRegisterSession((PRUint32)aSession))
return S_OK;
return E_FAIL;
}
STDMETHODIMP nsMapiImp::CleanUp()
{
nsMapiHook::CleanUp();
return S_OK;
}

View File

@@ -0,0 +1,87 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef MSG_MAPI_IMP_H
#define MSG_MAPI_IMP_H
#include <windows.h>
#include <mapi.h>
#include "msgMapi.h"
#include "nsXPIDLString.h"
#include "nspr.h"
class nsMapiImp : public nsIMapi
{
public :
// IUnknown
STDMETHODIMP QueryInterface(const IID& aIid, void** aPpv);
STDMETHODIMP_(ULONG) AddRef();
STDMETHODIMP_(ULONG) Release();
// Interface INsMapi
STDMETHODIMP Login(unsigned long aUIArg, LOGIN_PW_TYPE aLogin,
LOGIN_PW_TYPE aPassWord, unsigned long aFlags,
unsigned long *aSessionId);
STDMETHODIMP SendMail( unsigned long aSession, lpnsMapiMessage aMessage,
short aRecipCount, lpnsMapiRecipDesc aRecips ,
short aFileCount, lpnsMapiFileDesc aFiles ,
unsigned long aFlags, unsigned long aReserved) ;
STDMETHODIMP SendDocuments( unsigned long aSession, LPTSTR aDelimChar,
LPTSTR aFilePaths, LPTSTR aFileNames, ULONG aFlags);
STDMETHODIMP Initialize();
STDMETHODIMP IsValid();
STDMETHODIMP IsValidSession(unsigned long aSession);
STDMETHODIMP Logoff (unsigned long aSession);
STDMETHODIMP CleanUp();
nsMapiImp();
~nsMapiImp();
private :
PRLock *m_Lock;
PRInt32 m_cRef;
};
#endif // MSG_MAPI_IMP_H

View File

@@ -0,0 +1,340 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "msgMapiMain.h"
#include "nsIServiceManager.h"
#include "nsCOMPtr.h"
// move to xpcom bug 81956.
class nsPRUintKey : public nsHashKey {
protected:
PRUint32 mKey;
public:
nsPRUintKey(PRUint32 key) : mKey(key) {}
PRUint32 HashCode(void) const {
return mKey;
}
PRBool Equals(const nsHashKey *aKey) const {
return mKey == ((const nsPRUintKey *) aKey)->mKey;
}
nsHashKey *Clone() const {
return new nsPRUintKey(mKey);
}
PRUint32 GetValue() { return mKey; }
};
//
nsMAPIConfiguration *nsMAPIConfiguration::m_pSelfRef = nsnull;
PRUint32 nsMAPIConfiguration::session_generator = 0;
PRUint32 nsMAPIConfiguration::sessionCount = 0;
nsMAPIConfiguration *nsMAPIConfiguration::GetMAPIConfiguration()
{
if (m_pSelfRef == nsnull)
m_pSelfRef = new nsMAPIConfiguration();
return m_pSelfRef;
}
nsMAPIConfiguration::nsMAPIConfiguration()
: m_nMaxSessions(MAX_SESSIONS),
m_ProfileMap(nsnull),
m_SessionMap(nsnull)
{
m_Lock = PR_NewLock();
m_ProfileMap = new nsHashtable();
m_SessionMap = new nsHashtable();
NS_ASSERTION(m_SessionMap && m_ProfileMap, "hashtables not created");
}
static PRBool
FreeSessionMapEntries(nsHashKey *aKey, void *aData, void* aClosure)
{
nsMAPISession *pTemp = (nsMAPISession*) aData;
delete pTemp;
pTemp = nsnull;
return PR_TRUE;
}
static PRBool
FreeProfileMapEntries(nsHashKey *aKey, void *aData, void* aClosure)
{
return PR_TRUE;
}
nsMAPIConfiguration::~nsMAPIConfiguration()
{
if (m_Lock)
PR_DestroyLock(m_Lock);
if (m_SessionMap)
{
m_SessionMap->Reset(FreeSessionMapEntries);
delete m_SessionMap;
m_SessionMap = nsnull;
}
if (m_ProfileMap)
{
m_ProfileMap->Reset(FreeProfileMapEntries);
delete m_ProfileMap;
m_ProfileMap = nsnull;
}
}
void nsMAPIConfiguration::OpenConfiguration()
{
// No. of max. sessions is set to MAX_SESSIONS. In future
// if it is decided to have configuration (registry)
// parameter, this function can be used to set the
// max sessions;
return;
}
PRInt16 nsMAPIConfiguration::RegisterSession(PRUint32 aHwnd,
const PRUnichar *aUserName, const PRUnichar *aPassword,
PRBool aForceDownLoad, PRBool aNewSession,
PRUint32 *aSession, char *aIdKey)
{
PRInt16 nResult = 0;
PRUint32 n_SessionId = 0;
PR_Lock(m_Lock);
// Check whether max sessions is exceeded
if (sessionCount >= m_nMaxSessions)
{
PR_Unlock(m_Lock);
return -1;
}
if (aUserName != nsnull && aUserName[0] != '\0')
{
nsStringKey usernameKey(aUserName);
n_SessionId = (PRUint32) m_ProfileMap->Get(&usernameKey);
}
// try to share a session; if not create a session
if (n_SessionId > 0)
{
nsPRUintKey sessionKey(n_SessionId);
nsMAPISession *pTemp = (nsMAPISession *)m_SessionMap->Get(&sessionKey);
if (pTemp != nsnull)
{
pTemp->IncrementSession();
*aSession = n_SessionId;
nResult = 1;
}
}
else if (aNewSession || n_SessionId == 0) // checking for n_SessionId is a concession
{
// create a new session ; if new session is specified OR there is no session
nsMAPISession *pTemp = nsnull;
pTemp = new nsMAPISession(aHwnd, aUserName,
aPassword, aForceDownLoad, aIdKey);
if (pTemp != nsnull)
{
session_generator++;
// I don't think there will be (2 power 32) sessions alive
// in a cycle. This is an assumption
if (session_generator == 0)
session_generator++;
nsPRUintKey sessionKey(session_generator);
m_SessionMap->Put(&sessionKey, pTemp);
if (aUserName != nsnull && aUserName[0] != '\0')
{
nsStringKey usernameKey(aUserName);
m_ProfileMap->Put(&usernameKey, (void*)session_generator);
}
*aSession = session_generator;
sessionCount++;
nResult = 1;
}
}
PR_Unlock(m_Lock);
return nResult;
}
PRBool nsMAPIConfiguration::UnRegisterSession(PRUint32 aSessionID)
{
PRBool bResult = PR_FALSE;
PR_Lock(m_Lock);
if (aSessionID != 0)
{
nsPRUintKey sessionKey(aSessionID);
nsMAPISession *pTemp = (nsMAPISession *)m_SessionMap->Get(&sessionKey);
if (pTemp != nsnull)
{
if (pTemp->DecrementSession() == 0)
{
if (pTemp->m_pProfileName.get() != nsnull)
{
nsStringKey stringKey(pTemp->m_pProfileName.get());
m_ProfileMap->Remove(&stringKey);
}
m_SessionMap->Remove(&sessionKey);
sessionCount--;
bResult = PR_TRUE;
}
}
}
PR_Unlock(m_Lock);
return bResult;
}
PRBool nsMAPIConfiguration::IsSessionValid(PRUint32 aSessionID)
{
if (aSessionID == 0)
return PR_FALSE;
PRBool retValue = PR_FALSE;
nsPRUintKey sessionKey(aSessionID);
PR_Lock(m_Lock);
retValue = m_SessionMap->Exists(&sessionKey);
PR_Unlock(m_Lock);
return retValue;
}
PRUnichar *nsMAPIConfiguration::GetPassWord(PRUint32 aSessionID)
{
PRUnichar *pResult = nsnull;
PR_Lock(m_Lock);
if (aSessionID != 0)
{
nsPRUintKey sessionKey(aSessionID);
nsMAPISession *pTemp = (nsMAPISession *)m_SessionMap->Get(&sessionKey);
if (pTemp)
{
pResult = pTemp->GetPassWord();
}
}
PR_Unlock(m_Lock);
return pResult;
}
char *nsMAPIConfiguration::GetIdKey(PRUint32 aSessionID)
{
char *pResult = nsnull;
PR_Lock(m_Lock);
if (aSessionID != 0)
{
nsPRUintKey sessionKey(aSessionID);
nsMAPISession *pTemp = (nsMAPISession *)m_SessionMap->Get(&sessionKey);
if (pTemp)
{
pResult = pTemp->GetIdKey();
}
}
PR_Unlock(m_Lock);
return pResult;
}
nsMAPISession::nsMAPISession(PRUint32 aHwnd, const PRUnichar *aUserName,\
const PRUnichar *aPassword, \
PRBool aForceDownLoad, char *aKey)
: m_bIsForcedDownLoad(aForceDownLoad),
m_hAppHandle(aHwnd),
m_nShared(1),
m_pIdKey(aKey)
{
m_pProfileName.Assign(aUserName);
m_pPassword.Assign(aPassword);
}
nsMAPISession::~nsMAPISession()
{
if (m_pIdKey != nsnull)
{
delete [] m_pIdKey;
m_pIdKey = nsnull;
}
}
PRUint32 nsMAPISession::IncrementSession()
{
return ++m_nShared;
}
PRUint32 nsMAPISession::DecrementSession()
{
return --m_nShared;
}
PRUint32 nsMAPISession::GetSessionCount()
{
return m_nShared;
}
PRUnichar *nsMAPISession::GetPassWord()
{
return (PRUnichar *)m_pPassword.get();
}
char *nsMAPISession::GetIdKey()
{
return m_pIdKey;
}

View File

@@ -0,0 +1,104 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef MSG_MAPI_MAIN_H_
#define NSG_MAPI_MAIN_H_
#define MAX_NAME_LEN 256
#define MAX_PW_LEN 256
#define MAX_SESSIONS 50
#include "nsXPIDLString.h"
#include "nspr.h"
#include "nsString.h"
#include "nsHashtable.h"
class nsMAPIConfiguration
{
private :
static PRUint32 session_generator;
static PRUint32 sessionCount;
static nsMAPIConfiguration *m_pSelfRef;
PRLock *m_Lock;
PRUint32 m_nMaxSessions;
nsHashtable *m_ProfileMap;
nsHashtable *m_SessionMap;
nsMAPIConfiguration();
public :
static nsMAPIConfiguration *GetMAPIConfiguration();
void OpenConfiguration();
PRInt16 RegisterSession(PRUint32 aHwnd, const PRUnichar *aUserName, \
const PRUnichar *aPassword, PRBool aForceDownLoad, \
PRBool aNewSession, PRUint32 *aSession, char *aIdKey);
PRBool IsSessionValid(PRUint32 aSessionID);
PRBool UnRegisterSession(PRUint32 aSessionID);
PRUnichar *GetPassWord(PRUint32 aSessionID);
char *GetIdKey(PRUint32 aSessionID);
~nsMAPIConfiguration();
};
class nsMAPISession
{
friend class nsMAPIConfiguration;
private :
PRBool m_bIsForcedDownLoad;
PRBool m_bApp_or_Service;
PRUint32 m_hAppHandle;
PRUint32 m_nShared;
char *m_pIdKey;
nsString m_pProfileName;
nsString m_pPassword;
public :
nsMAPISession(PRUint32 aHwnd, const PRUnichar *aUserName, \
const PRUnichar *aPassword, \
PRBool aForceDownLoad, char *aKey);
PRUint32 IncrementSession();
PRUint32 DecrementSession();
PRUint32 GetSessionCount();
PRUnichar *nsMAPISession::GetPassWord();
char *nsMAPISession::GetIdKey();
~nsMAPISession();
};
#endif // MSG_MAPI_MAIN_H_

View File

@@ -0,0 +1,146 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "msgMapiSupport.h"
#include "nsISupports.h"
const CLSID CLSID_nsMapiImp = {0x29f458be, 0x8866, 0x11d5, \
{0xa3, 0xdd, 0x0, 0xb0, 0xd0, 0xf3, 0xba, 0xa7}};
PRBool WINAPI DllMain(HINSTANCE aInstance, DWORD aReason, LPVOID aReserved)
{
switch (aReason)
{
case DLL_PROCESS_ATTACH :
{
// Initialize MAPI Support
nsMapiSupport *pTemp = nsMapiSupport::GetNsMapiSupport();
break;
}
case DLL_PROCESS_DETACH :
{
nsMapiSupport *pTemp = nsMapiSupport::GetNsMapiSupport();
pTemp->UnInitMSCom();
delete pTemp;
pTemp = nsnull;
}
}
return PR_TRUE;
}
extern "C"
{
void __declspec(dllexport) Init()
{
nsMapiSupport *pTemp = nsMapiSupport::GetNsMapiSupport();
if (pTemp != nsnull)
pTemp->InitMSCom();
}
}
nsMapiSupport* nsMapiSupport::m_pSelfRef = nsnull;
nsMapiSupport *nsMapiSupport::GetNsMapiSupport()
{
if (m_pSelfRef == nsnull)
m_pSelfRef = new nsMapiSupport();
return m_pSelfRef;
}
nsMapiSupport::nsMapiSupport()
: m_dwRegister(0),
m_nsMapiFactory(nsnull)
{
}
nsMapiSupport::~nsMapiSupport()
{
}
PRBool nsMapiSupport::RegsiterComponents()
{
if (m_nsMapiFactory == nsnull) // No Registering if already done. Sanity Check!!
{
m_nsMapiFactory = new nsMapiFactory();
if (m_nsMapiFactory != nsnull)
{
HRESULT hr = ::CoRegisterClassObject(CLSID_nsMapiImp, \
m_nsMapiFactory, \
CLSCTX_LOCAL_SERVER, \
REGCLS_MULTIPLEUSE, \
&m_dwRegister);
if (FAILED(hr))
{
m_nsMapiFactory->Release() ;
m_nsMapiFactory = nsnull;
return PR_FALSE;
}
}
}
return PR_TRUE;
}
PRBool nsMapiSupport::UnRegisterComponents()
{
if (m_dwRegister != 0)
::CoRevokeClassObject(m_dwRegister);
if (m_nsMapiFactory != nsnull)
{
m_nsMapiFactory->Release();
m_nsMapiFactory = nsnull;
}
return PR_TRUE;
}
void nsMapiSupport::InitMSCom()
{
::CoInitialize(nsnull);
RegsiterComponents();
}
void nsMapiSupport::UnInitMSCom()
{
UnRegisterComponents();
::CoUninitialize();
}

View File

@@ -0,0 +1,64 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
# Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef MSG_MAPI_SUPPORT_H_
#define MSG_MAPI_SUPPORT_H_
#include "msgMapiFactory.h"
#include "prtypes.h"
class __declspec(dllexport) nsMapiSupport
{
private :
DWORD m_dwRegister;
static nsMapiSupport *m_pSelfRef;
nsMapiFactory *m_nsMapiFactory;
nsMapiSupport();
public :
static nsMapiSupport *GetNsMapiSupport();
~nsMapiSupport();
PRBool RegsiterComponents();
void UnInitMSCom();
void InitMSCom();
PRBool UnRegisterComponents();
};
#endif // MSG_MAPI_SUPPORT_H_

View File

@@ -0,0 +1,48 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Srilatha Moturi <srilatha@netscape.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH=..\..\..\..
MODULE=nsMapiRegistry
XPIDL_MODULE=mapiregistry
XPIDLSRCS = \
.\nsIMapiRegistry.idl \
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,78 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Srilatha Moturi <srilatha@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
interface nsIDOMWindow;
/**
* This interface provides support for registering Mozilla as the default
* Mail Client. This interface can also be used to get/set the user preference
* for the default Mail Client.
*
*/
[scriptable, uuid(c5be14ba-4e0a-4eec-a1b8-04363761d63c)]
interface nsIMapiRegistry: nsISupports {
/** This is set to TRUE if Mozilla is the default Application
*/
readonly attribute boolean isDefaultMailClient;
/** This is set TRUE only once per session.
*/
readonly attribute boolean showDialog;
/** This will update the registry keys to set Mozilla as default Mail Client.
*/
void setDefaultMailClient();
/** This will reset the registry keys for the default Mail Client.
*/
void unsetDefaultMailClient();
/** This will bring the dialog asking the user if he/she wants to set
* Mozilla as default Mail Client.
* Call this only if Mozilla is not the default Mail client
*/
void showMailIntegrationDialog(in nsIDOMWindow parentWindow);
};
%{C++
#define NS_IMAPIWINHOOK_CONTRACTID "@mozilla.org/mapiregistry;1"
#define NS_IMAPIWINHOOK_CLASSNAME "Mozilla MAPI Registry"
%}

View File

@@ -0,0 +1,321 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika <kkhandrika@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <objbase.h>
#include <assert.h>
#include "nsString.h"
#include "Registry.h"
#define MAPI_PROXY_DLL_NAME "MapiProxy.dll"
#define MAPI_STARTUP_ARG " /MAPIStartUp"
#define MAX_SIZE 2048
// Size of a CLSID as a string
const int CLSID_STRING_SIZE = 39;
// Proxy/Stub Dll Routines
typedef HRESULT (__stdcall ProxyServer)();
// Convert a CLSID to a char string.
BOOL CLSIDtochar(const CLSID& clsid, char* szCLSID,
int length)
{
LPOLESTR wszCLSID = NULL;
// Get CLSID
HRESULT hr = StringFromCLSID(clsid, &wszCLSID);
if (FAILED(hr))
return FALSE;
// Covert from wide characters to non-wide.
wcstombs(szCLSID, wszCLSID, length);
// Free memory.
CoTaskMemFree(wszCLSID);
return TRUE;
}
// Create a key and set its value.
BOOL setKeyAndValue(nsCAutoString keyName, const char* subKey,
const char* theValue)
{
HKEY hKey;
BOOL retValue = TRUE;
nsCAutoString theKey(keyName);
if (subKey != NULL)
{
theKey += "\\";
theKey += subKey;
}
// Create and open key and subkey.
long lResult = RegCreateKeyEx(HKEY_CLASSES_ROOT, theKey.get(),
0, NULL, REG_OPTION_NON_VOLATILE,
KEY_ALL_ACCESS, NULL, &hKey, NULL);
if (lResult != ERROR_SUCCESS)
return FALSE ;
// Set the Value.
if (theValue != NULL)
{
lResult = RegSetValueEx(hKey, NULL, 0, REG_SZ, (BYTE *)theValue,
strlen(theValue)+1);
if (lResult != ERROR_SUCCESS)
retValue = FALSE;
}
RegCloseKey(hKey);
return TRUE;
}
// Delete a key and all of its descendents.
LONG recursiveDeleteKey(HKEY hKeyParent, // Parent of key to delete
const char* lpszKeyChild) // Key to delete
{
// Open the child.
HKEY hKeyChild ;
LONG lRes = RegOpenKeyEx(hKeyParent, lpszKeyChild, 0,
KEY_ALL_ACCESS, &hKeyChild) ;
if (lRes != ERROR_SUCCESS)
{
return lRes ;
}
// Enumerate all of the decendents of this child.
FILETIME time ;
char szBuffer[MAX_SIZE] ;
DWORD dwSize = MAX_SIZE ;
while (RegEnumKeyEx(hKeyChild, 0, szBuffer, &dwSize, NULL,
NULL, NULL, &time) == S_OK)
{
// Delete the decendents of this child.
lRes = recursiveDeleteKey(hKeyChild, szBuffer) ;
if (lRes != ERROR_SUCCESS)
{
// Cleanup before exiting.
RegCloseKey(hKeyChild) ;
return lRes;
}
dwSize = MAX_SIZE;
}
// Close the child.
RegCloseKey(hKeyChild) ;
// Delete this child.
return RegDeleteKey(hKeyParent, lpszKeyChild) ;
}
void RegisterProxy()
{
HINSTANCE h = NULL;
ProxyServer *RegisterFunc = NULL;
char szModule[MAX_SIZE];
char *pTemp = NULL;
HMODULE hModule = GetModuleHandle(NULL);
DWORD dwResult = ::GetModuleFileName(hModule, szModule,
sizeof(szModule)/sizeof(char));
if (dwResult == 0)
return;
pTemp = strrchr(szModule, '\\');
if (pTemp == NULL)
return;
*pTemp = '\0';
nsCAutoString proxyPath(szModule);
proxyPath += "\\";
proxyPath += MAPI_PROXY_DLL_NAME;
h = LoadLibrary(proxyPath.get());
if (h == NULL)
return;
RegisterFunc = (ProxyServer *) GetProcAddress(h, "DllRegisterServer");
if (RegisterFunc)
RegisterFunc();
FreeLibrary(h);
}
void UnRegisterProxy()
{
HINSTANCE h = NULL;
ProxyServer *UnRegisterFunc = NULL;
char szModule[MAX_SIZE];
char *pTemp = NULL;
HMODULE hModule = GetModuleHandle(NULL);
DWORD dwResult = ::GetModuleFileName(hModule, szModule,
sizeof(szModule)/sizeof(char));
if (dwResult == 0)
return;
pTemp = strrchr(szModule, '\\');
if (pTemp == NULL)
return;
*pTemp = '\0';
nsCAutoString proxyPath(szModule);
proxyPath += "\\";
proxyPath += MAPI_PROXY_DLL_NAME;
h = LoadLibrary(proxyPath.get());
if (h == NULL)
return;
UnRegisterFunc = (ProxyServer *) GetProcAddress(h, "DllUnregisterServer");
if (UnRegisterFunc)
UnRegisterFunc();
FreeLibrary(h);
}
// Register the component in the registry.
HRESULT RegisterServer(const CLSID& clsid, // Class ID
const char* szFriendlyName, // Friendly Name
const char* szVerIndProgID, // Programmatic
const char* szProgID) // IDs
{
HMODULE hModule = GetModuleHandle(NULL);
char szModuleName[MAX_SIZE];
char szCLSID[CLSID_STRING_SIZE];
nsCAutoString independentProgId(szVerIndProgID);
nsCAutoString progId(szProgID);
DWORD dwResult = ::GetModuleFileName(hModule, szModuleName,
sizeof(szModuleName)/sizeof(char));
if (dwResult == 0)
return S_FALSE;
nsCAutoString moduleName(szModuleName);
nsCAutoString registryKey("CLSID\\");
moduleName += MAPI_STARTUP_ARG;
// Convert the CLSID into a char.
if (!CLSIDtochar(clsid, szCLSID, sizeof(szCLSID)))
return S_FALSE;
registryKey += szCLSID;
// Add the CLSID to the registry.
if (!setKeyAndValue(registryKey, NULL, szFriendlyName))
return S_FALSE;
if (!setKeyAndValue(registryKey, "LocalServer32", moduleName.get()))
return S_FALSE;
// Add the ProgID subkey under the CLSID key.
if (!setKeyAndValue(registryKey, "ProgID", szProgID))
return S_FALSE;
// Add the version-independent ProgID subkey under CLSID key.
if (!setKeyAndValue(registryKey, "VersionIndependentProgID", szVerIndProgID))
return S_FALSE;
// Add the version-independent ProgID subkey under HKEY_CLASSES_ROOT.
if (!setKeyAndValue(independentProgId, NULL, szFriendlyName))
return S_FALSE;
if (!setKeyAndValue(independentProgId, "CLSID", szCLSID))
return S_FALSE;
if (!setKeyAndValue(independentProgId, "CurVer", szProgID))
return S_FALSE;
// Add the versioned ProgID subkey under HKEY_CLASSES_ROOT.
if (!setKeyAndValue(progId, NULL, szFriendlyName))
return S_FALSE;
if (!setKeyAndValue(progId, "CLSID", szCLSID))
return S_FALSE;
RegisterProxy();
return S_OK;
}
LONG UnregisterServer(const CLSID& clsid, // Class ID
const char* szVerIndProgID, // Programmatic
const char* szProgID) // IDs
{
LONG lResult = S_OK;
// Convert the CLSID into a char.
char szCLSID[CLSID_STRING_SIZE];
if (!CLSIDtochar(clsid, szCLSID, sizeof(szCLSID)))
return S_FALSE;
UnRegisterProxy();
nsCAutoString registryKey("CLSID\\");
registryKey += szCLSID;
lResult = recursiveDeleteKey(HKEY_CLASSES_ROOT, registryKey.get());
if (lResult == ERROR_SUCCESS || lResult == ERROR_FILE_NOT_FOUND)
return lResult;
registryKey += "\\LocalServer32";
// Delete only the path for this server.
lResult = recursiveDeleteKey(HKEY_CLASSES_ROOT, registryKey.get());
if (lResult != ERROR_SUCCESS && lResult != ERROR_FILE_NOT_FOUND)
return lResult;
// Delete the version-independent ProgID Key.
lResult = recursiveDeleteKey(HKEY_CLASSES_ROOT, szVerIndProgID);
if (lResult != ERROR_SUCCESS && lResult != ERROR_FILE_NOT_FOUND)
return lResult;
lResult = recursiveDeleteKey(HKEY_CLASSES_ROOT, szProgID);
return lResult;
}

View File

@@ -0,0 +1,57 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Krishna Mohan Khandrika <kkhandrika@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _REGISTRY_H_
#define _REGISTRY_H_
#include <objbase.h>
#include <assert.h>
// This function will register a component in the Registry.
HRESULT RegisterServer(const CLSID& clsid,
const char* szFriendlyName,
const char* szVerIndProgID,
const char* szProgID) ;
// This function will unregister a component.
HRESULT UnregisterServer(const CLSID& clsid,
const char* szVerIndProgID,
const char* szProgID) ;
#endif

View File

@@ -0,0 +1,72 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Srilatha Moturi <srilatha@netscape.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH=..\..\..\..
MODULE=nsMapiRegistry
MAKE_OBJ_TYPE = DLL
LIBRARY_NAME=$(MODULE)
MODULE_NAME=nsMapiRegistry
CPPSRCS= \
nsMapiRegistry.cpp \
Registry.cpp \
nsMapiRegistryUtils.cpp \
$(NULL)
CPP_OBJS= \
.\$(OBJDIR)\nsMapiRegistry.obj \
.\$(OBJDIR)\Registry.obj \
.\$(OBJDIR)\nsMapiRegistryUtils.obj \
$(NULL)
LLIBS= \
$(DIST)\lib\xpcom.lib \
$(LIBNSPR) \
$(NULL)
WIN_LIBS= \
ole32.lib \
$(NULL)
EXPORTS= \
nsMapiRegistry.h \
Registry.h \
nsMapiRegistryUtils.h \
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,121 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#undef UNICODE
#undef _UNICODE
#include "msgMapiFactory.h"
#include "msgMapiImp.h"
#include "msgMapi.h"
const CLSID CLSID_nsMapiImp = {0x29f458be, 0x8866, 0x11d5, {0xa3, 0xdd, 0x0, 0xb0, 0xd0, 0xf3, 0xba, 0xa7}};
nsMapiFactory::nsMapiFactory()
: m_cRef(1)
{
}
nsMapiFactory::~nsMapiFactory()
{
}
STDMETHODIMP nsMapiFactory::QueryInterface(const IID& aIid, void** aPpv)
{
if ((aIid == IID_IUnknown) || (aIid == IID_IClassFactory))
{
*aPpv = static_cast<IClassFactory*>(this);
}
else
{
*aPpv = nsnull;
return E_NOINTERFACE;
}
reinterpret_cast<IUnknown*>(*aPpv)->AddRef();
return S_OK;
}
STDMETHODIMP_(ULONG) nsMapiFactory::AddRef()
{
return (PR_AtomicIncrement(&m_cRef));
}
STDMETHODIMP_(ULONG) nsMapiFactory::Release()
{
PRInt32 temp;
temp = PR_AtomicDecrement(&m_cRef);
if (m_cRef == 0)
{
delete this;
return 0;
}
return temp;
}
STDMETHODIMP nsMapiFactory::CreateInstance(IUnknown* aUnknownOuter,
const IID& aIid,
void** aPpv)
{
// Cannot aggregate.
if (aUnknownOuter != nsnull)
{
return CLASS_E_NOAGGREGATION ;
}
// Create component.
nsMapiImp* pImp = new nsMapiImp();
if (pImp == nsnull)
{
return E_OUTOFMEMORY ;
}
// Get the requested interface.
HRESULT hr = pImp->QueryInterface(aIid, aPpv);
// Release the IUnknown pointer.
// (If QueryInterface failed, component will delete itself.)
pImp->Release();
return hr;
}
STDMETHODIMP nsMapiFactory::LockServer(PRBool aLock)
{
return S_OK ;
}

View File

@@ -0,0 +1,69 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef MSG_MAPI_FACTORY_H
#define MSG_MAPI_FACTORY_H
#include <windows.h>
#include <objbase.h>
#include "nspr.h"
class nsMapiFactory : public IClassFactory
{
public :
// IUnknown
STDMETHODIMP QueryInterface (REFIID aIid, void** aPpv);
STDMETHODIMP_(ULONG) AddRef(void);
STDMETHODIMP_(ULONG) Release(void);
// IClassFactory
STDMETHODIMP CreateInstance (LPUNKNOWN aUnkOuter, REFIID aIid, void **aPpv);
STDMETHODIMP LockServer (BOOL aLock);
nsMapiFactory();
~nsMapiFactory();
private :
PRInt32 m_cRef;
};
#endif // MSG_MAPI_FACTORY_H

View File

@@ -0,0 +1,842 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
* Contributor(s): Srilatha Moturi (srilatha@netscape.com)
* Contributor(s): Rajiv Dayal (rdayal@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#define MAPI_STARTUP_ARG "/MAPIStartUp"
#define MAPI_STARTUP_ARG "/MAPIStartUp"
#include <mapidefs.h>
#include <mapi.h>
#include "nsCOMPtr.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "nsISupports.h"
#include "nsIPromptService.h"
#include "nsAppShellCIDs.h"
#include "nsIDOMWindowInternal.h"
#include "nsIAppShellService.h"
#include "nsINativeAppSupport.h"
#include "nsICmdLineService.h"
#include "nsIProfileInternal.h"
#include "nsIMsgAccountManager.h"
#include "nsIDOMWindowInternal.h"
#include "nsXPIDLString.h"
#include "nsReadableUtils.h"
#include "nsMsgBaseCID.h"
#include "nsIStringBundle.h"
#include "nsIPref.h"
#include "nsString.h"
#include "nsIMsgCompFields.h"
#include "nsIMsgComposeParams.h"
#include "nsIMsgCompose.h"
#include "nsMsgCompCID.h"
#include "nsIMsgSend.h"
#include "nsIProxyObjectManager.h"
#include "nsIMsgComposeService.h"
#include "nsProxiedService.h"
#include "nsSpecialSystemDirectory.h"
#include "nsMsgI18N.h"
#include "msgMapi.h"
#include "msgMapiHook.h"
#include "msgMapiSupport.h"
#include "msgMapiMain.h"
static NS_DEFINE_CID(kCmdLineServiceCID, NS_COMMANDLINE_SERVICE_CID);
#define MAPI_PROPERTIES_CHROME "chrome://messenger/locale/mapi.properties"
#define PREF_MAPI_WARN_PRIOR_TO_BLIND_SEND "mapi.blind-send.warn"
#define PREF_MAPI_BLIND_SEND_ENABLED "mapi.blind-send.enabled"
class nsMAPISendListener : public nsIMsgSendListener
{
public:
virtual ~nsMAPISendListener() { }
// nsISupports interface
NS_DECL_ISUPPORTS
/* void OnStartSending (in string aMsgID, in PRUint32 aMsgSize); */
NS_IMETHOD OnStartSending(const char *aMsgID, PRUint32 aMsgSize) { return NS_OK; }
/* void OnProgress (in string aMsgID, in PRUint32 aProgress, in PRUint32 aProgressMax); */
NS_IMETHOD OnProgress(const char *aMsgID, PRUint32 aProgress, PRUint32 aProgressMax) { return NS_OK;}
/* void OnStatus (in string aMsgID, in wstring aMsg); */
NS_IMETHOD OnStatus(const char *aMsgID, const PRUnichar *aMsg) { return NS_OK;}
/* void OnStopSending (in string aMsgID, in nsresult aStatus, in wstring aMsg, in nsIFileSpec returnFileSpec); */
NS_IMETHOD OnStopSending(const char *aMsgID, nsresult aStatus, const PRUnichar *aMsg,
nsIFileSpec *returnFileSpec) {
#ifdef RAJIV_DEBUG
printf("Sending Done - OnStopSending \n");
#endif
m_done = PR_TRUE;
return NS_OK ;
}
/* void OnGetDraftFolderURI (); */
NS_IMETHOD OnGetDraftFolderURI(const char *aFolderURI) {return NS_OK;}
static nsresult CreateMAPISendListener( nsIMsgSendListener **ppListener);
PRBool IsDone() { return m_done ; }
protected :
nsMAPISendListener() {
NS_INIT_REFCNT();
m_done = PR_FALSE;
}
PRBool m_done;
};
NS_IMPL_THREADSAFE_ISUPPORTS1(nsMAPISendListener, nsIMsgSendListener)
nsresult nsMAPISendListener::CreateMAPISendListener( nsIMsgSendListener **ppListener)
{
NS_ENSURE_ARG_POINTER(ppListener) ;
*ppListener = new nsMAPISendListener();
if (! *ppListener)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF(*ppListener);
return NS_OK;
}
PRBool nsMapiHook::isMapiService = PR_FALSE;
PRBool nsMapiHook::Initialize()
{
nsresult rv;
nsCOMPtr<nsINativeAppSupport> native;
nsCOMPtr<nsICmdLineService> cmdLineArgs(do_GetService(kCmdLineServiceCID, &rv));
if (NS_FAILED(rv)) return PR_FALSE;
nsCOMPtr<nsIAppShellService> appShell (do_GetService( "@mozilla.org/appshell/appShellService;1", &rv));
if (NS_FAILED(rv)) return PR_FALSE;
rv = appShell->GetNativeAppSupport( getter_AddRefs( native ));
if (NS_FAILED(rv)) return PR_FALSE;
rv = native->EnsureProfile(cmdLineArgs);
if (NS_FAILED(rv)) return PR_FALSE;
return PR_TRUE;
}
void nsMapiHook::CleanUp()
{
// This routine will be fully implemented in future
// to cleanup mapi related stuff inside mozilla code.
}
PRBool nsMapiHook::DisplayLoginDialog(PRBool aLogin, PRUnichar **aUsername, \
PRUnichar **aPassword)
{
nsresult rv;
PRBool btnResult = PR_FALSE;
nsCOMPtr<nsIAppShellService> appShell(do_GetService( "@mozilla.org/appshell/appShellService;1", &rv));
if (NS_FAILED(rv) || !appShell) return PR_FALSE;
nsCOMPtr<nsIPromptService> dlgService(do_GetService("@mozilla.org/embedcomp/prompt-service;1", &rv));
if (NS_SUCCEEDED(rv) && dlgService)
{
nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv));
if (NS_FAILED(rv) || !bundleService) return PR_FALSE;
nsCOMPtr<nsIStringBundle> bundle;
rv = bundleService->CreateBundle(MAPI_PROPERTIES_CHROME, getter_AddRefs(bundle));
if (NS_FAILED(rv) || !bundle) return PR_FALSE;
nsCOMPtr<nsIStringBundle> brandBundle;
rv = bundleService->CreateBundle(
"chrome://global/locale/brand.properties",
getter_AddRefs(brandBundle));
if (NS_FAILED(rv)) return PR_FALSE;
nsXPIDLString brandName;
rv = brandBundle->GetStringFromName(
NS_LITERAL_STRING("brandShortName").get(),
getter_Copies(brandName));
if (NS_FAILED(rv)) return PR_FALSE;
nsXPIDLString loginTitle;
const PRUnichar *brandStrings[] = { brandName.get() };
NS_NAMED_LITERAL_STRING(loginTitlePropertyTag, "loginTitle");
const PRUnichar *dTitlePropertyTag = loginTitlePropertyTag.get();
rv = bundle->FormatStringFromName(dTitlePropertyTag, brandStrings, 1,
getter_Copies(loginTitle));
if (NS_FAILED(rv)) return PR_FALSE;
if (aLogin)
{
nsXPIDLString loginText;
rv = bundle->GetStringFromName(NS_LITERAL_STRING("loginTextwithName").get(),
getter_Copies(loginText));
if (NS_FAILED(rv) || !loginText) return PR_FALSE;
rv = dlgService->PromptUsernameAndPassword(nsnull, loginTitle,
loginText, aUsername, aPassword,
nsnull, PR_FALSE, &btnResult);
}
else
{
//nsString loginString;
nsXPIDLString loginText;
const PRUnichar *userNameStrings[] = { *aUsername };
NS_NAMED_LITERAL_STRING(loginTextPropertyTag, "loginText");
const PRUnichar *dpropertyTag = loginTextPropertyTag.get();
rv = bundle->FormatStringFromName(dpropertyTag, userNameStrings, 1,
getter_Copies(loginText));
if (NS_FAILED(rv)) return PR_FALSE;
rv = dlgService->PromptPassword(nsnull, loginTitle, loginText,
aPassword, nsnull, PR_FALSE, &btnResult);
}
}
return btnResult;
}
PRBool nsMapiHook::VerifyUserName(const PRUnichar *aUsername, char **aIdKey)
{
nsresult rv;
if (aUsername == nsnull)
return PR_FALSE;
nsCOMPtr<nsIMsgAccountManager> accountManager(do_GetService(NS_MSGACCOUNTMANAGER_CONTRACTID, &rv));
if (NS_FAILED(rv)) return PR_FALSE;
nsCOMPtr<nsISupportsArray> identities;
rv = accountManager->GetAllIdentities(getter_AddRefs(identities));
if (NS_FAILED(rv)) return PR_FALSE;
PRUint32 numIndentities;
identities->Count(&numIndentities);
for (PRUint32 i = 0; i < numIndentities; i++)
{
// convert supports->Identity
nsCOMPtr<nsISupports> thisSupports;
rv = identities->GetElementAt(i, getter_AddRefs(thisSupports));
if (NS_FAILED(rv)) continue;
nsCOMPtr<nsIMsgIdentity> thisIdentity(do_QueryInterface(thisSupports, &rv));
if (NS_SUCCEEDED(rv) && thisIdentity)
{
nsXPIDLCString email;
rv = thisIdentity->GetEmail(getter_Copies(email));
if (NS_FAILED(rv)) continue;
// get the username from the email and compare with the username
nsCAutoString aEmail(email.get());
PRInt32 index = aEmail.FindChar('@');
if (index != -1)
aEmail.Truncate(index);
if (nsDependentString(aUsername) == NS_ConvertASCIItoUCS2(aEmail)) // == overloaded
return NS_SUCCEEDED(thisIdentity->GetKey(aIdKey));
}
}
return PR_FALSE;
}
PRBool
nsMapiHook::IsBlindSendAllowed()
{
PRBool enabled = PR_FALSE;
PRBool warn = PR_TRUE;
nsCOMPtr<nsIPref> prefs = do_GetService(NS_PREF_CONTRACTID);
if (prefs) {
prefs->GetBoolPref(PREF_MAPI_WARN_PRIOR_TO_BLIND_SEND,&warn);
prefs->GetBoolPref(PREF_MAPI_BLIND_SEND_ENABLED,&enabled);
}
if (!enabled)
return PR_FALSE;
if (!warn)
return PR_TRUE; // Everything is okay.
nsresult rv;
nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv));
if (NS_FAILED(rv) || !bundleService) return PR_FALSE;
nsCOMPtr<nsIStringBundle> bundle;
rv = bundleService->CreateBundle(MAPI_PROPERTIES_CHROME, getter_AddRefs(bundle));
if (NS_FAILED(rv) || !bundle) return PR_FALSE;
nsXPIDLString warningMsg;
rv = bundle->GetStringFromName(NS_LITERAL_STRING("mapiBlindSendWarning").get(),
getter_Copies(warningMsg));
if (NS_FAILED(rv)) return PR_FALSE;
nsXPIDLString dontShowAgainMessage;
rv = bundle->GetStringFromName(NS_LITERAL_STRING("mapiBlindSendDontShowAgain").get(),
getter_Copies(dontShowAgainMessage));
if (NS_FAILED(rv)) return PR_FALSE;
nsCOMPtr<nsIPromptService> dlgService(do_GetService("@mozilla.org/embedcomp/prompt-service;1", &rv));
if (NS_FAILED(rv) || !dlgService) return PR_FALSE;
PRBool continueToWarn = PR_TRUE;
PRBool okayToContinue = PR_FALSE;
dlgService->ConfirmCheck(nsnull, nsnull, warningMsg, dontShowAgainMessage, &continueToWarn, &okayToContinue);
if (!continueToWarn && okayToContinue && prefs)
prefs->SetBoolPref(PREF_MAPI_WARN_PRIOR_TO_BLIND_SEND,PR_FALSE);
return okayToContinue;
}
// this is used for Send without UI
nsresult nsMapiHook::BlindSendMail (unsigned long aSession, nsIMsgCompFields * aCompFields)
{
nsresult rv = NS_OK ;
if (!IsBlindSendAllowed())
return NS_ERROR_FAILURE;
/** create nsIMsgComposeParams obj and other fields to populate it **/
// get parent window
nsCOMPtr<nsIAppShellService> appService = do_GetService( "@mozilla.org/appshell/appShellService;1", &rv);
if (NS_FAILED(rv)|| (!appService) ) return rv ;
nsCOMPtr<nsIDOMWindowInternal> hiddenWindow;
rv = appService->GetHiddenDOMWindow(getter_AddRefs(hiddenWindow));
if ( NS_FAILED(rv) ) return rv ;
// smtp password and Logged in used IdKey from MapiConfig (session obj)
nsMAPIConfiguration * pMapiConfig = nsMAPIConfiguration::GetMAPIConfiguration() ;
if (!pMapiConfig) return NS_ERROR_FAILURE ; // get the singelton obj
PRUnichar * password = pMapiConfig->GetPassWord(aSession) ;
// password
nsCAutoString smtpPassword ;
smtpPassword.AssignWithConversion (password) ;
// Id key
char * MsgIdKey = pMapiConfig->GetIdKey(aSession) ;
// get the MsgIdentity for the above key using AccountManager
nsCOMPtr <nsIMsgAccountManager> accountManager = do_GetService (NS_MSGACCOUNTMANAGER_CONTRACTID) ;
if (NS_FAILED(rv) || (!accountManager) ) return rv ;
nsCOMPtr <nsIMsgIdentity> pMsgId ;
rv = accountManager->GetIdentity (MsgIdKey, getter_AddRefs(pMsgId)) ;
if (NS_FAILED(rv) ) return rv ;
// create a send listener to get back the send status
nsCOMPtr <nsIMsgSendListener> sendListener ;
rv = nsMAPISendListener::CreateMAPISendListener(getter_AddRefs(sendListener)) ;
if (NS_FAILED(rv) || (!sendListener) ) return rv;
// create the compose params object
nsCOMPtr<nsIMsgComposeParams> pMsgComposeParams (do_CreateInstance(NS_MSGCOMPOSEPARAMS_CONTRACTID, &rv));
if (NS_FAILED(rv) || (!pMsgComposeParams) ) return rv ;
// populate the compose params
pMsgComposeParams->SetType(nsIMsgCompType::New);
pMsgComposeParams->SetFormat(nsIMsgCompFormat::Default);
pMsgComposeParams->SetIdentity(pMsgId);
pMsgComposeParams->SetComposeFields(aCompFields);
pMsgComposeParams->SetSendListener(sendListener) ;
pMsgComposeParams->SetSmtpPassword(smtpPassword);
// create the nsIMsgCompose object to send the object
nsCOMPtr<nsIMsgCompose> pMsgCompose (do_CreateInstance(NS_MSGCOMPOSE_CONTRACTID, &rv));
if (NS_FAILED(rv) || (!pMsgCompose) ) return rv ;
/** initialize nsIMsgCompose, Send the message, wait for send completion response **/
rv = pMsgCompose->Initialize(hiddenWindow, pMsgComposeParams) ;
if (NS_FAILED(rv)) return rv ;
pMsgCompose->SendMsg(nsIMsgSend::nsMsgDeliverNow, pMsgId, nsnull) ;
if (NS_FAILED(rv)) return rv ;
// assign to interface pointer from nsCOMPtr to facilitate typecast below
nsIMsgSendListener * pSendListener = sendListener ;
// we need to wait here to make sure that we return only after send is completed
// so we will have a event loop here which will process the events till the Send IsDone.
nsCOMPtr<nsIEventQueueService> pEventQService = do_GetService(NS_EVENTQUEUESERVICE_CONTRACTID, &rv);
nsCOMPtr<nsIEventQueue> eventQueue;
pEventQService->GetThreadEventQueue(NS_CURRENT_THREAD,getter_AddRefs(eventQueue));
while ( !((nsMAPISendListener *) pSendListener)->IsDone() )
eventQueue->ProcessPendingEvents();
return rv ;
}
// this is used to populate comp fields with Unicode data
nsresult nsMapiHook::PopulateCompFields(lpnsMapiMessage aMessage,
nsIMsgCompFields * aCompFields)
{
nsresult rv = NS_OK ;
if (aMessage->lpOriginator)
{
PRUnichar * From = aMessage->lpOriginator->lpszAddress ;
aCompFields->SetFrom (From) ;
}
nsAutoString To ;
nsAutoString Cc ;
nsAutoString Bcc ;
nsAutoString Comma ;
Comma.AssignWithConversion(",");
if (aMessage->lpRecips)
{
for (int i=0 ; i < (int) aMessage->nRecipCount ; i++)
{
if (aMessage->lpRecips[i].lpszAddress)
{
switch (aMessage->lpRecips[i].ulRecipClass)
{
case MAPI_TO :
if (To.Length() > 0)
To += Comma ;
To += (PRUnichar *) aMessage->lpRecips[i].lpszAddress ;
break ;
case MAPI_CC :
if (Cc.Length() > 0)
Cc += Comma ;
Cc += (PRUnichar *) aMessage->lpRecips[i].lpszAddress ;
break ;
case MAPI_BCC :
if (Bcc.Length() > 0)
Bcc += Comma ;
Bcc += (PRUnichar *) aMessage->lpRecips[i].lpszAddress ;
break ;
}
}
}
}
// set To, Cc, Bcc
aCompFields->SetTo (To.get()) ;
aCompFields->SetCc (Cc.get()) ;
aCompFields->SetBcc (Bcc.get()) ;
// set subject
if (aMessage->lpszSubject)
{
PRUnichar * Subject = aMessage->lpszSubject ;
aCompFields->SetSubject(Subject) ;
}
// handle attachments as File URL
rv = HandleAttachments (aCompFields, aMessage->nFileCount, aMessage->lpFiles, PR_TRUE) ;
if (NS_FAILED(rv)) return rv ;
// set body
if (aMessage->lpszNoteText)
{
PRUnichar * Body = aMessage->lpszNoteText ;
rv = aCompFields->SetBody(Body) ;
}
#ifdef RAJIV_DEBUG
// testing what all was set in CompFields
printf ("To : %S \n", To.get()) ;
printf ("CC : %S \n", Cc.get() ) ;
printf ("BCC : %S \n", Bcc.get() ) ;
#endif
return rv ;
}
nsresult nsMapiHook::HandleAttachments (nsIMsgCompFields * aCompFields, PRInt32 aFileCount,
lpnsMapiFileDesc aFiles, BOOL aIsUnicode)
{
nsresult rv = NS_OK ;
nsCAutoString Attachments ;
nsCAutoString TempFiles ;
nsCOMPtr <nsILocalFile> pFile = do_CreateInstance (NS_LOCAL_FILE_CONTRACTID, &rv) ;
if (NS_FAILED(rv) || (!pFile) ) return rv ;
nsCOMPtr <nsILocalFile> pTempDir = do_CreateInstance (NS_LOCAL_FILE_CONTRACTID, &rv) ;
if (NS_FAILED(rv) || (!pTempDir) ) return rv ;
for (int i=0 ; i < aFileCount ; i++)
{
PRBool bTempFile = PR_FALSE ;
if (aFiles[i].lpszPathName)
{
if (aIsUnicode)
pFile->InitWithUnicodePath (aFiles[i].lpszPathName) ;
else
pFile->InitWithPath ((char *) aFiles[i].lpszPathName) ;
PRBool bExist ;
rv = pFile->Exists(&bExist) ;
if (NS_FAILED(rv) || (!bExist) ) return NS_ERROR_FILE_TARGET_DOES_NOT_EXIST ;
// we do this since MS Office apps create a temp file when sending
// the currently open document in that app
if (aFiles[i].lpszFileName)
{
// Win temp Path
nsAutoString tempPath ;
nsSpecialSystemDirectory tmpDir(nsSpecialSystemDirectory::OS_TemporaryDirectory);
((nsFileSpec*)&tmpDir)->GetNativePathString(tempPath);
tempPath.ToLowerCase() ;
// filename of the file attachment
nsXPIDLString pLeafName ;
pFile->GetUnicodeLeafName (getter_Copies(pLeafName)) ;
// dir path of the file attachment
nsXPIDLString pPath ;
pFile->GetUnicodePath (getter_Copies(pPath)) ;
nsAutoString Path ;
Path.Assign(pPath.get()) ;
nsAutoString LeafName ;
LeafName.Assign (pLeafName.get());
PRInt32 offset = Path.RFind (LeafName) ;
Path.SetLength(offset) ;
Path.ToLowerCase() ;
if (tempPath == Path)
{
// create another temp dir for mapi within Win temp dir
nsAutoString strTempDir ;
strTempDir += tempPath.get() ;
strTempDir.AppendWithConversion("moz_mapi") ;
pTempDir->InitWithUnicodePath (strTempDir.get()) ;
pTempDir->Exists (&bExist) ;
if (!bExist)
{
rv = pTempDir->Create(nsIFile::DIRECTORY_TYPE, 777) ;
if (NS_FAILED(rv)) return rv ;
}
// filename passed for the file attachment
if (aIsUnicode)
{
nsAutoString RealFileName ;
RealFileName.Assign (aFiles[i].lpszFileName) ;
// copy to our mapi temp dir with real name
rv = pFile->CopyToUnicode(pTempDir, RealFileName.get()) ;
if (NS_FAILED(rv)) return rv ;
pFile->InitWithUnicodePath(strTempDir.get()) ;
pFile->AppendUnicode (RealFileName.get()) ;
}
else
{
nsCAutoString asciiRealFileName ;
asciiRealFileName.Assign((char *) aFiles[i].lpszFileName) ;
nsCAutoString asciiLeafName ;
asciiLeafName.AssignWithConversion (pLeafName.get());
// copy to our mapi temp dir with real name
rv = pFile->CopyTo(pTempDir, asciiRealFileName.get()) ;
if (NS_FAILED(rv)) return rv ;
pFile->InitWithUnicodePath(strTempDir.get()) ;
pFile->Append (asciiRealFileName.get()) ;
}
// this one is a temp file
bTempFile = PR_TRUE ;
}
}
// get url
nsXPIDLCString pURL ;
pFile->GetURL (getter_Copies(pURL)) ;
if (pURL)
{
if (Attachments.Length() > 0)
Attachments.Append(",") ;
Attachments.Append(pURL) ;
if (bTempFile)
{
if (TempFiles.Length() > 0)
TempFiles.Append(",") ;
TempFiles.Append(pURL) ;
}
}
}
}
// set attachment
if (Attachments.Length() > 0)
rv = aCompFields->SetAttachments (Attachments.get());
// set temp file
if (TempFiles.Length() > 0)
rv = aCompFields->SetTemporaryFiles(TempFiles.get());
#ifdef RAJIV_DEBUG
printf ("Attachments : %s \n", Attachments.get()) ;
printf ("TempFiles : %s \n", TempFiles.get()) ;
#endif
return rv ;
}
// this is used to convert non Unicode data and then populate comp fields
nsresult nsMapiHook::PopulateCompFieldsWithConversion(lpnsMapiMessage aMessage,
nsIMsgCompFields * aCompFields)
{
nsresult rv = NS_OK ;
if (aMessage->lpOriginator)
{
nsAutoString From ;
From.AssignWithConversion((char *) aMessage->lpOriginator->lpszAddress);
aCompFields->SetFrom (From.get()) ;
}
nsAutoString To ;
nsAutoString Cc ;
nsAutoString Bcc ;
nsAutoString Comma ;
Comma.AssignWithConversion(",");
if (aMessage->lpRecips)
{
for (int i=0 ; i < (int) aMessage->nRecipCount ; i++)
{
if (aMessage->lpRecips[i].lpszAddress)
{
switch (aMessage->lpRecips[i].ulRecipClass)
{
case MAPI_TO :
if (To.Length() > 0)
To += Comma ;
To.AppendWithConversion ((char *) aMessage->lpRecips[i].lpszAddress);
break ;
case MAPI_CC :
if (Cc.Length() > 0)
Cc += Comma ;
Cc.AppendWithConversion ((char *) aMessage->lpRecips[i].lpszAddress);
break ;
case MAPI_BCC :
if (Bcc.Length() > 0)
Bcc += Comma ;
Bcc.AppendWithConversion ((char *) aMessage->lpRecips[i].lpszAddress) ;
break ;
}
}
}
}
// set To, Cc, Bcc
aCompFields->SetTo (To.get()) ;
aCompFields->SetCc (Cc.get()) ;
aCompFields->SetBcc (Bcc.get()) ;
nsAutoString platformCharSet;
// set subject
if (aMessage->lpszSubject)
{
nsAutoString Subject ;
if (platformCharSet.IsEmpty())
platformCharSet.Assign(nsMsgI18NFileSystemCharset());
rv = ConvertToUnicode(platformCharSet, (char *) aMessage->lpszSubject, Subject);
if (NS_FAILED(rv)) return rv ;
aCompFields->SetSubject(Subject.get()) ;
}
// handle attachments as File URL
rv = HandleAttachments (aCompFields, aMessage->nFileCount, aMessage->lpFiles, PR_FALSE) ;
if (NS_FAILED(rv)) return rv ;
// set body
if (aMessage->lpszNoteText)
{
nsAutoString Body ;
if (platformCharSet.IsEmpty())
platformCharSet.Assign(nsMsgI18NFileSystemCharset());
rv = ConvertToUnicode(platformCharSet, (char *) aMessage->lpszNoteText, Body);
if (NS_FAILED(rv)) return rv ;
rv = aCompFields->SetBody(Body.get()) ;
}
#ifdef RAJIV_DEBUG
// testing what all was set in CompFields
printf ("To : %S \n", To.get()) ;
printf ("CC : %S \n", Cc.get() ) ;
printf ("BCC : %S \n", Bcc.get() ) ;
#endif
return rv ;
}
// this is used to populate the docs as attachments in the Comp fields for Send Documents
nsresult nsMapiHook::PopulateCompFieldsForSendDocs(nsIMsgCompFields * aCompFields, ULONG aFlags,
PRUnichar * aDelimChar, PRUnichar * aFilePaths)
{
nsAutoString strDelimChars ;
nsString strFilePaths;
nsresult rv = NS_OK ;
if (aFlags & MAPI_UNICODE)
{
if (aDelimChar)
strDelimChars.Assign (aDelimChar) ;
if (aFilePaths)
strFilePaths.Assign (aFilePaths) ;
}
else
{
if (aDelimChar)
strDelimChars.AssignWithConversion ((char*) aDelimChar) ;
if (aFilePaths)
strFilePaths.AssignWithConversion ((char *) aFilePaths) ;
}
// check for comma in filename
if (strDelimChars.Find (",") == kNotFound) // if comma is not in the delimiter specified by user
{
if (strFilePaths.Find(",") != kNotFound) // if comma found in filenames return error
return NS_ERROR_FILE_INVALID_PATH ;
}
nsCString Attachments ;
// only 1 file is to be sent, no delim specified
if ((!strDelimChars.Length()) && (strFilePaths.Length()>0))
{
nsCOMPtr <nsILocalFile> pFile = do_CreateInstance (NS_LOCAL_FILE_CONTRACTID, &rv) ;
if (NS_FAILED(rv) || (!pFile) ) return rv ;
pFile->InitWithUnicodePath (strFilePaths.get()) ;
PRBool bExist ;
rv = pFile->Exists(&bExist) ;
if (NS_FAILED(rv) || (!bExist) ) return NS_ERROR_FILE_TARGET_DOES_NOT_EXIST ;
nsXPIDLCString pURL ;
pFile->GetURL (getter_Copies(pURL)) ;
if (pURL)
Attachments.Assign(pURL) ;
// set attachments for comp field and return
rv = aCompFields->SetAttachments (Attachments.get());
return rv ;
}
// multiple files to be sent, delim specified
nsCOMPtr <nsILocalFile> pFile = do_CreateInstance (NS_LOCAL_FILE_CONTRACTID, &rv) ;
if (NS_FAILED(rv) || (!pFile) ) return rv ;
PRInt32 offset = 0 ;
PRInt32 FilePathsLen = strFilePaths.Length() ;
if (FilePathsLen)
{
PRUnichar * newFilePaths = (PRUnichar *) strFilePaths.get() ;
while (offset != kNotFound)
{
nsString RemainingPaths ;
RemainingPaths.Assign(newFilePaths) ;
offset = RemainingPaths.Find (strDelimChars) ;
if (offset != kNotFound)
{
RemainingPaths.SetLength (offset) ;
if ((offset + strDelimChars.Length()) < FilePathsLen)
newFilePaths += offset + strDelimChars.Length() ;
}
pFile->InitWithUnicodePath (RemainingPaths.get()) ;
#ifdef RAJIV_DEBUG
printf ("File : %S \n", RemainingPaths.get()) ;
#endif
PRBool bExist ;
rv = pFile->Exists(&bExist) ;
if (NS_FAILED(rv) || (!bExist) ) return NS_ERROR_FILE_TARGET_DOES_NOT_EXIST ;
nsXPIDLCString pURL ;
pFile->GetURL (getter_Copies(pURL)) ;
if (pURL)
{
if (Attachments.Length() > 0)
Attachments.Append(",") ;
Attachments.Append(pURL) ;
}
}
rv = aCompFields->SetAttachments (Attachments.get());
}
return rv ;
}
// this used for Send with UI
nsresult nsMapiHook::ShowComposerWindow (unsigned long aSession, nsIMsgCompFields * aCompFields)
{
nsresult rv = NS_OK ;
// create a send listener to get back the send status
nsCOMPtr <nsIMsgSendListener> sendListener ;
rv = nsMAPISendListener::CreateMAPISendListener(getter_AddRefs(sendListener)) ;
if (NS_FAILED(rv) || (!sendListener) ) return rv ;
// create the compose params object
nsCOMPtr<nsIMsgComposeParams> pMsgComposeParams (do_CreateInstance(NS_MSGCOMPOSEPARAMS_CONTRACTID, &rv));
if (NS_FAILED(rv) || (!pMsgComposeParams) ) return rv ;
// populate the compose params
pMsgComposeParams->SetType(nsIMsgCompType::New);
pMsgComposeParams->SetFormat(nsIMsgCompFormat::Default);
pMsgComposeParams->SetComposeFields(aCompFields);
pMsgComposeParams->SetSendListener(sendListener) ;
/** get the nsIMsgComposeService object to open the compose window **/
nsCOMPtr <nsIMsgComposeService> compService = do_GetService (NS_MSGCOMPOSESERVICE_CONTRACTID) ;
if (NS_FAILED(rv)|| (!compService) ) return rv ;
rv = compService->OpenComposeWindowWithParams(nsnull, pMsgComposeParams) ;
if (NS_FAILED(rv)) return rv ;
return rv ;
}

View File

@@ -0,0 +1,66 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef MSG_MAPI_HOOK_H_
#define MSG_MAPI_HOOK_H_
#include "prtypes.h"
class nsMapiHook
{
public :
static PRBool Initialize();
static PRBool DisplayLoginDialog(PRBool aLogin, PRUnichar **aUsername,
PRUnichar **aPassword);
static PRBool VerifyUserName(const PRUnichar *aUsername, char **aIdKey);
static PRBool IsBlindSendAllowed () ;
static nsresult BlindSendMail (unsigned long aSession, nsIMsgCompFields * aCompFields) ;
static nsresult ShowComposerWindow (unsigned long aSession, nsIMsgCompFields * aCompFields) ;
static nsresult PopulateCompFields(lpnsMapiMessage aMessage, nsIMsgCompFields * aCompFields) ;
static nsresult PopulateCompFieldsWithConversion(lpnsMapiMessage aMessage,
nsIMsgCompFields * aCompFields) ;
static nsresult PopulateCompFieldsForSendDocs(nsIMsgCompFields * aCompFields,
ULONG aFlags, LPTSTR aDelimChar, LPTSTR aFilePaths) ;
static nsresult HandleAttachments (nsIMsgCompFields * aCompFields, PRInt32 aFileCount,
lpnsMapiFileDesc aFiles, BOOL aIsUnicode) ;
static void CleanUp();
static PRBool isMapiService;
};
#endif // MSG_MAPI_HOOK_H_

View File

@@ -0,0 +1,335 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
* Contributor(s): Rajiv Dayal (rdayal@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <mapidefs.h>
#include <mapi.h>
#include "msgMapi.h"
#include "msgMapiImp.h"
#include "msgMapiFactory.h"
#include "msgMapiMain.h"
#include "nsMsgCompFields.h"
#include "msgMapiHook.h"
#include "nsString.h"
#include "nsCOMPtr.h"
#include "nsISupports.h"
#include "nsMsgCompCID.h"
#include "nsMsgComposeStringBundle.h"
const CLSID CLSID_nsMapiImp = {0x29f458be, 0x8866, 0x11d5, {0xa3, 0xdd, 0x0, 0xb0, 0xd0, 0xf3, 0xba, 0xa7}};
nsMapiImp::nsMapiImp()
: m_cRef(1)
{
m_Lock = PR_NewLock();
}
nsMapiImp::~nsMapiImp()
{
if (m_Lock)
PR_DestroyLock(m_Lock);
}
STDMETHODIMP nsMapiImp::QueryInterface(const IID& aIid, void** aPpv)
{
if (aIid == IID_IUnknown)
{
*aPpv = static_cast<nsIMapi*>(this);
}
else if (aIid == IID_nsIMapi)
{
*aPpv = static_cast<nsIMapi*>(this);
}
else
{
*aPpv = nsnull;
return E_NOINTERFACE;
}
reinterpret_cast<IUnknown*>(*aPpv)->AddRef();
return S_OK;
}
STDMETHODIMP_(ULONG) nsMapiImp::AddRef()
{
return PR_AtomicIncrement(&m_cRef);
}
STDMETHODIMP_(ULONG) nsMapiImp::Release()
{
PRInt32 temp;
temp = PR_AtomicDecrement(&m_cRef);
if (m_cRef == 0)
{
delete this;
return 0;
}
return temp;
}
STDMETHODIMP nsMapiImp::IsValid()
{
return S_OK;
}
STDMETHODIMP nsMapiImp::IsValidSession(unsigned long aSession)
{
nsMAPIConfiguration *pConfig = nsMAPIConfiguration::GetMAPIConfiguration();
if (pConfig && pConfig->IsSessionValid(aSession))
return S_OK;
return E_FAIL;
}
STDMETHODIMP nsMapiImp::Initialize()
{
HRESULT hr = E_FAIL;
if (!m_Lock)
return E_FAIL;
PR_Lock(m_Lock);
// Initialize MAPI Configuration
nsMAPIConfiguration *pConfig = nsMAPIConfiguration::GetMAPIConfiguration();
if (pConfig != nsnull)
if (nsMapiHook::Initialize())
hr = S_OK;
PR_Unlock(m_Lock);
return hr;
}
STDMETHODIMP nsMapiImp::Login(unsigned long aUIArg, LOGIN_PW_TYPE aLogin, LOGIN_PW_TYPE aPassWord,
unsigned long aFlags, unsigned long *aSessionId)
{
HRESULT hr = E_FAIL;
PRBool bNewSession = PR_FALSE;
char *id_key = nsnull;
if (aFlags & MAPI_NEW_SESSION)
bNewSession = PR_TRUE;
// Check For Profile Name
if (aLogin != nsnull && aLogin[0] != '\0')
{
if (nsMapiHook::VerifyUserName(aLogin, &id_key) == PR_FALSE)
{
*aSessionId = MAPI_E_LOGIN_FAILURE;
return hr;
}
}
// finally register(create) the session.
PRUint32 nSession_Id;
PRInt16 nResult = 0;
nsMAPIConfiguration *pConfig = nsMAPIConfiguration::GetMAPIConfiguration();
if (pConfig != nsnull)
nResult = pConfig->RegisterSession(aUIArg, aLogin, aPassWord,
(aFlags & MAPI_FORCE_DOWNLOAD), bNewSession,
&nSession_Id, id_key);
switch (nResult)
{
case -1 :
{
*aSessionId = MAPI_E_TOO_MANY_SESSIONS;
return hr;
}
case 0 :
{
*aSessionId = MAPI_E_INSUFFICIENT_MEMORY;
return hr;
}
default :
{
*aSessionId = nSession_Id;
break;
}
}
return S_OK;
}
STDMETHODIMP nsMapiImp::SendMail( unsigned long aSession, lpnsMapiMessage aMessage,
short aRecipCount, lpnsMapiRecipDesc aRecips , short aFileCount, lpnsMapiFileDesc aFiles ,
unsigned long aFlags, unsigned long aReserved)
{
HRESULT hr = SUCCESS_SUCCESS ;
// Assign the pointers in the aMessage struct to the array of Recips and Files
// recieved here from MS COM. These are used in BlindSendMail and ShowCompWin fns
aMessage->lpRecips = aRecips ;
aMessage->lpFiles = aFiles ;
nsresult rv ;
/** create nsIMsgCompFields obj and populate it **/
nsCOMPtr<nsIMsgCompFields> pCompFields = do_CreateInstance(NS_MSGCOMPFIELDS_CONTRACTID, &rv) ;
if (NS_FAILED(rv) || (!pCompFields) ) return MAPI_E_INSUFFICIENT_MEMORY ;
if (aFlags & MAPI_UNICODE)
rv = nsMapiHook::PopulateCompFields(aMessage, pCompFields) ;
else
rv = nsMapiHook::PopulateCompFieldsWithConversion(aMessage, pCompFields) ;
if (NS_SUCCEEDED (rv))
{
// see flag to see if UI needs to be brought up
if (!(aFlags & MAPI_DIALOG))
{
rv = nsMapiHook::BlindSendMail(aSession, pCompFields);
}
else
{
rv = nsMapiHook::ShowComposerWindow(aSession, pCompFields);
}
}
// return success
if (NS_SUCCEEDED (rv)) return hr ;
// if failure return the related MAPI failure code
switch (rv)
{
case NS_MSG_NO_RECIPIENTS :
hr = MAPI_E_BAD_RECIPTYPE ;
break ;
case NS_ERROR_COULD_NOT_GET_USERS_MAIL_ADDRESS :
hr = MAPI_E_INVALID_RECIPS ;
break ;
case NS_ERROR_COULD_NOT_LOGIN_TO_SMTP_SERVER :
hr = MAPI_E_LOGIN_FAILURE ;
break ;
case NS_MSG_UNABLE_TO_OPEN_FILE :
case NS_MSG_UNABLE_TO_OPEN_TMP_FILE :
case NS_MSG_COULDNT_OPEN_FCC_FOLDER :
case NS_ERROR_FILE_INVALID_PATH :
hr = MAPI_E_ATTACHMENT_OPEN_FAILURE ;
break ;
case NS_ERROR_FILE_TARGET_DOES_NOT_EXIST :
hr = MAPI_E_ATTACHMENT_NOT_FOUND ;
break ;
case NS_MSG_CANCELLING :
hr = MAPI_E_USER_ABORT ;
break ;
case NS_MSG_ERROR_WRITING_FILE :
case NS_MSG_UNABLE_TO_SAVE_TEMPLATE :
case NS_MSG_UNABLE_TO_SAVE_DRAFT :
hr = MAPI_E_ATTACHMENT_WRITE_FAILURE ;
break ;
default :
hr = MAPI_E_FAILURE ;
break ;
}
return hr ;
}
STDMETHODIMP nsMapiImp::SendDocuments( unsigned long aSession, LPTSTR aDelimChar,
LPTSTR aFilePaths, LPTSTR aFileNames, ULONG aFlags)
{
HRESULT hr = SUCCESS_SUCCESS ;
nsresult rv = NS_OK ;
/** create nsIMsgCompFields obj and populate it **/
nsCOMPtr<nsIMsgCompFields> pCompFields = do_CreateInstance(NS_MSGCOMPFIELDS_CONTRACTID, &rv) ;
if (NS_FAILED(rv) || (!pCompFields) ) return MAPI_E_INSUFFICIENT_MEMORY ;
if (aFilePaths)
{
rv = nsMapiHook::PopulateCompFieldsForSendDocs(pCompFields, aFlags, aDelimChar, aFilePaths) ;
}
if (NS_SUCCEEDED (rv))
rv = nsMapiHook::ShowComposerWindow(aSession, pCompFields);
// return success
if (NS_SUCCEEDED (rv)) return hr ;
// if failure return the related MAPI failure code
switch (rv)
{
case NS_ERROR_COULD_NOT_LOGIN_TO_SMTP_SERVER :
hr = MAPI_E_LOGIN_FAILURE ;
break ;
case NS_MSG_UNABLE_TO_OPEN_FILE :
case NS_MSG_UNABLE_TO_OPEN_TMP_FILE :
case NS_MSG_COULDNT_OPEN_FCC_FOLDER :
case NS_ERROR_FILE_INVALID_PATH :
hr = MAPI_E_ATTACHMENT_OPEN_FAILURE ;
break ;
case NS_ERROR_FILE_TARGET_DOES_NOT_EXIST :
hr = MAPI_E_ATTACHMENT_NOT_FOUND ;
break ;
case NS_MSG_CANCELLING :
hr = MAPI_E_USER_ABORT ;
break ;
case NS_MSG_ERROR_WRITING_FILE :
case NS_MSG_UNABLE_TO_SAVE_TEMPLATE :
case NS_MSG_UNABLE_TO_SAVE_DRAFT :
hr = MAPI_E_ATTACHMENT_WRITE_FAILURE ;
break ;
default :
hr = MAPI_E_FAILURE ;
break ;
}
return hr ;
}
STDMETHODIMP nsMapiImp::Logoff (unsigned long aSession)
{
nsMAPIConfiguration *pConfig = nsMAPIConfiguration::GetMAPIConfiguration();
if (pConfig->UnRegisterSession((PRUint32)aSession))
return S_OK;
return E_FAIL;
}
STDMETHODIMP nsMapiImp::CleanUp()
{
nsMapiHook::CleanUp();
return S_OK;
}

View File

@@ -0,0 +1,87 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef MSG_MAPI_IMP_H
#define MSG_MAPI_IMP_H
#include <windows.h>
#include <mapi.h>
#include "msgMapi.h"
#include "nsXPIDLString.h"
#include "nspr.h"
class nsMapiImp : public nsIMapi
{
public :
// IUnknown
STDMETHODIMP QueryInterface(const IID& aIid, void** aPpv);
STDMETHODIMP_(ULONG) AddRef();
STDMETHODIMP_(ULONG) Release();
// Interface INsMapi
STDMETHODIMP Login(unsigned long aUIArg, LOGIN_PW_TYPE aLogin,
LOGIN_PW_TYPE aPassWord, unsigned long aFlags,
unsigned long *aSessionId);
STDMETHODIMP SendMail( unsigned long aSession, lpnsMapiMessage aMessage,
short aRecipCount, lpnsMapiRecipDesc aRecips ,
short aFileCount, lpnsMapiFileDesc aFiles ,
unsigned long aFlags, unsigned long aReserved) ;
STDMETHODIMP SendDocuments( unsigned long aSession, LPTSTR aDelimChar,
LPTSTR aFilePaths, LPTSTR aFileNames, ULONG aFlags);
STDMETHODIMP Initialize();
STDMETHODIMP IsValid();
STDMETHODIMP IsValidSession(unsigned long aSession);
STDMETHODIMP Logoff (unsigned long aSession);
STDMETHODIMP CleanUp();
nsMapiImp();
~nsMapiImp();
private :
PRLock *m_Lock;
PRInt32 m_cRef;
};
#endif // MSG_MAPI_IMP_H

View File

@@ -0,0 +1,340 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "msgMapiMain.h"
#include "nsIServiceManager.h"
#include "nsCOMPtr.h"
// move to xpcom bug 81956.
class nsPRUintKey : public nsHashKey {
protected:
PRUint32 mKey;
public:
nsPRUintKey(PRUint32 key) : mKey(key) {}
PRUint32 HashCode(void) const {
return mKey;
}
PRBool Equals(const nsHashKey *aKey) const {
return mKey == ((const nsPRUintKey *) aKey)->mKey;
}
nsHashKey *Clone() const {
return new nsPRUintKey(mKey);
}
PRUint32 GetValue() { return mKey; }
};
//
nsMAPIConfiguration *nsMAPIConfiguration::m_pSelfRef = nsnull;
PRUint32 nsMAPIConfiguration::session_generator = 0;
PRUint32 nsMAPIConfiguration::sessionCount = 0;
nsMAPIConfiguration *nsMAPIConfiguration::GetMAPIConfiguration()
{
if (m_pSelfRef == nsnull)
m_pSelfRef = new nsMAPIConfiguration();
return m_pSelfRef;
}
nsMAPIConfiguration::nsMAPIConfiguration()
: m_nMaxSessions(MAX_SESSIONS),
m_ProfileMap(nsnull),
m_SessionMap(nsnull)
{
m_Lock = PR_NewLock();
m_ProfileMap = new nsHashtable();
m_SessionMap = new nsHashtable();
NS_ASSERTION(m_SessionMap && m_ProfileMap, "hashtables not created");
}
static PRBool
FreeSessionMapEntries(nsHashKey *aKey, void *aData, void* aClosure)
{
nsMAPISession *pTemp = (nsMAPISession*) aData;
delete pTemp;
pTemp = nsnull;
return PR_TRUE;
}
static PRBool
FreeProfileMapEntries(nsHashKey *aKey, void *aData, void* aClosure)
{
return PR_TRUE;
}
nsMAPIConfiguration::~nsMAPIConfiguration()
{
if (m_Lock)
PR_DestroyLock(m_Lock);
if (m_SessionMap)
{
m_SessionMap->Reset(FreeSessionMapEntries);
delete m_SessionMap;
m_SessionMap = nsnull;
}
if (m_ProfileMap)
{
m_ProfileMap->Reset(FreeProfileMapEntries);
delete m_ProfileMap;
m_ProfileMap = nsnull;
}
}
void nsMAPIConfiguration::OpenConfiguration()
{
// No. of max. sessions is set to MAX_SESSIONS. In future
// if it is decided to have configuration (registry)
// parameter, this function can be used to set the
// max sessions;
return;
}
PRInt16 nsMAPIConfiguration::RegisterSession(PRUint32 aHwnd,
const PRUnichar *aUserName, const PRUnichar *aPassword,
PRBool aForceDownLoad, PRBool aNewSession,
PRUint32 *aSession, char *aIdKey)
{
PRInt16 nResult = 0;
PRUint32 n_SessionId = 0;
PR_Lock(m_Lock);
// Check whether max sessions is exceeded
if (sessionCount >= m_nMaxSessions)
{
PR_Unlock(m_Lock);
return -1;
}
if (aUserName != nsnull && aUserName[0] != '\0')
{
nsStringKey usernameKey(aUserName);
n_SessionId = (PRUint32) m_ProfileMap->Get(&usernameKey);
}
// try to share a session; if not create a session
if (n_SessionId > 0)
{
nsPRUintKey sessionKey(n_SessionId);
nsMAPISession *pTemp = (nsMAPISession *)m_SessionMap->Get(&sessionKey);
if (pTemp != nsnull)
{
pTemp->IncrementSession();
*aSession = n_SessionId;
nResult = 1;
}
}
else if (aNewSession || n_SessionId == 0) // checking for n_SessionId is a concession
{
// create a new session ; if new session is specified OR there is no session
nsMAPISession *pTemp = nsnull;
pTemp = new nsMAPISession(aHwnd, aUserName,
aPassword, aForceDownLoad, aIdKey);
if (pTemp != nsnull)
{
session_generator++;
// I don't think there will be (2 power 32) sessions alive
// in a cycle. This is an assumption
if (session_generator == 0)
session_generator++;
nsPRUintKey sessionKey(session_generator);
m_SessionMap->Put(&sessionKey, pTemp);
if (aUserName != nsnull && aUserName[0] != '\0')
{
nsStringKey usernameKey(aUserName);
m_ProfileMap->Put(&usernameKey, (void*)session_generator);
}
*aSession = session_generator;
sessionCount++;
nResult = 1;
}
}
PR_Unlock(m_Lock);
return nResult;
}
PRBool nsMAPIConfiguration::UnRegisterSession(PRUint32 aSessionID)
{
PRBool bResult = PR_FALSE;
PR_Lock(m_Lock);
if (aSessionID != 0)
{
nsPRUintKey sessionKey(aSessionID);
nsMAPISession *pTemp = (nsMAPISession *)m_SessionMap->Get(&sessionKey);
if (pTemp != nsnull)
{
if (pTemp->DecrementSession() == 0)
{
if (pTemp->m_pProfileName.get() != nsnull)
{
nsStringKey stringKey(pTemp->m_pProfileName.get());
m_ProfileMap->Remove(&stringKey);
}
m_SessionMap->Remove(&sessionKey);
sessionCount--;
bResult = PR_TRUE;
}
}
}
PR_Unlock(m_Lock);
return bResult;
}
PRBool nsMAPIConfiguration::IsSessionValid(PRUint32 aSessionID)
{
if (aSessionID == 0)
return PR_FALSE;
PRBool retValue = PR_FALSE;
nsPRUintKey sessionKey(aSessionID);
PR_Lock(m_Lock);
retValue = m_SessionMap->Exists(&sessionKey);
PR_Unlock(m_Lock);
return retValue;
}
PRUnichar *nsMAPIConfiguration::GetPassWord(PRUint32 aSessionID)
{
PRUnichar *pResult = nsnull;
PR_Lock(m_Lock);
if (aSessionID != 0)
{
nsPRUintKey sessionKey(aSessionID);
nsMAPISession *pTemp = (nsMAPISession *)m_SessionMap->Get(&sessionKey);
if (pTemp)
{
pResult = pTemp->GetPassWord();
}
}
PR_Unlock(m_Lock);
return pResult;
}
char *nsMAPIConfiguration::GetIdKey(PRUint32 aSessionID)
{
char *pResult = nsnull;
PR_Lock(m_Lock);
if (aSessionID != 0)
{
nsPRUintKey sessionKey(aSessionID);
nsMAPISession *pTemp = (nsMAPISession *)m_SessionMap->Get(&sessionKey);
if (pTemp)
{
pResult = pTemp->GetIdKey();
}
}
PR_Unlock(m_Lock);
return pResult;
}
nsMAPISession::nsMAPISession(PRUint32 aHwnd, const PRUnichar *aUserName,\
const PRUnichar *aPassword, \
PRBool aForceDownLoad, char *aKey)
: m_bIsForcedDownLoad(aForceDownLoad),
m_hAppHandle(aHwnd),
m_nShared(1),
m_pIdKey(aKey)
{
m_pProfileName.Assign(aUserName);
m_pPassword.Assign(aPassword);
}
nsMAPISession::~nsMAPISession()
{
if (m_pIdKey != nsnull)
{
delete [] m_pIdKey;
m_pIdKey = nsnull;
}
}
PRUint32 nsMAPISession::IncrementSession()
{
return ++m_nShared;
}
PRUint32 nsMAPISession::DecrementSession()
{
return --m_nShared;
}
PRUint32 nsMAPISession::GetSessionCount()
{
return m_nShared;
}
PRUnichar *nsMAPISession::GetPassWord()
{
return (PRUnichar *)m_pPassword.get();
}
char *nsMAPISession::GetIdKey()
{
return m_pIdKey;
}

View File

@@ -0,0 +1,104 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef MSG_MAPI_MAIN_H_
#define NSG_MAPI_MAIN_H_
#define MAX_NAME_LEN 256
#define MAX_PW_LEN 256
#define MAX_SESSIONS 50
#include "nsXPIDLString.h"
#include "nspr.h"
#include "nsString.h"
#include "nsHashtable.h"
class nsMAPIConfiguration
{
private :
static PRUint32 session_generator;
static PRUint32 sessionCount;
static nsMAPIConfiguration *m_pSelfRef;
PRLock *m_Lock;
PRUint32 m_nMaxSessions;
nsHashtable *m_ProfileMap;
nsHashtable *m_SessionMap;
nsMAPIConfiguration();
public :
static nsMAPIConfiguration *GetMAPIConfiguration();
void OpenConfiguration();
PRInt16 RegisterSession(PRUint32 aHwnd, const PRUnichar *aUserName, \
const PRUnichar *aPassword, PRBool aForceDownLoad, \
PRBool aNewSession, PRUint32 *aSession, char *aIdKey);
PRBool IsSessionValid(PRUint32 aSessionID);
PRBool UnRegisterSession(PRUint32 aSessionID);
PRUnichar *GetPassWord(PRUint32 aSessionID);
char *GetIdKey(PRUint32 aSessionID);
~nsMAPIConfiguration();
};
class nsMAPISession
{
friend class nsMAPIConfiguration;
private :
PRBool m_bIsForcedDownLoad;
PRBool m_bApp_or_Service;
PRUint32 m_hAppHandle;
PRUint32 m_nShared;
char *m_pIdKey;
nsString m_pProfileName;
nsString m_pPassword;
public :
nsMAPISession(PRUint32 aHwnd, const PRUnichar *aUserName, \
const PRUnichar *aPassword, \
PRBool aForceDownLoad, char *aKey);
PRUint32 IncrementSession();
PRUint32 DecrementSession();
PRUint32 GetSessionCount();
PRUnichar *nsMAPISession::GetPassWord();
char *nsMAPISession::GetIdKey();
~nsMAPISession();
};
#endif // MSG_MAPI_MAIN_H_

View File

@@ -0,0 +1,146 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "msgMapiSupport.h"
#include "nsISupports.h"
const CLSID CLSID_nsMapiImp = {0x29f458be, 0x8866, 0x11d5, \
{0xa3, 0xdd, 0x0, 0xb0, 0xd0, 0xf3, 0xba, 0xa7}};
PRBool WINAPI DllMain(HINSTANCE aInstance, DWORD aReason, LPVOID aReserved)
{
switch (aReason)
{
case DLL_PROCESS_ATTACH :
{
// Initialize MAPI Support
nsMapiSupport *pTemp = nsMapiSupport::GetNsMapiSupport();
break;
}
case DLL_PROCESS_DETACH :
{
nsMapiSupport *pTemp = nsMapiSupport::GetNsMapiSupport();
pTemp->UnInitMSCom();
delete pTemp;
pTemp = nsnull;
}
}
return PR_TRUE;
}
extern "C"
{
void __declspec(dllexport) Init()
{
nsMapiSupport *pTemp = nsMapiSupport::GetNsMapiSupport();
if (pTemp != nsnull)
pTemp->InitMSCom();
}
}
nsMapiSupport* nsMapiSupport::m_pSelfRef = nsnull;
nsMapiSupport *nsMapiSupport::GetNsMapiSupport()
{
if (m_pSelfRef == nsnull)
m_pSelfRef = new nsMapiSupport();
return m_pSelfRef;
}
nsMapiSupport::nsMapiSupport()
: m_dwRegister(0),
m_nsMapiFactory(nsnull)
{
}
nsMapiSupport::~nsMapiSupport()
{
}
PRBool nsMapiSupport::RegsiterComponents()
{
if (m_nsMapiFactory == nsnull) // No Registering if already done. Sanity Check!!
{
m_nsMapiFactory = new nsMapiFactory();
if (m_nsMapiFactory != nsnull)
{
HRESULT hr = ::CoRegisterClassObject(CLSID_nsMapiImp, \
m_nsMapiFactory, \
CLSCTX_LOCAL_SERVER, \
REGCLS_MULTIPLEUSE, \
&m_dwRegister);
if (FAILED(hr))
{
m_nsMapiFactory->Release() ;
m_nsMapiFactory = nsnull;
return PR_FALSE;
}
}
}
return PR_TRUE;
}
PRBool nsMapiSupport::UnRegisterComponents()
{
if (m_dwRegister != 0)
::CoRevokeClassObject(m_dwRegister);
if (m_nsMapiFactory != nsnull)
{
m_nsMapiFactory->Release();
m_nsMapiFactory = nsnull;
}
return PR_TRUE;
}
void nsMapiSupport::InitMSCom()
{
::CoInitialize(nsnull);
RegsiterComponents();
}
void nsMapiSupport::UnInitMSCom()
{
UnRegisterComponents();
::CoUninitialize();
}

View File

@@ -0,0 +1,64 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
# Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika (kkhandrika@netscape.com)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef MSG_MAPI_SUPPORT_H_
#define MSG_MAPI_SUPPORT_H_
#include "msgMapiFactory.h"
#include "prtypes.h"
class __declspec(dllexport) nsMapiSupport
{
private :
DWORD m_dwRegister;
static nsMapiSupport *m_pSelfRef;
nsMapiFactory *m_nsMapiFactory;
nsMapiSupport();
public :
static nsMapiSupport *GetNsMapiSupport();
~nsMapiSupport();
PRBool RegsiterComponents();
void UnInitMSCom();
void InitMSCom();
PRBool UnRegisterComponents();
};
#endif // MSG_MAPI_SUPPORT_H_

View File

@@ -0,0 +1,252 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Srilatha Moturi <srilatha@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIServiceManager.h"
#include "nsMapiRegistry.h"
#include "nsIGenericFactory.h"
#include "nsXPIDLString.h"
#include "nsIPromptService.h"
#include "nsIStringBundle.h"
#include "nsIProxyObjectManager.h"
#include "nsProxiedService.h"
#include "nsMapiRegistryUtils.h"
#include "nsString.h"
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
nsresult ShowMapiErrorDialog();
/** Implementation of the nsIMapiRegistry interface.
* Use standard implementation of nsISupports stuff.
*/
NS_IMPL_ISUPPORTS1(nsMapiRegistry, nsIMapiRegistry);
nsMapiRegistry::nsMapiRegistry() {
NS_INIT_ISUPPORTS();
m_ShowDialog = !verifyRestrictedAccess();
m_DefaultMailClient = IsDefaultMailClient();
}
nsMapiRegistry::~nsMapiRegistry() {
}
NS_IMETHODIMP
nsMapiRegistry::GetIsDefaultMailClient(PRBool * retval) {
// we need to get the value from registry everytime
// because the registry settings can be changed from
// other mail applications.
*retval = IsDefaultMailClient();
return NS_OK;
}
NS_IMETHODIMP
nsMapiRegistry::GetShowDialog(PRBool * retval) {
*retval = m_ShowDialog;
return NS_OK;
}
NS_IMETHODIMP
nsMapiRegistry::SetDefaultMailClient() {
nsresult rv = setDefaultMailClient();
if (NS_SUCCEEDED(rv))
m_DefaultMailClient = PR_TRUE;
else
rv = ShowMapiErrorDialog();
return NS_OK;
}
NS_IMETHODIMP
nsMapiRegistry::UnsetDefaultMailClient() {
nsresult rv = unsetDefaultMailClient();
if (NS_SUCCEEDED(rv))
m_DefaultMailClient = PR_FALSE;
else
ShowMapiErrorDialog();
return NS_OK;
}
/** This will bring up the dialog box only once per session and
* only if the current app is not default Mail Client.
* This also checks the registry if the registry key
* showMapiDialog is set
*/
NS_IMETHODIMP
nsMapiRegistry::ShowMailIntegrationDialog(nsIDOMWindow *aParentWindow) {
nsresult rv;
if (!m_ShowDialog || !getShowDialog()) return NS_OK;
nsCOMPtr<nsIPromptService> promptService(do_GetService(
"@mozilla.org/embedcomp/prompt-service;1", &rv));
if (NS_SUCCEEDED(rv) && promptService)
{
nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(
kStringBundleServiceCID, &rv));
if (NS_FAILED(rv) || !bundleService) return NS_ERROR_FAILURE;
nsCOMPtr<nsIStringBundle> bundle;
rv = bundleService->CreateBundle(
"chrome://messenger/locale/mapi.properties",
getter_AddRefs(bundle));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
nsCOMPtr<nsIStringBundle> brandBundle;
rv = bundleService->CreateBundle(
"chrome://global/locale/brand.properties",
getter_AddRefs(brandBundle));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
nsXPIDLString brandName;
rv = brandBundle->GetStringFromName(
NS_LITERAL_STRING("brandShortName").get(),
getter_Copies(brandName));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
nsXPIDLString dialogTitle;
const PRUnichar *brandStrings[] = { brandName.get() };
NS_NAMED_LITERAL_STRING(dialogTitlePropertyTag, "dialogTitle");
const PRUnichar *dTitlepropertyTag = dialogTitlePropertyTag.get();
rv = bundle->FormatStringFromName(dTitlepropertyTag,
brandStrings, 1,
getter_Copies(dialogTitle));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
nsXPIDLString dialogText;
NS_NAMED_LITERAL_STRING(dialogTextPropertyTag, "dialogText");
const PRUnichar *dpropertyTag = dialogTextPropertyTag.get();
rv = bundle->FormatStringFromName(dpropertyTag,
brandStrings, 1,
getter_Copies(dialogText));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
nsXPIDLString checkboxText;
rv = bundle->GetStringFromName(
NS_LITERAL_STRING("checkboxText").get(),
getter_Copies(checkboxText));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
PRBool checkValue = PR_FALSE;
PRInt32 buttonPressed = 0;
rv = promptService->ConfirmEx(aParentWindow,
dialogTitle,
dialogText.get(),
(nsIPromptService::BUTTON_TITLE_YES *
nsIPromptService::BUTTON_POS_0) +
(nsIPromptService::BUTTON_TITLE_NO *
nsIPromptService::BUTTON_POS_1),
nsnull,
nsnull,
nsnull,
checkboxText,
&checkValue,
&buttonPressed);
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
rv = SetRegistryKey(HKEY_LOCAL_MACHINE, "Software\\Mozilla\\Desktop",
"showMapiDialog", (checkValue) ? "0" : "1");
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
m_ShowDialog = PR_FALSE;
if (!buttonPressed)
rv = SetDefaultMailClient();
}
return rv;
}
nsresult ShowMapiErrorDialog() {
nsresult rv;
nsCOMPtr<nsIPromptService> promptService(do_GetService(
"@mozilla.org/embedcomp/prompt-service;1", &rv));
if (NS_SUCCEEDED(rv) && promptService)
{
nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(
kStringBundleServiceCID, &rv));
if (NS_FAILED(rv) || !bundleService) return NS_ERROR_FAILURE;
nsCOMPtr<nsIStringBundle> bundle;
rv = bundleService->CreateBundle(
"chrome://messenger/locale/mapi.properties",
getter_AddRefs(bundle));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
nsCOMPtr<nsIStringBundle> brandBundle;
rv = bundleService->CreateBundle(
"chrome://global/locale/brand.properties",
getter_AddRefs(brandBundle));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
nsXPIDLString brandName;
rv = brandBundle->GetStringFromName(
NS_LITERAL_STRING("brandShortName").get(),
getter_Copies(brandName));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
nsXPIDLString dialogTitle;
const PRUnichar *brandStrings[] = { brandName.get() };
NS_NAMED_LITERAL_STRING(dialogTitlePropertyTag, "errorMessageTitle");
const PRUnichar *dTitlepropertyTag = dialogTitlePropertyTag.get();
rv = bundle->FormatStringFromName(dTitlepropertyTag,
brandStrings, 1,
getter_Copies(dialogTitle));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
nsXPIDLString dialogText;
NS_NAMED_LITERAL_STRING(dialogTextPropertyTag, "errorMessage");
const PRUnichar *dpropertyTag = dialogTextPropertyTag.get();
rv = bundle->FormatStringFromName(dpropertyTag,
brandStrings, 1,
getter_Copies(dialogText));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
rv = promptService->Alert(nsnull, dialogTitle,
dialogText);
}
return rv;
}
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMapiRegistry);
// The list of components we register
static nsModuleComponentInfo components[] =
{
{
NS_IMAPIREGISTRY_CLASSNAME,
NS_IMAPIREGISTRY_CID,
NS_IMAPIWINHOOK_CONTRACTID,
nsMapiRegistryConstructor
}
};
NS_IMPL_NSGETMODULE(nsMapiRegistryModule, components);

View File

@@ -0,0 +1,73 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Srilatha Moturi <srilatha@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsmapiregistry_h____
#define nsmapiregistry_h____
#include "nsIMapiRegistry.h"
#ifndef MAX_BUF
#define MAX_BUF 4096
#endif
/* c5be14ba-4e0a-4eec-a1b8-04363761d63c */
#define NS_IMAPIREGISTRY_CID \
{ 0xc5be14ba, 0x4e0a, 0x4eec, {0xa1, 0xb8, 0x04, 0x36, 0x37, 0x61, 0xd6, 0x3c} }
#define NS_IMAPIREGISTRY_CONTRACTID "@mozilla.org/mapiregistry;1"
#define NS_IMAPIREGISTRY_CLASSNAME "Mozilla MAPI Registry"
class nsMapiRegistry : public nsIMapiRegistry {
public:
// ctor/dtor
nsMapiRegistry();
virtual ~nsMapiRegistry();
// Declare all interface methods we must implement.
NS_DECL_ISUPPORTS
NS_DECL_NSIMAPIREGISTRY
protected:
PRBool m_DefaultMailClient;
PRBool m_ShowDialog;
private:
// Special member to handle initialization.
PRBool mHaveBeenSet;
}; // nsMapiRegistry
#endif // nsmapiregistry_h____

View File

@@ -0,0 +1,652 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Srilatha Moturi <srilatha@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#undef UNICODE
#undef _UNICODE
#include "nsIServiceManager.h"
#include "nsMapiRegistryUtils.h"
#include "nsString.h"
#include "nsIStringBundle.h"
#include "nsXPIDLString.h"
#include "nsSpecialSystemDirectory.h"
#include "nsDirectoryService.h"
#include "nsDirectoryServiceDefs.h"
#include "nsAppDirectoryServiceDefs.h"
// returns TRUE if the Mapi32.dll is smart dll.
static PRBool isSmartDll();
// returns TRUE if the Mapi32.dll is a Mozilla dll.
static PRBool isMozDll();
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
const CLSID CLSID_nsMapiImp = {0x29f458be, 0x8866, 0x11d5, {0xa3, 0xdd, 0x0, 0xb0, 0xd0, 0xf3, 0xba, 0xa7}};
// Returns the (fully-qualified) name of this executable.
static nsCString thisApplication() {
static nsCAutoString result;
if (result.IsEmpty()) {
char buffer[MAX_PATH] = {0};
DWORD len = ::GetModuleFileName(NULL, buffer, sizeof buffer);
len = ::GetShortPathName(buffer, buffer, sizeof buffer);
result = buffer;
result.ToUpperCase();
}
return result;
}
/** This returns the brand name for this application
*/
static nsCString brandName() {
static nsCAutoString brand;
nsresult rv;
if (brand.IsEmpty()) {
nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(
kStringBundleServiceCID, &rv));
if (NS_SUCCEEDED(rv) && bundleService) {
nsCOMPtr<nsIStringBundle> brandBundle;
rv = bundleService->CreateBundle(
"chrome://global/locale/brand.properties",
getter_AddRefs(brandBundle));
if (NS_SUCCEEDED(rv)) {
nsXPIDLString brandName;
rv = brandBundle->GetStringFromName(
NS_LITERAL_STRING("brandShortName").get(),
getter_Copies(brandName));
if (NS_SUCCEEDED(rv)) {
brand.AssignWithConversion(brandName.get());
}
}
}
}
return brand;
}
// verifyRestrictedAccess - Returns PR_TRUE if this user only has restricted access
// to the registry keys we need to modify.
PRBool verifyRestrictedAccess() {
char subKey[] = "Software\\Mozilla - Test Key";
PRBool result = PR_FALSE;
DWORD dwDisp = 0;
HKEY key;
// Try to create/open a subkey under HKLM.
DWORD rc = ::RegCreateKeyEx(HKEY_LOCAL_MACHINE,
subKey,
0,
NULL,
REG_OPTION_NON_VOLATILE,
KEY_WRITE,
NULL,
&key,
&dwDisp);
if (rc == ERROR_SUCCESS) {
// Key was opened; first close it.
::RegCloseKey(key);
// Delete it if we just created it.
switch(dwDisp) {
case REG_CREATED_NEW_KEY:
::RegDeleteKey(HKEY_LOCAL_MACHINE, subKey);
break;
case REG_OPENED_EXISTING_KEY:
break;
}
} else {
// Can't create/open it; we don't have access.
result = PR_TRUE;
}
return result;
}
nsresult SetRegistryKey(HKEY baseKey, const char * keyName,
const char * valueName, char * value)
{
nsresult result = NS_ERROR_FAILURE;
HKEY key;
LONG rc = ::RegCreateKey(baseKey, keyName, &key);
if (rc == ERROR_SUCCESS) {
rc = ::RegSetValueEx(key, valueName, NULL, REG_SZ,
(LPBYTE)(const char*)value, strlen(value));
if (rc == ERROR_SUCCESS) {
result = NS_OK;
}
::RegCloseKey(key);
}
return result;
}
nsresult DeleteRegistryValue(HKEY baseKey, const char * keyName,
const char * valueName)
{
nsresult result = NS_ERROR_FAILURE;
HKEY key;
LONG rc = ::RegOpenKey(baseKey, keyName, &key);
if (rc == ERROR_SUCCESS) {
rc = ::RegDeleteValue(key, valueName);
if (rc == ERROR_SUCCESS)
result = NS_OK;
::RegCloseKey(key);
}
return result;
}
nsCString GetRegistryKey(HKEY baseKey, const char * keyName,
const char * valueName)
{
nsCAutoString value;
HKEY key;
LONG rc = ::RegOpenKey(baseKey, keyName, &key);
if (rc == ERROR_SUCCESS) {
char buffer[MAX_PATH] = {0};
DWORD len = sizeof buffer;
rc = ::RegQueryValueEx(key, valueName, NULL, NULL,
(LPBYTE)buffer, &len);
if (rc == ERROR_SUCCESS) {
if (len)
value = buffer;
}
::RegCloseKey(key);
}
return value;
}
#define EXE_EXTENSION ".exe"
/** Returns TRUE if the current application is default mail client.
*/
PRBool IsDefaultMailClient()
{
if (!isSmartDll() && !isMozDll())
return PR_FALSE;
nsCAutoString name(GetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Clients\\Mail", ""));
if (!name.IsEmpty()) {
nsCString keyName("Software\\Clients\\Mail\\");
keyName += name.get();
keyName += "\\protocols\\mailto\\shell\\open\\command";
nsCAutoString result(GetRegistryKey(HKEY_LOCAL_MACHINE,
keyName.get(), ""));
if (!result.IsEmpty()) {
nsCAutoString strExtension;
strExtension.Assign(EXE_EXTENSION);
result.ToUpperCase();
strExtension.ToUpperCase();
PRInt32 index = result.RFind(strExtension.get());
if (index != kNotFound) {
result.Truncate(index + strExtension.Length());
}
return (result == thisApplication());
}
}
return PR_FALSE;
}
/** Saves the current setting of the default Mail Client in
* HKEY_LOCAL_MACHINE\\Software\\Mozilla\\Desktop
*/
nsresult saveDefaultMailClient()
{
nsresult rv;
nsCAutoString name(GetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Clients\\Mail", ""));
if (!name.IsEmpty()) {
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail",
(char *)name.get());
if (NS_SUCCEEDED(rv)) {
nsCString keyName("Software\\Clients\\Mail\\");
keyName += name.get();
keyName += "\\protocols\\mailto\\shell\\open\\command";
nsCAutoString appPath(GetRegistryKey(HKEY_LOCAL_MACHINE,
keyName.get(), ""));
if (!appPath.IsEmpty()) {
nsCString stringName("HKEY_LOCAL_MACHINE\\");
stringName += keyName.get();
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
stringName.get(), (char *)appPath.get());
}
}
}
else
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail",
"");
return rv;
}
/** Saves the current user setting of the default Mail Client in
* HKEY_LOCAL_MACHINE\\Software\\Mozilla\\Desktop
*/
nsresult saveUserDefaultMailClient()
{
nsresult rv;
nsCAutoString name(GetRegistryKey(HKEY_CURRENT_USER,
"Software\\Clients\\Mail", ""));
if (!name.IsEmpty()) {
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"HKEY_CURRENT_USER\\Software\\Clients\\Mail",
(char *)name.get());
}
else {
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"HKEY_CURRENT_USER\\Software\\Clients\\Mail",
"");
}
return rv;
}
/**
* Check whether it is a smart dll or not. Smart dll is the one installed by
* IE5 or Outlook Express which forwards the MAPI calls to the dll based on the
* registry key setttings.
* Returns TRUE if is a smart dll.
*/
typedef HRESULT (FAR PASCAL GetOutlookVersionFunc)();
static PRBool isSmartDll()
{
char buffer[MAX_PATH] = {0};
if (GetSystemDirectory(buffer, sizeof(buffer)) == 0)
return PR_FALSE;
PL_strcatn(buffer, sizeof(buffer), "\\Mapi32.dll");
HINSTANCE hInst;
GetOutlookVersionFunc *doesExist = nsnull;
hInst = LoadLibrary(buffer);
if (hInst == nsnull)
return PR_FALSE;
doesExist = (GetOutlookVersionFunc *) GetProcAddress (hInst, "GetOutlookVersion");
FreeLibrary(hInst);
return (doesExist != nsnull);
}
typedef HRESULT (FAR PASCAL GetMapiDllVersion)();
/**
* Checks whether mapi32.dll is installed by this app.
* Returns TRUE if it is.
*/
static PRBool isMozDll()
{
char buffer[MAX_PATH] = {0};
if (GetSystemDirectory(buffer, sizeof(buffer)) == 0)
return PR_FALSE;
PL_strcatn(buffer, sizeof(buffer), "\\Mapi32.dll");
HINSTANCE hInst;
GetMapiDllVersion *doesExist = nsnull;
hInst = LoadLibrary(buffer);
if (hInst == nsnull)
return PR_FALSE;
doesExist = (GetMapiDllVersion *) GetProcAddress (hInst, "GetMapiDllVersion");
FreeLibrary(hInst);
return (doesExist != nsnull);
}
/** Renames Mapi32.dl in system directory to Mapi32_moz_bak.dll
* copies the mozMapi32.dll from bin directory to the system directory
*/
nsresult CopyMozMapiToWinSysDir()
{
nsresult rv;
char buffer[MAX_PATH] = {0};
if (GetSystemDirectory(buffer, sizeof(buffer)) == 0)
return NS_ERROR_FAILURE;
nsCAutoString filePath(buffer);
filePath.Append("\\Mapi32_moz_bak.dll");
nsCOMPtr<nsILocalFile> pCurrentMapiFile = do_CreateInstance (NS_LOCAL_FILE_CONTRACTID, &rv);
if (NS_FAILED(rv) || !pCurrentMapiFile) return rv;
pCurrentMapiFile->InitWithPath(filePath.get());
nsCOMPtr<nsIFile> pMozMapiFile;
nsCOMPtr<nsIProperties> directoryService =
do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv);
if (!directoryService) return NS_ERROR_FAILURE;
rv = directoryService->Get(NS_OS_CURRENT_PROCESS_DIR,
NS_GET_IID(nsIFile),
getter_AddRefs(pMozMapiFile));
if (NS_FAILED(rv)) return rv;
pMozMapiFile->Append("mozMapi32.dll");
PRBool bExist;
rv = pMozMapiFile->Exists(&bExist);
if (NS_FAILED(rv) || !bExist) return rv;
rv = pCurrentMapiFile->Exists(&bExist);
if (NS_SUCCEEDED(rv) && bExist)
{
rv = pCurrentMapiFile->Remove(PR_FALSE);
}
if (NS_FAILED(rv)) return rv;
filePath.Assign(buffer);
filePath.Append("\\Mapi32.dll");
pCurrentMapiFile->InitWithPath(filePath.get());
rv = pCurrentMapiFile->Exists(&bExist);
if (NS_SUCCEEDED(rv) && bExist)
{
rv = pCurrentMapiFile->MoveTo(nsnull, "Mapi32_moz_bak.dll");
if (NS_FAILED(rv)) return rv;
nsCAutoString fullFilePath(buffer);
fullFilePath.Append("\\Mapi32_moz_bak.dll");
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"Mapi_backup_dll",
(char *)fullFilePath.get());
if (NS_FAILED(rv)) {
RestoreBackedUpMapiDll();
return rv;
}
}
nsAutoString fileName;
fileName.AssignWithConversion("Mapi32.dll");
filePath.Assign(buffer);
pCurrentMapiFile->InitWithPath(filePath.get());
rv = pMozMapiFile->CopyToUnicode(pCurrentMapiFile, fileName.get());
if (NS_FAILED(rv))
RestoreBackedUpMapiDll();
return rv;
}
/** deletes the Mapi32.dll in system directory and renames Mapi32_moz_bak.dll
* to Mapi32.dll
*/
nsresult RestoreBackedUpMapiDll()
{
nsresult rv;
char buffer[MAX_PATH] = {0};
if (GetSystemDirectory(buffer, sizeof(buffer)) == 0)
return NS_ERROR_FAILURE;
nsCAutoString filePath(buffer);
nsCAutoString previousFileName(buffer);
filePath.Append("\\Mapi32.dll");
previousFileName.Append("\\Mapi32_moz_bak.dll");
nsCOMPtr <nsILocalFile> pCurrentMapiFile = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
if (NS_FAILED(rv) || !pCurrentMapiFile) return NS_ERROR_FAILURE;
pCurrentMapiFile->InitWithPath(filePath);
nsCOMPtr<nsILocalFile> pPreviousMapiFile = do_CreateInstance (NS_LOCAL_FILE_CONTRACTID, &rv);
if (NS_FAILED(rv) || !pPreviousMapiFile) return NS_ERROR_FAILURE;
pPreviousMapiFile->InitWithPath(previousFileName);
PRBool bExist;
rv = pCurrentMapiFile->Exists(&bExist);
if (NS_SUCCEEDED(rv) && bExist) {
rv = pCurrentMapiFile->Remove(PR_FALSE);
if (NS_FAILED(rv)) return rv;
}
rv = pPreviousMapiFile->Exists(&bExist);
if (NS_SUCCEEDED(rv) && bExist)
rv = pPreviousMapiFile->MoveTo(nsnull, "Mapi32.dll");
if (NS_SUCCEEDED(rv))
DeleteRegistryValue(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"Mapi_backup_dll");
return rv;
}
/** Sets Mozilla as default Mail Client
*/
nsresult setDefaultMailClient()
{
nsresult rv;
nsresult mailKeySet=NS_ERROR_FAILURE;
if (verifyRestrictedAccess()) return NS_ERROR_FAILURE;
if (!isSmartDll()) {
if (NS_FAILED(CopyMozMapiToWinSysDir())) return NS_ERROR_FAILURE;
}
rv = saveDefaultMailClient();
if (NS_FAILED(saveUserDefaultMailClient()) ||
NS_FAILED(rv)) return NS_ERROR_FAILURE;
nsCAutoString keyName("Software\\Clients\\Mail\\");
nsCAutoString appName(brandName());
if (!appName.IsEmpty()) {
keyName.Append(appName.get());
// hardcoding this for 0.9.4 branch
// need to change it before merging into the trunk
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
(char *)keyName.get(),
"", "Netscape 6.2 Mail");
}
else
rv = NS_ERROR_FAILURE;
if (NS_SUCCEEDED(rv)) {
nsCAutoString dllPath(thisApplication());
PRInt32 index = dllPath.RFind("\\");
if (index != kNotFound)
dllPath.Truncate(index + 1);
dllPath += "mozMapi32.dll";
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
(char *)keyName.get(), "DLLPath",
(char *)dllPath.get());
if (NS_SUCCEEDED(rv)) {
keyName.Append("\\protocols\\mailto");
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
(char *)keyName.get(),
"", "URL:MailTo Protocol");
if (NS_SUCCEEDED(rv)) {
nsCAutoString appPath(thisApplication());
appPath += " \"%1\"";
keyName.Append("\\shell\\open\\command");
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
(char *)keyName.get(),
"", (char *)appPath.get());
if (NS_SUCCEEDED(rv)) {
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Clients\\Mail",
"", (char *)appName.get());
}
if (NS_SUCCEEDED(rv)) {
nsCAutoString mailAppPath(thisApplication());
mailAppPath += " -mail";
nsCAutoString appKeyName ("Software\\Clients\\Mail\\");
appKeyName.Append(appName.get());
appKeyName.Append("\\shell\\open\\command");
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
(char *)appKeyName.get(),
"", (char *)mailAppPath.get());
}
if (NS_SUCCEEDED(rv)) {
nsCAutoString iconPath(thisApplication());
iconPath += ",0";
nsCAutoString iconKeyName ("Software\\Clients\\Mail\\");
iconKeyName.Append(appName.get());
iconKeyName.Append("\\DefaultIcon");
mailKeySet = SetRegistryKey(HKEY_LOCAL_MACHINE,
(char *)iconKeyName.get(),
"", (char *)iconPath.get());
}
}
}
}
if (NS_SUCCEEDED(mailKeySet)) {
nsresult desktopKeySet = SetRegistryKey(HKEY_CURRENT_USER,
"Software\\Clients\\Mail",
"", (char *)appName.get());
if (NS_SUCCEEDED(desktopKeySet)) {
desktopKeySet = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"defaultMailHasBeenSet", "1");
}
::SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0,
(LPARAM)"Software\\Clients\\Mail");
RegisterServer(CLSID_nsMapiImp, "Mozilla MAPI", "mozMapi", "mozMapi.1");
return desktopKeySet;
}
return mailKeySet;
}
/** Removes Mozilla as the default Mail client and restores the previous setting
*/
nsresult unsetDefaultMailClient() {
nsresult result = NS_OK;
nsresult mailKeySet = NS_ERROR_FAILURE;
if (verifyRestrictedAccess()) return NS_ERROR_FAILURE;
if (!isSmartDll()) {
if (NS_FAILED(RestoreBackedUpMapiDll())) return NS_ERROR_FAILURE;
}
nsCAutoString name(GetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail"));
nsCAutoString appName(brandName());
if (!name.IsEmpty() && !appName.IsEmpty() && name.Equals(appName)) {
nsCAutoString keyName("HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\");
keyName.Append(appName.get());
keyName.Append("\\protocols\\mailto\\shell\\open\\command");
nsCAutoString appPath(GetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
(char *)keyName.get()));
if (!appPath.IsEmpty()) {
keyName.Assign("Software\\Clients\\Mail\\");
keyName.Append(appName.get());
keyName.Append("\\protocols\\mailto\\shell\\open\\command");
result = SetRegistryKey(HKEY_LOCAL_MACHINE,
(char *) keyName.get(),
"", (char *)appPath.get());
if (NS_SUCCEEDED(result)) {
PRInt32 index = appPath.RFind("\\");
if (index != kNotFound)
appPath.Truncate(index + 1);
appPath += "mozMapi32.dll";
keyName.Assign("Software\\Clients\\Mail\\");
keyName.Append(appName.get());
result = SetRegistryKey(HKEY_LOCAL_MACHINE,
(char *)keyName.get(),
"DLLPath", (char *) appPath.get());
}
}
}
if (!name.IsEmpty()) {
if (NS_SUCCEEDED(result)) {
mailKeySet = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Clients\\Mail",
"", (char *)name.get());
}
}
else
mailKeySet = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Clients\\Mail",
"", "");
if (NS_SUCCEEDED(mailKeySet)) {
nsCAutoString userAppName(GetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"HKEY_CURRENT_USER\\Software\\Clients\\Mail"));
nsresult desktopKeySet = NS_OK;
if (!userAppName.IsEmpty()) {
desktopKeySet = SetRegistryKey(HKEY_CURRENT_USER,
"Software\\Clients\\Mail",
"", (char *)userAppName.get());
}
else {
DeleteRegistryValue(HKEY_CURRENT_USER, "Software\\Clients\\Mail", "");
}
if (NS_SUCCEEDED(desktopKeySet)) {
desktopKeySet = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"defaultMailHasBeenSet", "0");
}
::SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0,
(LPARAM)"Software\\Clients\\Mail");
UnregisterServer(CLSID_nsMapiImp, "mozMapi", "mozMapi.1");
return desktopKeySet;
}
return mailKeySet;
}
/** Returns FALSE if showMapiDialog is set to 0.
* Returns TRUE otherwise
* Also returns TRUE if the Mozilla has been set as the default mail client
* and some other application has changed that setting.
* This function gets called only if the current app is not the default mail
* client
*/
PRBool getShowDialog() {
PRBool rv = PR_FALSE;
nsCString showDialog(GetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"showMapiDialog"));
// if the user has not selected the checkbox, show dialog
if (showDialog.IsEmpty() || showDialog.Equals("1"))
rv = PR_TRUE;
if (!rv) {
// even if the user has selected the checkbox
// show it if some other application has changed the
// default setting.
nsCAutoString setMailDefault(GetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"defaultMailHasBeenSet"));
if (setMailDefault.Equals("1")) {
// need to reset the defaultMailHasBeenSet to "0"
// so that after the dialog is displayed once,
// we do not keep displaying this dialog after the user has
// selected the checkbox
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"defaultMailHasBeenSet", "0");
rv = PR_TRUE;
}
}
return rv;
}

View File

@@ -0,0 +1,90 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Srilatha Moturi <srilatha@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsmapiregistryutils_h____
#define nsmapiregistryutils_h____
#include <windows.h>
#include <string.h>
#include <winreg.h>
#include "Registry.h"
#include "nsString.h"
//Sets the registry key for basekey/keyname valuename.
nsresult SetRegistryKey(HKEY baseKey, const char * keyName,
const char * valueName, char * value);
// Deletes the registry key for base/keyname/valuename
nsresult DeleteRegistryValue(HKEY baseKey, const char * keyName,
const char * valueName);
// Gets the current regiistry setting for the key.
nsCString GetRegistryKey(HKEY baseKey, const char * keyName,
const char * valueName);
// Returns PR_TRUE if this user only has restricted access
// to the registry keys we need to modify.
PRBool verifyRestrictedAccess();
// Returns true if mozilla is the default mail client
// by checking the registry.
PRBool IsDefaultMailClient();
// Save the current setting for the default mail client.
nsresult saveDefaultMailClient();
// Saves the current user setting for the default mail client.
nsresult saveUserDefaultMailClient();
// Renames Mapi32.dl in system directory to Mapi32_moz_bak.dll
// copies the mozMapi32.dll from bin directory to the system directory
nsresult CopyMozMapiToWinSysDir();
// deletes the Mapi32.dll in system directory and renames Mapi32_moz_bak.dll
// to Mapi32.dll
nsresult RestoreBackedUpMapiDll();
// Sets mozilla as the default mail client
nsresult setDefaultMailClient();
// unsets mozilla and resets the default mail client setting to previous one
nsresult unsetDefaultMailClient();
// returns true if we need to show the mail integration dialog.
PRBool getShowDialog();
#endif

View File

@@ -0,0 +1,42 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Srilatha Moturi <srilatha@netscape.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH=..\..\..
DIRS=public src
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,48 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Srilatha Moturi <srilatha@netscape.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH=..\..\..\..
MODULE=nsMapiRegistry
XPIDL_MODULE=mapiregistry
XPIDLSRCS = \
.\nsIMapiRegistry.idl \
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,78 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Srilatha Moturi <srilatha@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsISupports.idl"
interface nsIDOMWindow;
/**
* This interface provides support for registering Mozilla as the default
* Mail Client. This interface can also be used to get/set the user preference
* for the default Mail Client.
*
*/
[scriptable, uuid(c5be14ba-4e0a-4eec-a1b8-04363761d63c)]
interface nsIMapiRegistry: nsISupports {
/** This is set to TRUE if Mozilla is the default Application
*/
readonly attribute boolean isDefaultMailClient;
/** This is set TRUE only once per session.
*/
readonly attribute boolean showDialog;
/** This will update the registry keys to set Mozilla as default Mail Client.
*/
void setDefaultMailClient();
/** This will reset the registry keys for the default Mail Client.
*/
void unsetDefaultMailClient();
/** This will bring the dialog asking the user if he/she wants to set
* Mozilla as default Mail Client.
* Call this only if Mozilla is not the default Mail client
*/
void showMailIntegrationDialog(in nsIDOMWindow parentWindow);
};
%{C++
#define NS_IMAPIWINHOOK_CONTRACTID "@mozilla.org/mapiregistry;1"
#define NS_IMAPIWINHOOK_CLASSNAME "Mozilla MAPI Registry"
%}

View File

@@ -0,0 +1,321 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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
*
* The Initial Developer of the Original Code is
* Netscape Communications Corp.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Krishna Mohan Khandrika <kkhandrika@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <objbase.h>
#include <assert.h>
#include "nsString.h"
#include "Registry.h"
#define MAPI_PROXY_DLL_NAME "MapiProxy.dll"
#define MAPI_STARTUP_ARG " /MAPIStartUp"
#define MAX_SIZE 2048
// Size of a CLSID as a string
const int CLSID_STRING_SIZE = 39;
// Proxy/Stub Dll Routines
typedef HRESULT (__stdcall ProxyServer)();
// Convert a CLSID to a char string.
BOOL CLSIDtochar(const CLSID& clsid, char* szCLSID,
int length)
{
LPOLESTR wszCLSID = NULL;
// Get CLSID
HRESULT hr = StringFromCLSID(clsid, &wszCLSID);
if (FAILED(hr))
return FALSE;
// Covert from wide characters to non-wide.
wcstombs(szCLSID, wszCLSID, length);
// Free memory.
CoTaskMemFree(wszCLSID);
return TRUE;
}
// Create a key and set its value.
BOOL setKeyAndValue(nsCAutoString keyName, const char* subKey,
const char* theValue)
{
HKEY hKey;
BOOL retValue = TRUE;
nsCAutoString theKey(keyName);
if (subKey != NULL)
{
theKey += "\\";
theKey += subKey;
}
// Create and open key and subkey.
long lResult = RegCreateKeyEx(HKEY_CLASSES_ROOT, theKey.get(),
0, NULL, REG_OPTION_NON_VOLATILE,
KEY_ALL_ACCESS, NULL, &hKey, NULL);
if (lResult != ERROR_SUCCESS)
return FALSE ;
// Set the Value.
if (theValue != NULL)
{
lResult = RegSetValueEx(hKey, NULL, 0, REG_SZ, (BYTE *)theValue,
strlen(theValue)+1);
if (lResult != ERROR_SUCCESS)
retValue = FALSE;
}
RegCloseKey(hKey);
return TRUE;
}
// Delete a key and all of its descendents.
LONG recursiveDeleteKey(HKEY hKeyParent, // Parent of key to delete
const char* lpszKeyChild) // Key to delete
{
// Open the child.
HKEY hKeyChild ;
LONG lRes = RegOpenKeyEx(hKeyParent, lpszKeyChild, 0,
KEY_ALL_ACCESS, &hKeyChild) ;
if (lRes != ERROR_SUCCESS)
{
return lRes ;
}
// Enumerate all of the decendents of this child.
FILETIME time ;
char szBuffer[MAX_SIZE] ;
DWORD dwSize = MAX_SIZE ;
while (RegEnumKeyEx(hKeyChild, 0, szBuffer, &dwSize, NULL,
NULL, NULL, &time) == S_OK)
{
// Delete the decendents of this child.
lRes = recursiveDeleteKey(hKeyChild, szBuffer) ;
if (lRes != ERROR_SUCCESS)
{
// Cleanup before exiting.
RegCloseKey(hKeyChild) ;
return lRes;
}
dwSize = MAX_SIZE;
}
// Close the child.
RegCloseKey(hKeyChild) ;
// Delete this child.
return RegDeleteKey(hKeyParent, lpszKeyChild) ;
}
void RegisterProxy()
{
HINSTANCE h = NULL;
ProxyServer *RegisterFunc = NULL;
char szModule[MAX_SIZE];
char *pTemp = NULL;
HMODULE hModule = GetModuleHandle(NULL);
DWORD dwResult = ::GetModuleFileName(hModule, szModule,
sizeof(szModule)/sizeof(char));
if (dwResult == 0)
return;
pTemp = strrchr(szModule, '\\');
if (pTemp == NULL)
return;
*pTemp = '\0';
nsCAutoString proxyPath(szModule);
proxyPath += "\\";
proxyPath += MAPI_PROXY_DLL_NAME;
h = LoadLibrary(proxyPath.get());
if (h == NULL)
return;
RegisterFunc = (ProxyServer *) GetProcAddress(h, "DllRegisterServer");
if (RegisterFunc)
RegisterFunc();
FreeLibrary(h);
}
void UnRegisterProxy()
{
HINSTANCE h = NULL;
ProxyServer *UnRegisterFunc = NULL;
char szModule[MAX_SIZE];
char *pTemp = NULL;
HMODULE hModule = GetModuleHandle(NULL);
DWORD dwResult = ::GetModuleFileName(hModule, szModule,
sizeof(szModule)/sizeof(char));
if (dwResult == 0)
return;
pTemp = strrchr(szModule, '\\');
if (pTemp == NULL)
return;
*pTemp = '\0';
nsCAutoString proxyPath(szModule);
proxyPath += "\\";
proxyPath += MAPI_PROXY_DLL_NAME;
h = LoadLibrary(proxyPath.get());
if (h == NULL)
return;
UnRegisterFunc = (ProxyServer *) GetProcAddress(h, "DllUnregisterServer");
if (UnRegisterFunc)
UnRegisterFunc();
FreeLibrary(h);
}
// Register the component in the registry.
HRESULT RegisterServer(const CLSID& clsid, // Class ID
const char* szFriendlyName, // Friendly Name
const char* szVerIndProgID, // Programmatic
const char* szProgID) // IDs
{
HMODULE hModule = GetModuleHandle(NULL);
char szModuleName[MAX_SIZE];
char szCLSID[CLSID_STRING_SIZE];
nsCAutoString independentProgId(szVerIndProgID);
nsCAutoString progId(szProgID);
DWORD dwResult = ::GetModuleFileName(hModule, szModuleName,
sizeof(szModuleName)/sizeof(char));
if (dwResult == 0)
return S_FALSE;
nsCAutoString moduleName(szModuleName);
nsCAutoString registryKey("CLSID\\");
moduleName += MAPI_STARTUP_ARG;
// Convert the CLSID into a char.
if (!CLSIDtochar(clsid, szCLSID, sizeof(szCLSID)))
return S_FALSE;
registryKey += szCLSID;
// Add the CLSID to the registry.
if (!setKeyAndValue(registryKey, NULL, szFriendlyName))
return S_FALSE;
if (!setKeyAndValue(registryKey, "LocalServer32", moduleName.get()))
return S_FALSE;
// Add the ProgID subkey under the CLSID key.
if (!setKeyAndValue(registryKey, "ProgID", szProgID))
return S_FALSE;
// Add the version-independent ProgID subkey under CLSID key.
if (!setKeyAndValue(registryKey, "VersionIndependentProgID", szVerIndProgID))
return S_FALSE;
// Add the version-independent ProgID subkey under HKEY_CLASSES_ROOT.
if (!setKeyAndValue(independentProgId, NULL, szFriendlyName))
return S_FALSE;
if (!setKeyAndValue(independentProgId, "CLSID", szCLSID))
return S_FALSE;
if (!setKeyAndValue(independentProgId, "CurVer", szProgID))
return S_FALSE;
// Add the versioned ProgID subkey under HKEY_CLASSES_ROOT.
if (!setKeyAndValue(progId, NULL, szFriendlyName))
return S_FALSE;
if (!setKeyAndValue(progId, "CLSID", szCLSID))
return S_FALSE;
RegisterProxy();
return S_OK;
}
LONG UnregisterServer(const CLSID& clsid, // Class ID
const char* szVerIndProgID, // Programmatic
const char* szProgID) // IDs
{
LONG lResult = S_OK;
// Convert the CLSID into a char.
char szCLSID[CLSID_STRING_SIZE];
if (!CLSIDtochar(clsid, szCLSID, sizeof(szCLSID)))
return S_FALSE;
UnRegisterProxy();
nsCAutoString registryKey("CLSID\\");
registryKey += szCLSID;
lResult = recursiveDeleteKey(HKEY_CLASSES_ROOT, registryKey.get());
if (lResult == ERROR_SUCCESS || lResult == ERROR_FILE_NOT_FOUND)
return lResult;
registryKey += "\\LocalServer32";
// Delete only the path for this server.
lResult = recursiveDeleteKey(HKEY_CLASSES_ROOT, registryKey.get());
if (lResult != ERROR_SUCCESS && lResult != ERROR_FILE_NOT_FOUND)
return lResult;
// Delete the version-independent ProgID Key.
lResult = recursiveDeleteKey(HKEY_CLASSES_ROOT, szVerIndProgID);
if (lResult != ERROR_SUCCESS && lResult != ERROR_FILE_NOT_FOUND)
return lResult;
lResult = recursiveDeleteKey(HKEY_CLASSES_ROOT, szProgID);
return lResult;
}

View File

@@ -0,0 +1,57 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Krishna Mohan Khandrika <kkhandrika@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef _REGISTRY_H_
#define _REGISTRY_H_
#include <objbase.h>
#include <assert.h>
// This function will register a component in the Registry.
HRESULT RegisterServer(const CLSID& clsid,
const char* szFriendlyName,
const char* szVerIndProgID,
const char* szProgID) ;
// This function will unregister a component.
HRESULT UnregisterServer(const CLSID& clsid,
const char* szVerIndProgID,
const char* szProgID) ;
#endif

View File

@@ -0,0 +1,72 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Srilatha Moturi <srilatha@netscape.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH=..\..\..\..
MODULE=nsMapiRegistry
MAKE_OBJ_TYPE = DLL
LIBRARY_NAME=$(MODULE)
MODULE_NAME=nsMapiRegistry
CPPSRCS= \
nsMapiRegistry.cpp \
Registry.cpp \
nsMapiRegistryUtils.cpp \
$(NULL)
CPP_OBJS= \
.\$(OBJDIR)\nsMapiRegistry.obj \
.\$(OBJDIR)\Registry.obj \
.\$(OBJDIR)\nsMapiRegistryUtils.obj \
$(NULL)
LLIBS= \
$(DIST)\lib\xpcom.lib \
$(LIBNSPR) \
$(NULL)
WIN_LIBS= \
ole32.lib \
$(NULL)
EXPORTS= \
nsMapiRegistry.h \
Registry.h \
nsMapiRegistryUtils.h \
$(NULL)
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,252 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Srilatha Moturi <srilatha@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIServiceManager.h"
#include "nsMapiRegistry.h"
#include "nsIGenericFactory.h"
#include "nsXPIDLString.h"
#include "nsIPromptService.h"
#include "nsIStringBundle.h"
#include "nsIProxyObjectManager.h"
#include "nsProxiedService.h"
#include "nsMapiRegistryUtils.h"
#include "nsString.h"
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
nsresult ShowMapiErrorDialog();
/** Implementation of the nsIMapiRegistry interface.
* Use standard implementation of nsISupports stuff.
*/
NS_IMPL_ISUPPORTS1(nsMapiRegistry, nsIMapiRegistry);
nsMapiRegistry::nsMapiRegistry() {
NS_INIT_ISUPPORTS();
m_ShowDialog = !verifyRestrictedAccess();
m_DefaultMailClient = IsDefaultMailClient();
}
nsMapiRegistry::~nsMapiRegistry() {
}
NS_IMETHODIMP
nsMapiRegistry::GetIsDefaultMailClient(PRBool * retval) {
// we need to get the value from registry everytime
// because the registry settings can be changed from
// other mail applications.
*retval = IsDefaultMailClient();
return NS_OK;
}
NS_IMETHODIMP
nsMapiRegistry::GetShowDialog(PRBool * retval) {
*retval = m_ShowDialog;
return NS_OK;
}
NS_IMETHODIMP
nsMapiRegistry::SetDefaultMailClient() {
nsresult rv = setDefaultMailClient();
if (NS_SUCCEEDED(rv))
m_DefaultMailClient = PR_TRUE;
else
rv = ShowMapiErrorDialog();
return NS_OK;
}
NS_IMETHODIMP
nsMapiRegistry::UnsetDefaultMailClient() {
nsresult rv = unsetDefaultMailClient();
if (NS_SUCCEEDED(rv))
m_DefaultMailClient = PR_FALSE;
else
ShowMapiErrorDialog();
return NS_OK;
}
/** This will bring up the dialog box only once per session and
* only if the current app is not default Mail Client.
* This also checks the registry if the registry key
* showMapiDialog is set
*/
NS_IMETHODIMP
nsMapiRegistry::ShowMailIntegrationDialog(nsIDOMWindow *aParentWindow) {
nsresult rv;
if (!m_ShowDialog || !getShowDialog()) return NS_OK;
nsCOMPtr<nsIPromptService> promptService(do_GetService(
"@mozilla.org/embedcomp/prompt-service;1", &rv));
if (NS_SUCCEEDED(rv) && promptService)
{
nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(
kStringBundleServiceCID, &rv));
if (NS_FAILED(rv) || !bundleService) return NS_ERROR_FAILURE;
nsCOMPtr<nsIStringBundle> bundle;
rv = bundleService->CreateBundle(
"chrome://messenger/locale/mapi.properties",
getter_AddRefs(bundle));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
nsCOMPtr<nsIStringBundle> brandBundle;
rv = bundleService->CreateBundle(
"chrome://global/locale/brand.properties",
getter_AddRefs(brandBundle));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
nsXPIDLString brandName;
rv = brandBundle->GetStringFromName(
NS_LITERAL_STRING("brandShortName").get(),
getter_Copies(brandName));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
nsXPIDLString dialogTitle;
const PRUnichar *brandStrings[] = { brandName.get() };
NS_NAMED_LITERAL_STRING(dialogTitlePropertyTag, "dialogTitle");
const PRUnichar *dTitlepropertyTag = dialogTitlePropertyTag.get();
rv = bundle->FormatStringFromName(dTitlepropertyTag,
brandStrings, 1,
getter_Copies(dialogTitle));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
nsXPIDLString dialogText;
NS_NAMED_LITERAL_STRING(dialogTextPropertyTag, "dialogText");
const PRUnichar *dpropertyTag = dialogTextPropertyTag.get();
rv = bundle->FormatStringFromName(dpropertyTag,
brandStrings, 1,
getter_Copies(dialogText));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
nsXPIDLString checkboxText;
rv = bundle->GetStringFromName(
NS_LITERAL_STRING("checkboxText").get(),
getter_Copies(checkboxText));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
PRBool checkValue = PR_FALSE;
PRInt32 buttonPressed = 0;
rv = promptService->ConfirmEx(aParentWindow,
dialogTitle,
dialogText.get(),
(nsIPromptService::BUTTON_TITLE_YES *
nsIPromptService::BUTTON_POS_0) +
(nsIPromptService::BUTTON_TITLE_NO *
nsIPromptService::BUTTON_POS_1),
nsnull,
nsnull,
nsnull,
checkboxText,
&checkValue,
&buttonPressed);
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
rv = SetRegistryKey(HKEY_LOCAL_MACHINE, "Software\\Mozilla\\Desktop",
"showMapiDialog", (checkValue) ? "0" : "1");
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
m_ShowDialog = PR_FALSE;
if (!buttonPressed)
rv = SetDefaultMailClient();
}
return rv;
}
nsresult ShowMapiErrorDialog() {
nsresult rv;
nsCOMPtr<nsIPromptService> promptService(do_GetService(
"@mozilla.org/embedcomp/prompt-service;1", &rv));
if (NS_SUCCEEDED(rv) && promptService)
{
nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(
kStringBundleServiceCID, &rv));
if (NS_FAILED(rv) || !bundleService) return NS_ERROR_FAILURE;
nsCOMPtr<nsIStringBundle> bundle;
rv = bundleService->CreateBundle(
"chrome://messenger/locale/mapi.properties",
getter_AddRefs(bundle));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
nsCOMPtr<nsIStringBundle> brandBundle;
rv = bundleService->CreateBundle(
"chrome://global/locale/brand.properties",
getter_AddRefs(brandBundle));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
nsXPIDLString brandName;
rv = brandBundle->GetStringFromName(
NS_LITERAL_STRING("brandShortName").get(),
getter_Copies(brandName));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
nsXPIDLString dialogTitle;
const PRUnichar *brandStrings[] = { brandName.get() };
NS_NAMED_LITERAL_STRING(dialogTitlePropertyTag, "errorMessageTitle");
const PRUnichar *dTitlepropertyTag = dialogTitlePropertyTag.get();
rv = bundle->FormatStringFromName(dTitlepropertyTag,
brandStrings, 1,
getter_Copies(dialogTitle));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
nsXPIDLString dialogText;
NS_NAMED_LITERAL_STRING(dialogTextPropertyTag, "errorMessage");
const PRUnichar *dpropertyTag = dialogTextPropertyTag.get();
rv = bundle->FormatStringFromName(dpropertyTag,
brandStrings, 1,
getter_Copies(dialogText));
if (NS_FAILED(rv)) return NS_ERROR_FAILURE;
rv = promptService->Alert(nsnull, dialogTitle,
dialogText);
}
return rv;
}
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMapiRegistry);
// The list of components we register
static nsModuleComponentInfo components[] =
{
{
NS_IMAPIREGISTRY_CLASSNAME,
NS_IMAPIREGISTRY_CID,
NS_IMAPIWINHOOK_CONTRACTID,
nsMapiRegistryConstructor
}
};
NS_IMPL_NSGETMODULE(nsMapiRegistryModule, components);

View File

@@ -0,0 +1,73 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Srilatha Moturi <srilatha@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsmapiregistry_h____
#define nsmapiregistry_h____
#include "nsIMapiRegistry.h"
#ifndef MAX_BUF
#define MAX_BUF 4096
#endif
/* c5be14ba-4e0a-4eec-a1b8-04363761d63c */
#define NS_IMAPIREGISTRY_CID \
{ 0xc5be14ba, 0x4e0a, 0x4eec, {0xa1, 0xb8, 0x04, 0x36, 0x37, 0x61, 0xd6, 0x3c} }
#define NS_IMAPIREGISTRY_CONTRACTID "@mozilla.org/mapiregistry;1"
#define NS_IMAPIREGISTRY_CLASSNAME "Mozilla MAPI Registry"
class nsMapiRegistry : public nsIMapiRegistry {
public:
// ctor/dtor
nsMapiRegistry();
virtual ~nsMapiRegistry();
// Declare all interface methods we must implement.
NS_DECL_ISUPPORTS
NS_DECL_NSIMAPIREGISTRY
protected:
PRBool m_DefaultMailClient;
PRBool m_ShowDialog;
private:
// Special member to handle initialization.
PRBool mHaveBeenSet;
}; // nsMapiRegistry
#endif // nsmapiregistry_h____

View File

@@ -0,0 +1,652 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Srilatha Moturi <srilatha@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#undef UNICODE
#undef _UNICODE
#include "nsIServiceManager.h"
#include "nsMapiRegistryUtils.h"
#include "nsString.h"
#include "nsIStringBundle.h"
#include "nsXPIDLString.h"
#include "nsSpecialSystemDirectory.h"
#include "nsDirectoryService.h"
#include "nsDirectoryServiceDefs.h"
#include "nsAppDirectoryServiceDefs.h"
// returns TRUE if the Mapi32.dll is smart dll.
static PRBool isSmartDll();
// returns TRUE if the Mapi32.dll is a Mozilla dll.
static PRBool isMozDll();
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
const CLSID CLSID_nsMapiImp = {0x29f458be, 0x8866, 0x11d5, {0xa3, 0xdd, 0x0, 0xb0, 0xd0, 0xf3, 0xba, 0xa7}};
// Returns the (fully-qualified) name of this executable.
static nsCString thisApplication() {
static nsCAutoString result;
if (result.IsEmpty()) {
char buffer[MAX_PATH] = {0};
DWORD len = ::GetModuleFileName(NULL, buffer, sizeof buffer);
len = ::GetShortPathName(buffer, buffer, sizeof buffer);
result = buffer;
result.ToUpperCase();
}
return result;
}
/** This returns the brand name for this application
*/
static nsCString brandName() {
static nsCAutoString brand;
nsresult rv;
if (brand.IsEmpty()) {
nsCOMPtr<nsIStringBundleService> bundleService(do_GetService(
kStringBundleServiceCID, &rv));
if (NS_SUCCEEDED(rv) && bundleService) {
nsCOMPtr<nsIStringBundle> brandBundle;
rv = bundleService->CreateBundle(
"chrome://global/locale/brand.properties",
getter_AddRefs(brandBundle));
if (NS_SUCCEEDED(rv)) {
nsXPIDLString brandName;
rv = brandBundle->GetStringFromName(
NS_LITERAL_STRING("brandShortName").get(),
getter_Copies(brandName));
if (NS_SUCCEEDED(rv)) {
brand.AssignWithConversion(brandName.get());
}
}
}
}
return brand;
}
// verifyRestrictedAccess - Returns PR_TRUE if this user only has restricted access
// to the registry keys we need to modify.
PRBool verifyRestrictedAccess() {
char subKey[] = "Software\\Mozilla - Test Key";
PRBool result = PR_FALSE;
DWORD dwDisp = 0;
HKEY key;
// Try to create/open a subkey under HKLM.
DWORD rc = ::RegCreateKeyEx(HKEY_LOCAL_MACHINE,
subKey,
0,
NULL,
REG_OPTION_NON_VOLATILE,
KEY_WRITE,
NULL,
&key,
&dwDisp);
if (rc == ERROR_SUCCESS) {
// Key was opened; first close it.
::RegCloseKey(key);
// Delete it if we just created it.
switch(dwDisp) {
case REG_CREATED_NEW_KEY:
::RegDeleteKey(HKEY_LOCAL_MACHINE, subKey);
break;
case REG_OPENED_EXISTING_KEY:
break;
}
} else {
// Can't create/open it; we don't have access.
result = PR_TRUE;
}
return result;
}
nsresult SetRegistryKey(HKEY baseKey, const char * keyName,
const char * valueName, char * value)
{
nsresult result = NS_ERROR_FAILURE;
HKEY key;
LONG rc = ::RegCreateKey(baseKey, keyName, &key);
if (rc == ERROR_SUCCESS) {
rc = ::RegSetValueEx(key, valueName, NULL, REG_SZ,
(LPBYTE)(const char*)value, strlen(value));
if (rc == ERROR_SUCCESS) {
result = NS_OK;
}
::RegCloseKey(key);
}
return result;
}
nsresult DeleteRegistryValue(HKEY baseKey, const char * keyName,
const char * valueName)
{
nsresult result = NS_ERROR_FAILURE;
HKEY key;
LONG rc = ::RegOpenKey(baseKey, keyName, &key);
if (rc == ERROR_SUCCESS) {
rc = ::RegDeleteValue(key, valueName);
if (rc == ERROR_SUCCESS)
result = NS_OK;
::RegCloseKey(key);
}
return result;
}
nsCString GetRegistryKey(HKEY baseKey, const char * keyName,
const char * valueName)
{
nsCAutoString value;
HKEY key;
LONG rc = ::RegOpenKey(baseKey, keyName, &key);
if (rc == ERROR_SUCCESS) {
char buffer[MAX_PATH] = {0};
DWORD len = sizeof buffer;
rc = ::RegQueryValueEx(key, valueName, NULL, NULL,
(LPBYTE)buffer, &len);
if (rc == ERROR_SUCCESS) {
if (len)
value = buffer;
}
::RegCloseKey(key);
}
return value;
}
#define EXE_EXTENSION ".exe"
/** Returns TRUE if the current application is default mail client.
*/
PRBool IsDefaultMailClient()
{
if (!isSmartDll() && !isMozDll())
return PR_FALSE;
nsCAutoString name(GetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Clients\\Mail", ""));
if (!name.IsEmpty()) {
nsCString keyName("Software\\Clients\\Mail\\");
keyName += name.get();
keyName += "\\protocols\\mailto\\shell\\open\\command";
nsCAutoString result(GetRegistryKey(HKEY_LOCAL_MACHINE,
keyName.get(), ""));
if (!result.IsEmpty()) {
nsCAutoString strExtension;
strExtension.Assign(EXE_EXTENSION);
result.ToUpperCase();
strExtension.ToUpperCase();
PRInt32 index = result.RFind(strExtension.get());
if (index != kNotFound) {
result.Truncate(index + strExtension.Length());
}
return (result == thisApplication());
}
}
return PR_FALSE;
}
/** Saves the current setting of the default Mail Client in
* HKEY_LOCAL_MACHINE\\Software\\Mozilla\\Desktop
*/
nsresult saveDefaultMailClient()
{
nsresult rv;
nsCAutoString name(GetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Clients\\Mail", ""));
if (!name.IsEmpty()) {
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail",
(char *)name.get());
if (NS_SUCCEEDED(rv)) {
nsCString keyName("Software\\Clients\\Mail\\");
keyName += name.get();
keyName += "\\protocols\\mailto\\shell\\open\\command";
nsCAutoString appPath(GetRegistryKey(HKEY_LOCAL_MACHINE,
keyName.get(), ""));
if (!appPath.IsEmpty()) {
nsCString stringName("HKEY_LOCAL_MACHINE\\");
stringName += keyName.get();
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
stringName.get(), (char *)appPath.get());
}
}
}
else
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail",
"");
return rv;
}
/** Saves the current user setting of the default Mail Client in
* HKEY_LOCAL_MACHINE\\Software\\Mozilla\\Desktop
*/
nsresult saveUserDefaultMailClient()
{
nsresult rv;
nsCAutoString name(GetRegistryKey(HKEY_CURRENT_USER,
"Software\\Clients\\Mail", ""));
if (!name.IsEmpty()) {
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"HKEY_CURRENT_USER\\Software\\Clients\\Mail",
(char *)name.get());
}
else {
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"HKEY_CURRENT_USER\\Software\\Clients\\Mail",
"");
}
return rv;
}
/**
* Check whether it is a smart dll or not. Smart dll is the one installed by
* IE5 or Outlook Express which forwards the MAPI calls to the dll based on the
* registry key setttings.
* Returns TRUE if is a smart dll.
*/
typedef HRESULT (FAR PASCAL GetOutlookVersionFunc)();
static PRBool isSmartDll()
{
char buffer[MAX_PATH] = {0};
if (GetSystemDirectory(buffer, sizeof(buffer)) == 0)
return PR_FALSE;
PL_strcatn(buffer, sizeof(buffer), "\\Mapi32.dll");
HINSTANCE hInst;
GetOutlookVersionFunc *doesExist = nsnull;
hInst = LoadLibrary(buffer);
if (hInst == nsnull)
return PR_FALSE;
doesExist = (GetOutlookVersionFunc *) GetProcAddress (hInst, "GetOutlookVersion");
FreeLibrary(hInst);
return (doesExist != nsnull);
}
typedef HRESULT (FAR PASCAL GetMapiDllVersion)();
/**
* Checks whether mapi32.dll is installed by this app.
* Returns TRUE if it is.
*/
static PRBool isMozDll()
{
char buffer[MAX_PATH] = {0};
if (GetSystemDirectory(buffer, sizeof(buffer)) == 0)
return PR_FALSE;
PL_strcatn(buffer, sizeof(buffer), "\\Mapi32.dll");
HINSTANCE hInst;
GetMapiDllVersion *doesExist = nsnull;
hInst = LoadLibrary(buffer);
if (hInst == nsnull)
return PR_FALSE;
doesExist = (GetMapiDllVersion *) GetProcAddress (hInst, "GetMapiDllVersion");
FreeLibrary(hInst);
return (doesExist != nsnull);
}
/** Renames Mapi32.dl in system directory to Mapi32_moz_bak.dll
* copies the mozMapi32.dll from bin directory to the system directory
*/
nsresult CopyMozMapiToWinSysDir()
{
nsresult rv;
char buffer[MAX_PATH] = {0};
if (GetSystemDirectory(buffer, sizeof(buffer)) == 0)
return NS_ERROR_FAILURE;
nsCAutoString filePath(buffer);
filePath.Append("\\Mapi32_moz_bak.dll");
nsCOMPtr<nsILocalFile> pCurrentMapiFile = do_CreateInstance (NS_LOCAL_FILE_CONTRACTID, &rv);
if (NS_FAILED(rv) || !pCurrentMapiFile) return rv;
pCurrentMapiFile->InitWithPath(filePath.get());
nsCOMPtr<nsIFile> pMozMapiFile;
nsCOMPtr<nsIProperties> directoryService =
do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv);
if (!directoryService) return NS_ERROR_FAILURE;
rv = directoryService->Get(NS_OS_CURRENT_PROCESS_DIR,
NS_GET_IID(nsIFile),
getter_AddRefs(pMozMapiFile));
if (NS_FAILED(rv)) return rv;
pMozMapiFile->Append("mozMapi32.dll");
PRBool bExist;
rv = pMozMapiFile->Exists(&bExist);
if (NS_FAILED(rv) || !bExist) return rv;
rv = pCurrentMapiFile->Exists(&bExist);
if (NS_SUCCEEDED(rv) && bExist)
{
rv = pCurrentMapiFile->Remove(PR_FALSE);
}
if (NS_FAILED(rv)) return rv;
filePath.Assign(buffer);
filePath.Append("\\Mapi32.dll");
pCurrentMapiFile->InitWithPath(filePath.get());
rv = pCurrentMapiFile->Exists(&bExist);
if (NS_SUCCEEDED(rv) && bExist)
{
rv = pCurrentMapiFile->MoveTo(nsnull, "Mapi32_moz_bak.dll");
if (NS_FAILED(rv)) return rv;
nsCAutoString fullFilePath(buffer);
fullFilePath.Append("\\Mapi32_moz_bak.dll");
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"Mapi_backup_dll",
(char *)fullFilePath.get());
if (NS_FAILED(rv)) {
RestoreBackedUpMapiDll();
return rv;
}
}
nsAutoString fileName;
fileName.AssignWithConversion("Mapi32.dll");
filePath.Assign(buffer);
pCurrentMapiFile->InitWithPath(filePath.get());
rv = pMozMapiFile->CopyToUnicode(pCurrentMapiFile, fileName.get());
if (NS_FAILED(rv))
RestoreBackedUpMapiDll();
return rv;
}
/** deletes the Mapi32.dll in system directory and renames Mapi32_moz_bak.dll
* to Mapi32.dll
*/
nsresult RestoreBackedUpMapiDll()
{
nsresult rv;
char buffer[MAX_PATH] = {0};
if (GetSystemDirectory(buffer, sizeof(buffer)) == 0)
return NS_ERROR_FAILURE;
nsCAutoString filePath(buffer);
nsCAutoString previousFileName(buffer);
filePath.Append("\\Mapi32.dll");
previousFileName.Append("\\Mapi32_moz_bak.dll");
nsCOMPtr <nsILocalFile> pCurrentMapiFile = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);
if (NS_FAILED(rv) || !pCurrentMapiFile) return NS_ERROR_FAILURE;
pCurrentMapiFile->InitWithPath(filePath);
nsCOMPtr<nsILocalFile> pPreviousMapiFile = do_CreateInstance (NS_LOCAL_FILE_CONTRACTID, &rv);
if (NS_FAILED(rv) || !pPreviousMapiFile) return NS_ERROR_FAILURE;
pPreviousMapiFile->InitWithPath(previousFileName);
PRBool bExist;
rv = pCurrentMapiFile->Exists(&bExist);
if (NS_SUCCEEDED(rv) && bExist) {
rv = pCurrentMapiFile->Remove(PR_FALSE);
if (NS_FAILED(rv)) return rv;
}
rv = pPreviousMapiFile->Exists(&bExist);
if (NS_SUCCEEDED(rv) && bExist)
rv = pPreviousMapiFile->MoveTo(nsnull, "Mapi32.dll");
if (NS_SUCCEEDED(rv))
DeleteRegistryValue(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"Mapi_backup_dll");
return rv;
}
/** Sets Mozilla as default Mail Client
*/
nsresult setDefaultMailClient()
{
nsresult rv;
nsresult mailKeySet=NS_ERROR_FAILURE;
if (verifyRestrictedAccess()) return NS_ERROR_FAILURE;
if (!isSmartDll()) {
if (NS_FAILED(CopyMozMapiToWinSysDir())) return NS_ERROR_FAILURE;
}
rv = saveDefaultMailClient();
if (NS_FAILED(saveUserDefaultMailClient()) ||
NS_FAILED(rv)) return NS_ERROR_FAILURE;
nsCAutoString keyName("Software\\Clients\\Mail\\");
nsCAutoString appName(brandName());
if (!appName.IsEmpty()) {
keyName.Append(appName.get());
// hardcoding this for 0.9.4 branch
// need to change it before merging into the trunk
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
(char *)keyName.get(),
"", "Netscape 6.2 Mail");
}
else
rv = NS_ERROR_FAILURE;
if (NS_SUCCEEDED(rv)) {
nsCAutoString dllPath(thisApplication());
PRInt32 index = dllPath.RFind("\\");
if (index != kNotFound)
dllPath.Truncate(index + 1);
dllPath += "mozMapi32.dll";
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
(char *)keyName.get(), "DLLPath",
(char *)dllPath.get());
if (NS_SUCCEEDED(rv)) {
keyName.Append("\\protocols\\mailto");
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
(char *)keyName.get(),
"", "URL:MailTo Protocol");
if (NS_SUCCEEDED(rv)) {
nsCAutoString appPath(thisApplication());
appPath += " \"%1\"";
keyName.Append("\\shell\\open\\command");
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
(char *)keyName.get(),
"", (char *)appPath.get());
if (NS_SUCCEEDED(rv)) {
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Clients\\Mail",
"", (char *)appName.get());
}
if (NS_SUCCEEDED(rv)) {
nsCAutoString mailAppPath(thisApplication());
mailAppPath += " -mail";
nsCAutoString appKeyName ("Software\\Clients\\Mail\\");
appKeyName.Append(appName.get());
appKeyName.Append("\\shell\\open\\command");
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
(char *)appKeyName.get(),
"", (char *)mailAppPath.get());
}
if (NS_SUCCEEDED(rv)) {
nsCAutoString iconPath(thisApplication());
iconPath += ",0";
nsCAutoString iconKeyName ("Software\\Clients\\Mail\\");
iconKeyName.Append(appName.get());
iconKeyName.Append("\\DefaultIcon");
mailKeySet = SetRegistryKey(HKEY_LOCAL_MACHINE,
(char *)iconKeyName.get(),
"", (char *)iconPath.get());
}
}
}
}
if (NS_SUCCEEDED(mailKeySet)) {
nsresult desktopKeySet = SetRegistryKey(HKEY_CURRENT_USER,
"Software\\Clients\\Mail",
"", (char *)appName.get());
if (NS_SUCCEEDED(desktopKeySet)) {
desktopKeySet = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"defaultMailHasBeenSet", "1");
}
::SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0,
(LPARAM)"Software\\Clients\\Mail");
RegisterServer(CLSID_nsMapiImp, "Mozilla MAPI", "mozMapi", "mozMapi.1");
return desktopKeySet;
}
return mailKeySet;
}
/** Removes Mozilla as the default Mail client and restores the previous setting
*/
nsresult unsetDefaultMailClient() {
nsresult result = NS_OK;
nsresult mailKeySet = NS_ERROR_FAILURE;
if (verifyRestrictedAccess()) return NS_ERROR_FAILURE;
if (!isSmartDll()) {
if (NS_FAILED(RestoreBackedUpMapiDll())) return NS_ERROR_FAILURE;
}
nsCAutoString name(GetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail"));
nsCAutoString appName(brandName());
if (!name.IsEmpty() && !appName.IsEmpty() && name.Equals(appName)) {
nsCAutoString keyName("HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\");
keyName.Append(appName.get());
keyName.Append("\\protocols\\mailto\\shell\\open\\command");
nsCAutoString appPath(GetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
(char *)keyName.get()));
if (!appPath.IsEmpty()) {
keyName.Assign("Software\\Clients\\Mail\\");
keyName.Append(appName.get());
keyName.Append("\\protocols\\mailto\\shell\\open\\command");
result = SetRegistryKey(HKEY_LOCAL_MACHINE,
(char *) keyName.get(),
"", (char *)appPath.get());
if (NS_SUCCEEDED(result)) {
PRInt32 index = appPath.RFind("\\");
if (index != kNotFound)
appPath.Truncate(index + 1);
appPath += "mozMapi32.dll";
keyName.Assign("Software\\Clients\\Mail\\");
keyName.Append(appName.get());
result = SetRegistryKey(HKEY_LOCAL_MACHINE,
(char *)keyName.get(),
"DLLPath", (char *) appPath.get());
}
}
}
if (!name.IsEmpty()) {
if (NS_SUCCEEDED(result)) {
mailKeySet = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Clients\\Mail",
"", (char *)name.get());
}
}
else
mailKeySet = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Clients\\Mail",
"", "");
if (NS_SUCCEEDED(mailKeySet)) {
nsCAutoString userAppName(GetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"HKEY_CURRENT_USER\\Software\\Clients\\Mail"));
nsresult desktopKeySet = NS_OK;
if (!userAppName.IsEmpty()) {
desktopKeySet = SetRegistryKey(HKEY_CURRENT_USER,
"Software\\Clients\\Mail",
"", (char *)userAppName.get());
}
else {
DeleteRegistryValue(HKEY_CURRENT_USER, "Software\\Clients\\Mail", "");
}
if (NS_SUCCEEDED(desktopKeySet)) {
desktopKeySet = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"defaultMailHasBeenSet", "0");
}
::SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0,
(LPARAM)"Software\\Clients\\Mail");
UnregisterServer(CLSID_nsMapiImp, "mozMapi", "mozMapi.1");
return desktopKeySet;
}
return mailKeySet;
}
/** Returns FALSE if showMapiDialog is set to 0.
* Returns TRUE otherwise
* Also returns TRUE if the Mozilla has been set as the default mail client
* and some other application has changed that setting.
* This function gets called only if the current app is not the default mail
* client
*/
PRBool getShowDialog() {
PRBool rv = PR_FALSE;
nsCString showDialog(GetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"showMapiDialog"));
// if the user has not selected the checkbox, show dialog
if (showDialog.IsEmpty() || showDialog.Equals("1"))
rv = PR_TRUE;
if (!rv) {
// even if the user has selected the checkbox
// show it if some other application has changed the
// default setting.
nsCAutoString setMailDefault(GetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"defaultMailHasBeenSet"));
if (setMailDefault.Equals("1")) {
// need to reset the defaultMailHasBeenSet to "0"
// so that after the dialog is displayed once,
// we do not keep displaying this dialog after the user has
// selected the checkbox
rv = SetRegistryKey(HKEY_LOCAL_MACHINE,
"Software\\Mozilla\\Desktop",
"defaultMailHasBeenSet", "0");
rv = PR_TRUE;
}
}
return rv;
}

View File

@@ -0,0 +1,90 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Srilatha Moturi <srilatha@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsmapiregistryutils_h____
#define nsmapiregistryutils_h____
#include <windows.h>
#include <string.h>
#include <winreg.h>
#include "Registry.h"
#include "nsString.h"
//Sets the registry key for basekey/keyname valuename.
nsresult SetRegistryKey(HKEY baseKey, const char * keyName,
const char * valueName, char * value);
// Deletes the registry key for base/keyname/valuename
nsresult DeleteRegistryValue(HKEY baseKey, const char * keyName,
const char * valueName);
// Gets the current regiistry setting for the key.
nsCString GetRegistryKey(HKEY baseKey, const char * keyName,
const char * valueName);
// Returns PR_TRUE if this user only has restricted access
// to the registry keys we need to modify.
PRBool verifyRestrictedAccess();
// Returns true if mozilla is the default mail client
// by checking the registry.
PRBool IsDefaultMailClient();
// Save the current setting for the default mail client.
nsresult saveDefaultMailClient();
// Saves the current user setting for the default mail client.
nsresult saveUserDefaultMailClient();
// Renames Mapi32.dl in system directory to Mapi32_moz_bak.dll
// copies the mozMapi32.dll from bin directory to the system directory
nsresult CopyMozMapiToWinSysDir();
// deletes the Mapi32.dll in system directory and renames Mapi32_moz_bak.dll
// to Mapi32.dll
nsresult RestoreBackedUpMapiDll();
// Sets mozilla as the default mail client
nsresult setDefaultMailClient();
// unsets mozilla and resets the default mail client setting to previous one
nsresult unsetDefaultMailClient();
// returns true if we need to show the mail integration dialog.
PRBool getShowDialog();
#endif

View File

@@ -0,0 +1,117 @@
<?xml version="1.0"?>
<!-- If you modify this file, please also update the following files -->
<!-- mailnews/mapi/resources/content/contents.rdf in the ns tree -->
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the packages being supplied by this jar -->
<RDF:Seq about="urn:mozilla:package:root">
<RDF:li resource="urn:mozilla:package:messenger"/>
</RDF:Seq>
<!-- package information -->
<RDF:Description about="urn:mozilla:package:messenger"
chrome:displayName="Messenger"
chrome:author="mozilla.org"
chrome:name="messenger"
chrome:localeVersion="0.9.4"
chrome:skinVersion="0.9.4">
</RDF:Description>
<!-- overlay information -->
<RDF:Seq about="urn:mozilla:overlays">
<RDF:li resource="chrome://communicator/content/pref/preftree.xul"/>
<RDF:li resource="chrome://communicator/content/pref/pref-appearance.xul"/>
<RDF:li resource="chrome://communicator/content/pref/pref-advanced.xul"/>
<RDF:li resource="chrome://communicator/content/tasksOverlay.xul"/>
<RDF:li resource="chrome://navigator/content/navigatorOverlay.xul"/>
<RDF:li resource="chrome://communicator/content/history/history.xul"/>
<RDF:li resource="chrome://communicator/content/bookmarks/bookmarks.xul"/>
<RDF:li resource="chrome://communicator/content/bookmarks/bm-find.xul"/>
<RDF:li resource="chrome://messenger/content/messenger.xul"/>
<RDF:li resource="chrome://messenger/content/mail3PaneWindowVertLayout.xul"/>
<RDF:li resource="chrome://messenger/content/messengercompose/messengercompose.xul"/>
<RDF:li resource="chrome://messenger/content/addressbook/addressbook.xul"/>
<RDF:li resource="chrome://messenger/content/addressbook/abSelectAddressesDialog.xul"/>
<RDF:li resource="chrome://editor/content/editor.xul"/>
<RDF:li resource="chrome://messenger/content/pref-mailnews.xul"/>
</RDF:Seq>
<!-- messenger preferences branches -->
<RDF:Seq about="chrome://communicator/content/pref/preftree.xul">
<RDF:li>chrome://messenger/content/mailPrefsOverlay.xul</RDF:li>
</RDF:Seq>
<!-- messenger startup pref -->
<RDF:Seq about="chrome://communicator/content/pref/pref-appearance.xul">
<RDF:li>chrome://messenger/content/mailPrefsOverlay.xul</RDF:li>
</RDF:Seq>
<!-- messenger js toggle pref -->
<RDF:Seq about="chrome://communicator/content/pref/pref-advanced.xul">
<RDF:li>chrome://messenger/content/mailPrefsOverlay.xul</RDF:li>
</RDF:Seq>
<!-- messenger taskbar/tasks menu items -->
<RDF:Seq about="chrome://communicator/content/tasksOverlay.xul">
<RDF:li>chrome://messenger/content/mailTasksOverlay.xul</RDF:li>
</RDF:Seq>
<!-- messenger items for History -->
<RDF:Seq about="chrome://communicator/content/history/history.xul">
<RDF:li>chrome://messenger/content/mailNavigatorOverlay.xul</RDF:li>
</RDF:Seq>
<!-- messenger items for Bookmarks -->
<RDF:Seq about="chrome://communicator/content/bookmarks/bookmarks.xul">
<RDF:li>chrome://messenger/content/mailNavigatorOverlay.xul</RDF:li>
</RDF:Seq>
<!-- messenger items for History -->
<RDF:Seq about="chrome://communicator/content/bookmarks/bm-find.xul">
<RDF:li>chrome://messenger/content/mailNavigatorOverlay.xul</RDF:li>
</RDF:Seq>
<!-- messenger items for Navigator -->
<RDF:Seq about="chrome://navigator/content/navigatorOverlay.xul">
<RDF:li>chrome://messenger/content/mailNavigatorOverlay.xul</RDF:li>
</RDF:Seq>
<!-- messenger items for Messenger -->
<RDF:Seq about="chrome://messenger/content/messenger.xul">
<RDF:li>chrome://messenger/content/mailMessengerOverlay.xul</RDF:li>
</RDF:Seq>
<RDF:Seq about="chrome://messenger/content/mail3PaneWindowVertLayout.xul">
<RDF:li>chrome://messenger/content/mailMessengerOverlay.xul</RDF:li>
</RDF:Seq>
<!-- messenger items for Mail Compose -->
<RDF:Seq about="chrome://messenger/content/messengercompose/messengercompose.xul">
<RDF:li>chrome://messenger/content/mailMessengerComposeOverlay.xul</RDF:li>
</RDF:Seq>
<!-- messenger items for Addressbook -->
<RDF:Seq about="chrome://messenger/content/addressbook/addressbook.xul">
<RDF:li>chrome://messenger/content/mailABOverlay.xul</RDF:li>
</RDF:Seq>
<!-- messenger items for Select Addresses dialog -->
<RDF:Seq about="chrome://messenger/content/addressbook/abSelectAddressesDialog.xul">
<RDF:li>chrome://messenger/content/mailOverlay.xul</RDF:li>
</RDF:Seq>
<!-- messenger items for Composer -->
<RDF:Seq about="chrome://editor/content/editor.xul">
<RDF:li>chrome://messenger/content/mailEditorOverlay.xul</RDF:li>
</RDF:Seq>
<!-- mapi items for Mail And Newsgroups preferences pane -->
<RDF:Seq about="chrome://messenger/content/pref-mailnews.xul">
<RDF:li>chrome://messenger/content/pref-mailnewsOverlay.xul</RDF:li>
</RDF:Seq>
</RDF:RDF>

View File

@@ -0,0 +1,4 @@
messenger.jar:
content/messenger/pref-mailnewsOverlay.xul
+ content/messenger/contents.rdf
content/messenger/pref-mailnewsOverlay.js

View File

@@ -0,0 +1,26 @@
#!nmake
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 2001 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Srilatha Moturi <srilatha@netscape.com>
#
DEPTH=..\..\..\..
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:chrome="http://www.mozilla.org/rdf/chrome#"
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<!-- mapi items for mailnews preferences -->
<RDF:Seq about="urn:mozilla:overlays">
<RDF:li resource="chrome://messenger/content/pref-mailnews.xul"/>
</RDF:Seq>
<RDF:Seq about="chrome://messenger/content/pref-mailnews.xul">
<RDF:li>chrome://messenger/content/pref-mailnewsOverlay.xul</RDF:li>
</RDF:Seq>
</RDF:RDF>

View File

@@ -0,0 +1,104 @@
/*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 2001 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Srilatha Moturi <srilatha@netscape.com>
*/
function mailnewsOverlayStartup() {
mailnewsOverlayInit();
parent.hPrefWindow.registerOKCallbackFunc(onOK);
if (!("mapiPref" in parent)) {
parent.mapiPref = new Object;
parent.mapiPref.isDefaultMailClient =
document.getElementById("mailnewsEnableMapi").checked;
}
else {
// when we switch between different panes
// set the checkbox based on the saved state
var mailnewsEnableMapi = document.getElementById("mailnewsEnableMapi");
if (parent.mapiPref.isDefaultMailClient)
mailnewsEnableMapi.setAttribute("checked", "true");
else
mailnewsEnableMapi.setAttribute("checked", "false");
}
}
function mailnewsOverlayInit() {
try {
var mapiRegistry = Components.classes[ "@mozilla.org/mapiregistry;1" ].
getService( Components.interfaces.nsIMapiRegistry );
}
catch(ex){
mapiRegistry = null;
}
const prefbase = "system.windows.lock_ui.";
var mailnewsEnableMapi = document.getElementById("mailnewsEnableMapi");
if (mapiRegistry) {
// initialise preference component.
// While the data is coming from the system registry, we use a set
// of parallel preferences to indicate if the ui should be locked.
try {
var prefService = Components.classes["@mozilla.org/preferences-service;1"]
.getService()
.QueryInterface(Components.interfaces.nsIPrefService);
var prefBranch = prefService.getBranch(prefbase);
if (prefBranch && prefBranch.prefIsLocked("default_mail_client")) {
if (prefBranch.getBoolPref("default_mail_client"))
mapiRegistry.setDefaultMailClient();
else
mapiRegistry.unsetDefaultMailClient();
mailnewsEnableMapi.setAttribute("disabled", "true");
}
}
catch(ex) {}
if (mapiRegistry.isDefaultMailClient)
mailnewsEnableMapi.setAttribute("checked", "true");
else
mailnewsEnableMapi.setAttribute("checked", "false");
}
else
mailnewsEnableMapi.setAttribute("disabled", "true");
}
function onEnableMapi() {
// save the state of the checkbox
if ("mapiPref" in parent)
parent.mapiPref.isDefaultMailClient =
document.getElementById("mailnewsEnableMapi").checked;
}
function onOK()
{
try {
var mapiRegistry = Components.classes[ "@mozilla.org/mapiregistry;1" ].
getService( Components.interfaces.nsIMapiRegistry );
}
catch(ex){
mapiRegistry = null;
}
if (mapiRegistry &&
("mapiPref" in parent) &&
(mapiRegistry.isDefaultMailClient != parent.mapiPref.isDefaultMailClient)) {
if (parent.mapiPref.isDefaultMailClient)
mapiRegistry.setDefaultMailClient();
else
mapiRegistry.unsetDefaultMailClient();
}
}

View File

@@ -0,0 +1,44 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Mozilla 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/MPL/
oftware 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.org code.
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 2001 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
Srilatha Moturi <srilatha@netscape.com>
-->
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
%brandDTD;
<!ENTITY % prefMailnewsOverlayDTD SYSTEM "chrome://messenger/locale/pref-mailnewsOverlay.dtd" >
%prefMailnewsOverlayDTD;
]>
<overlay id="prefMailnewsOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript">
<![CDATA[
_elementIDs.push("mailnewsEnableMapi");
]]>
</script>
<script type="application/x-javascript" src="chrome://messenger/content/pref-mailnewsOverlay.js"/>
<hbox autostretch="never" id="mapi">
<checkbox id="mailnewsEnableMapi" label="&enableMapi.label;"
accesskey="&enableMapi.accesskey;"
oncommand="onEnableMapi();"
startFunc="mailnewsOverlayStartup();"/>
</hbox>
</overlay>

View File

@@ -0,0 +1,3 @@
en-US.jar:
locale/en-US/messenger/pref-mailnewsOverlay.dtd
locale/en-US/messenger/mapi.properties

View File

@@ -0,0 +1,26 @@
#!nmake
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 2001 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Srilatha Moturi <srilatha@netscape.com>
#
DEPTH=..\..\..\..\..
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,18 @@
# Mail Integration Dialog
dialogTitle=%S Mail
dialogText=Do you want to use %S as the default mail application?
checkboxText=Do not display this dialog again
# MAPI Messages
loginText=Please enter your password for %S:
loginTextwithName=Please enter your username and password
loginTitle=%S Mail
PasswordTitle=%S Mail
# MAPI Error Messages
errorMessage=%S Mail could not be set as the default mail application because a registry key could not be updated. Verify with your system administrator that you have write access to your system registry, and then try again.
errorMessageTitle=%S Mail
# MAPI Security Messages
mapiBlindSendWarning=Another application is attempting to send mail using your user profile. Are you sure you want to send mail?
mapiBlindSendDontShowAgain=Warn me whenever other applications try to send mail from me

View File

@@ -0,0 +1,3 @@
<!ENTITY enableMapiTitle.label "When sending mail from other applications">
<!ENTITY enableMapi.label "Use &vendorShortName; Mail as the default mail application.">
<!ENTITY enableMapi.accesskey "u">

View File

@@ -0,0 +1,28 @@
#!nmake
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 2001 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Srilatha Moturi <srilatha@netscape.com>
#
DEPTH=..\..\..\..
DIRS=en-US
include <$(DEPTH)\config\rules.mak>

View File

@@ -0,0 +1,27 @@
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 2001 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Srilatha Moturi <srilatha@netscape.com>
#
DEPTH=..\..\..
DIRS=content locale
include <$(DEPTH)\config\rules.mak>

View File

@@ -1,134 +0,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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = xpcom
XPIDL_MODULE = xpcom_ds
LIBRARY_NAME = xpcomds_s
REQUIRES = unicharutil string
CSRCS = \
pldhash.c \
plvector.c \
$(NULL)
CPPSRCS = \
nsArena.cpp \
nsAtomTable.cpp \
nsAtomService.cpp \
nsAVLTree.cpp \
nsByteBuffer.cpp \
nsCRT.cpp \
nsConjoiningEnumerator.cpp \
nsDeque.cpp \
nsEmptyEnumerator.cpp \
nsEnumeratorUtils.cpp \
nsFixedSizeAllocator.cpp \
nsHashtable.cpp \
nsHashtableEnumerator.cpp \
nsObserver.cpp \
nsObserverList.cpp \
nsObserverService.cpp \
nsProperties.cpp \
nsPersistentProperties.cpp \
nsQuickSort.cpp \
nsSizeOfHandler.cpp \
nsStaticNameTable.cpp \
nsStatistics.cpp \
nsStringMap.cpp \
nsSupportsArray.cpp \
nsSupportsArrayEnumerator.cpp \
nsSupportsPrimitives.cpp \
nsUnicharBuffer.cpp \
nsVoidArray.cpp \
nsVoidBTree.cpp \
nsTextFormatter.cpp \
nsTimelineService.cpp \
$(NULL)
EXPORTS = \
nsAVLTree.h \
nsAtomService.h \
nsCppSharedAllocator.h \
nsCRT.h \
nsDeque.h \
nsEnumeratorUtils.h \
nsFixedSizeAllocator.h \
nsHashtable.h \
nsHashtableEnumerator.h \
nsIArena.h \
nsIByteBuffer.h \
nsIObserverList.h \
nsISimpleEnumerator.h \
nsISizeOfHandler.h \
nsIUnicharBuffer.h \
nsInt64.h \
nsQuickSort.h \
nsStaticNameTable.h \
nsStatistics.h \
nsStringMap.h \
nsSupportsArray.h \
nsSupportsPrimitives.h \
nsTime.h \
nsUnitConversion.h \
nsVector.h \
nsVoidArray.h \
nsVoidBTree.h \
pldhash.h \
plvector.h \
nsTextFormatter.h \
$(NULL)
XPIDLSRCS = \
nsIAtom.idl \
nsIAtomService.idl \
nsICollection.idl \
nsIEnumerator.idl \
nsIObserver.idl \
nsIObserverService.idl \
nsIPersistentProperties2.idl \
nsIProperties.idl \
nsISerializable.idl \
nsIStopwatch.idl \
nsISupportsArray.idl \
nsISupportsIterators.idl \
nsISupportsPrimitives.idl \
nsITimelineService.idl \
$(NULL)
EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
# we don't want the shared lib, but we want to force the creation of a static lib.
FORCE_STATIC_LIB = 1
# Force use of PIC
FORCE_USE_PIC = 1
include $(topsrcdir)/config/rules.mk
DEFINES += -D_IMPL_NS_COM -D_IMPL_NS_BASE

View File

@@ -1,300 +0,0 @@
/*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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.
*
* The Initial Developer of the Original Code is James L. Nance
* Portions created by James L. Nance are Copyright (C) 2001
* James L. Nance. All Rights Reserved.
*
* Contributor(s): Patricia Jewell Nance, Jesse Jacob Nance
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License Version 2 or later (the
* "GPL"), in which case the provisions of the GPL are applicable
* instead of those above. If you wish to allow use of your
* version of this file only under the terms of the GPL and not to
* allow others to use your version of this file under the MPL,
* indicate your decision by deleting the provisions above and
* replace them with the notice and other provisions required by
* the GPL. If you do not delete the provisions above, a recipient
* may use your version of this file under either the MPL or the
* GPL.
*/
// #define TEST_PATRICIA
#if defined(TEST_PATRICIA)
# include "stdlib.h"
# include "stdio.h"
# include "string.h"
# define PRBool bool
# define PRUint32 unsigned int
# define PRInt32 int
# define PR_CALLBACK
# define PLArenaPool int
# define PL_FinishArenaPool(a)
# define PL_InitArenaPool(a, b, c, d)
# define PL_ArenaAllocate(a, size) malloc(size)
# define PR_TRUE true
# define PR_FALSE false
struct nsCRT {
static int strlen(const char *a) {return ::strlen(a);}
static int memcmp(const void *a, const void *b, PRUint32 c) {
return ::memcmp(a,b,c);
}
};
#else
# include "nsCRT.h"
#endif
#include "nsStringMap.h"
const char nsStringMap::zero_str[] = "\0";
nsStringMap::~nsStringMap()
{
// Get rid of the arena memory
PL_FinishArenaPool(&mPool);
}
nsStringMap::nsStringMap() : numEntries(0)
{
// Initialize the head
head.l = head.r = &head;
head.bit = ~0;
head.key = zero_str;
head.len = 1;
head.obj = 0;
// Initialize the arena. Guess that a 512 byte block size is good
PL_InitArenaPool(&mPool, "nsStringMap", 512, sizeof(void*));
}
void
nsStringMap::Reset()
{
// Initialize the head
head.l = head.r = &head;
head.bit = ~0;
head.key = zero_str;
head.len = 1;
head.obj = 0;
// Reinitialize the Arena
PL_FinishArenaPool(&mPool);
PL_InitArenaPool(&mPool, "nsStringMap", 512, sizeof(void*));
}
void
nsStringMap::Reset(nsStringMapEnumFunc destroyFunc, void *aClosure)
{
Enumerate(destroyFunc, aClosure);
Reset();
}
nsStringMap::Patricia *
nsStringMap::newNode()
{
return (Patricia*) PL_ArenaAllocate(&mPool, sizeof(Patricia));
}
nsStringMap::Patricia *
nsStringMap::searchDown(BitTester &key)
{
// The head node only branches to the left, so we can optimize here.
Patricia *x = head.l;
PRUint32 lastBits;
do {
lastBits = x->bit;
if(key.isset(lastBits))
x = x->r;
else
x = x->l;
} while(lastBits > x->bit);
return x;
}
void*
nsStringMap::Get(const char *str, PRUint32 slen)
{
BitTester key(str, slen);
Patricia *t = searchDown(key);
if(!key.memcmp(t->key, t->len)) {
return t->obj;
}
return 0;
}
void*
nsStringMap::Get(const char *str)
{
BitTester key(str);
Patricia *t = searchDown(key);
if(!key.memcmp(t->key, t->len)) {
return t->obj;
}
return 0;
}
PRBool
nsStringMap::Put(const char *str, void *obj, PRBool copy)
{
PRUint32 slen = nsCRT::strlen(str);
return Put(str, slen, obj, copy);
}
PRBool
nsStringMap::Put(const char *str, PRUint32 slen, void *obj, PRBool copy)
{
if(copy) {
PRUint32 mask = sizeof(double) - 1;
PRUint32 asize = (slen+mask) & ~mask;
char *tstr = (char*) PL_ArenaAllocate(&mPool, asize);
memcpy(tstr, str, slen);
str = tstr;
}
BitTester key(str, slen);
Patricia *t = searchDown(key);
if(!key.memcmp(t->key, t->len)) {
t->obj = obj;
return PR_TRUE;
}
// This is somewhat ugly. We need to find the maximum bit position that
// differs, but this is complicated by the fact that we have random length
// data. Assume that data past the end of the string is 0.
const PRUint32 klen = key.datalen();
const PRUint32 tlen = t->len;
PRUint32 bpos;
if(klen>tlen) {
bpos = 8 * klen - 1;
while(!BitTester::isset_checked(str, bpos)) --bpos;
} else if(tlen>klen) {
bpos = 8 * tlen - 1;
while(!BitTester::isset_checked(t->key, bpos)) --bpos;
} else /* equal */ {
bpos = 8 * tlen - 1;
while(BitTester::bitsequal(t->key, str, bpos)) --bpos;
}
Patricia *p, *x = &head;
do {
p = x;
x = key.isset(x->bit) ? x->r : x->l;
} while(x->bit > bpos && p->bit > x->bit);
t = newNode();
if(!t) {
return PR_FALSE;
}
t->key = str;
t->len = key.datalen();
t->obj = obj;
t->bit = bpos;
if(key.isset(t->bit)) {
t->r = t;
t->l = x;
} else {
t->r = x;
t->l = t;
}
if(key.isset(p->bit)) {
p->r = t;
} else {
p->l = t;
}
return PR_TRUE;
}
void
nsStringMap::enumerate_recurse(
nsStringMapEnumFunc aEnumFunc, void* aClosure, Patricia *node)
{
aEnumFunc(node->key, node->obj, aClosure);
if(node->l && node->l->bit<node->bit)
enumerate_recurse(aEnumFunc, aClosure, node->l);
if(node->r && node->r->bit<node->bit)
enumerate_recurse(aEnumFunc, aClosure, node->r);
}
void
nsStringMap::Enumerate(nsStringMapEnumFunc aEnumFunc, void *aClosure)
{
// We dont want to process head, its a sentinal
if(head.l && head.l->bit<head.bit)
enumerate_recurse(aEnumFunc, aClosure, head.l);
if(head.r && head.r->bit<head.bit)
enumerate_recurse(aEnumFunc, aClosure, head.r);
}
#if defined(TEST_PATRICIA)
PRBool etest(const char *key, void *data, void *closure)
{
printf("%s\n", key);
return PR_TRUE;
}
int main()
{
nsStringMap map;
const char *strings[] = {
"I am number 1 string",
"I am number 2 string",
"I am number 3 string",
"a different string",
"a similar string",
"I am a very long string and I want to make sure we can handle this",
"I am a very long string and I want to make sure we can handle this too",
0
};
int idx;
for(idx=0; strings[idx]; ++idx) {
map.Put(strings[idx], (void*)(1+idx));
}
printf("Lookup Test\n");
while(--idx>=0) {
void *ptr = map.Get(strings[idx]);
printf("%d: %s\n", (long)ptr, strings[idx]);
}
printf("\nEnumeration Test\n");
map.Enumerate(etest, 0);
return 0;
}
#endif

View File

@@ -1,112 +0,0 @@
#ifndef nsStringMap_h__
#define nsStringMap_h__
/*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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.
*
* The Initial Developer of the Original Code is James L. Nance
* Portions created by James L. Nance are Copyright (C) 2001
* James L. Nance. All Rights Reserved.
*
* Contributor(s): Patricia Jewell Nance, Jesse Jacob Nance
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License Version 2 or later (the
* "GPL"), in which case the provisions of the GPL are applicable
* instead of those above. If you wish to allow use of your
* version of this file only under the terms of the GPL and not to
* allow others to use your version of this file under the MPL,
* indicate your decision by deleting the provisions above and
* replace them with the notice and other provisions required by
* the GPL. If you do not delete the provisions above, a recipient
* may use your version of this file under either the MPL or the
* GPL.
*/
#if !defined(TEST_PATRICIA)
# include "nscore.h"
# include "prtypes.h"
# include "plarena.h"
#endif
typedef PRBool (*PR_CALLBACK nsStringMapEnumFunc) (
const char *aKey, void *aData, void *aClosure);
class nsStringMap
{
public:
nsStringMap();
~nsStringMap();
PRBool Put(const char *str, PRUint32 slen, void *obj, PRBool copy=PR_FALSE);
PRBool Put(const char *str, void *obj, PRBool copy=PR_FALSE);
void* Get(const char *str);
void* Get(const char *str, PRUint32 slen);
void Reset();
void Reset(nsStringMapEnumFunc destroyFunc, void *aClosure = 0);
void Enumerate(nsStringMapEnumFunc aEnumFunc, void *aClosure = 0);
struct Patricia {
Patricia *l, *r;
PRUint32 bit; // Bit position for l/r comp
const char *key;
PRUint32 len;
void *obj;
};
// The BitTester class is used to test a particular bit position in an
// array of characters. It does not assign any special meaning to 0
// characters. Bits past the end of the array are treated as 0
class BitTester {
const PRUint32 slen;
const char *cstr;
public:
BitTester(const char *s) : slen(nsCRT::strlen(s)), cstr(s) {}
BitTester(const char *s, PRUint32 l) : slen(l), cstr(s) {}
PRInt32 memcmp(const char *ostr, PRUint32 olen) {
if(olen==slen) {
return ::memcmp((void*)cstr, ostr, slen);
} else {
return olen - slen;
}
}
PRUint32 datalen() const {return slen;}
static PRBool isset_checked(const char *str, PRUint32 idx) {
return (str[idx/8] & (1<<(idx & 7))) != 0;
}
static PRBool
bitsequal(const char *str1, const char*str2, PRUint32 idx) {
return (str1[idx/8] & (1<<(idx&7)))==(str2[idx/8] & (1<<(idx&7)));
}
PRBool isset(PRUint32 idx) {
const PRUint32 base = idx/8;
if(base>=slen) return 0;
return (cstr[base] & (1<<(idx & 7))) != 0;
}
};
private:
PLArenaPool mPool;
Patricia *newNode();
Patricia *searchDown(BitTester&);
void enumerate_recurse(nsStringMapEnumFunc, void*, Patricia*);
Patricia head; // Sentinal node
PRInt32 numEntries;
static const char zero_str[];
};
#endif