Closed
Bug 103908
Opened 24 years ago
Closed 24 years ago
The default email selection dialog box continues to display even when the "Do not display..." is selected.
Categories
(MailNews Core :: Simple MAPI, defect, P2)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: trix, Assigned: srilatha)
Details
(Whiteboard: [PDT+] [Fix on 094 branch])
Attachments
(1 file, 5 obsolete files)
|
13.91 KB,
patch
|
srilatha
:
review+
srilatha
:
superreview+
|
Details | Diff | Splinter Review |
In the default email app selection dialog box, if you check the checkbox "Do not
display this dialog again" and select the NO button, you are still prompted with
the same dialog box again when you relaunch the email client.
DIRECTIONS:
1. Make sure Outlook Express is the default email client.
2. Launch the browser and then the email client.
3. In the default email app selection dialog, check the checkbox "Do not display
this dialog again" and click the NO button.
4. Close the email client and the browser and then relaunch both.
ACTUAL:
The email selection dialog box reappears.
EXPECTED:
Selecting the option should have disabled the dialog box from reappearing.
Comment 1•24 years ago
|
||
I've been seeing this behavior too. Nominating for the branch. currently I get
prompted every time I start up the app for the dialog. This was using a build
from yesterday though so maybe this is working today.
I particularly notice it after running a mozilla build where it asks me. Then go
back to a netscape build and it asks me again.
Keywords: nsbranch
Comment 2•24 years ago
|
||
Is this required for 094? If so, we should mark it nsbranch+
Whiteboard: [PDT]
Comment 3•24 years ago
|
||
I think the trick to seeing it is if I select No and I check the box for don't
ask me again. Then I see the dialog. If others also see this behavior then it
sounds like a good plus candidate to me since I shouldn't get asked every time I
start up my profile.
| Assignee | ||
Comment 4•24 years ago
|
||
Marking this nsbranch+
Updated•24 years ago
|
| Assignee | ||
Comment 5•24 years ago
|
||
| Assignee | ||
Comment 6•24 years ago
|
||
ccing ssu and dveditz for reviews.
| Assignee | ||
Comment 7•24 years ago
|
||
Updated•24 years ago
|
Priority: -- → P2
| Assignee | ||
Comment 8•24 years ago
|
||
| Assignee | ||
Comment 9•24 years ago
|
||
Sean, the above patch has a huge context. let me know if you want one with
shorter context
Comment 10•24 years ago
|
||
Comment on attachment 52924 [details] [diff] [review]
now checking mapi32.dll before we say we are the default mail client
r=ssu
Attachment #52924 -
Flags: review+
Comment 11•24 years ago
|
||
tentative PDT+, pending testing and sr from dan.
Whiteboard: [PDT] → [PDT+]
Updated•24 years ago
|
Attachment #52924 -
Flags: needs-work+
Comment 12•24 years ago
|
||
Dan:
Hopefully you are back home by now after our phone conversation at around 9pm.
Please could you work with Srilatha, and try to get the patch in tonight?
Please repost your comments as soon as possible. Thanks.
Comment 13•24 years ago
|
||
Re-typed my review comments, and lost them again. Argh!
| Assignee | ||
Comment 14•24 years ago
|
||
| Assignee | ||
Comment 15•24 years ago
|
||
Comment 16•24 years ago
|
||
Comment on attachment 52924 [details] [diff] [review]
now checking mapi32.dll before we say we are the default mail client
> PRBool IsDefaultMailClient()
> {
>+ if (!isSmartDll() && !isMozDll()) return PR_FALSE;
> nsCAutoString name(GetRegistryKey(HKEY_LOCAL_MACHINE,
> "Software\\Clients\\Mail", ""));
Put the return on its own line. Putting if's in a single line like this
obscures control flow making it harder to read, and makes it more
difficult to debug since debuggers are typically line-oriented.
An extra blank line after the early bailout wouldn't hurt, either.
>+static PRBool isMozDll()
>+{
>+ nsAutoString mapiFilePath;
>+ nsSpecialSystemDirectory sysDir(nsSpecialSystemDirectory::Win_SystemDirectory);
>+ ((nsFileSpec*)&sysDir)->GetNativePathString(mapiFilePath);
>+ mapiFilePath.AppendWithConversion("Mapi32.dll");
Mentioned in AIM, but "WithConversion" methods are a red flag. First they are
deprecated and you should use explicit conversions, in this case
NS_LITERAL_STRING("Mapi32.dll") which will have a performance benefit
too -- on some platforms it compiles away.
>+ HINSTANCE hInst;
>+ GetMapiDllVersion *doesExist = nsnull;
>+ nsCAutoString filePath;
>+ filePath.AssignWithConversion(mapiFilePath.get());
>+ hInst = LoadLibrary(filePath.get());
Converting paths is especially bad, breaks i18n. nsSpecialSystemDirectory
is deprecated and so is nsFileSpec -- don't ever use them. In XP code use
the directory service (NS_OS_SYSTEM_DIR here) and nsIFile. And in nsIFile
you can get the cstring native path if you need it, and conversions would
be avoided here.
But this is win-specific code, and you go ahead and call the WinAPI
LoadLibrary(), so just use GetSystemDirectory() and dispense with the
XP overhead.
This is the one substantive thing I'm objecting to, and you should fix
similar places that are already checked-in.
>+ doesExist = (GetMapiDllVersion *) GetProcAddress (hInst, "GetMapiDllVersion");
>+ FreeLibrary(hInst);
Before this lands on the trunk let's change the name of this function.
GetMapiDllVersion is too generic to be a reliable indicator that this
belongs to us. Take the "smartDLL" GetOutlookVersion as an example and
do something like GetMozillaVersion, or open up the file version resource
and look for the product, creator, original name, or some such.
I imagine changing this now would impact a lot of places so I can live
with it. Changing it later is worse, though, because future programs may
have to look two places.
> PRBool getShowDialog() {
> PRBool rv = PR_FALSE;
> nsCString showDialog(GetRegistryKey(HKEY_LOCAL_MACHINE,
> "Software\\Mozilla\\Desktop",
> "showMapiDialog"));
Why is this a global registry setting? The "show dialog" setting should be
a per-profile pref. I wouldn't want my wife to be bothered by this dialog,
but I'd want to see if some other app changed my settings.
> if (!showDialog.IsEmpty()) {
> if (showDialog.Equals(NS_LITERAL_CSTRING("1")))
> rv = PR_TRUE;
> }
> else
> rv = PR_TRUE;
> if (!rv) {
This logic confuses me (and do you need the NS_LITERAL_CSTRING there?).
maybe:
// show dialog unless user suppressed it
if (showDialog.IsEmpty() || showDialog.Equals("1"))
rv = PR_TRUE;
else {
// even if suppressed, show dialog if someone else hijacked us
... rest of stuff....
}
> return rv;
> // This function returns the (fully-qualified) name of this executable.
> static nsCString thisApplication();
>
> // returns the brandName of the current application
> static nsCString brandName();
>
> // 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();
>+
prototypes for static functions are questionable in a header, but
downright wrong in an exported header. Move these into the C++ file
that contains these functions.
Comment 17•24 years ago
|
||
Tiantian,
I have checked in all the fixes. Somehow bugzilla is down so Sean, Dan
and I could not update the bug. But I got r= from Sean and sr=from dan
over AIM.
Srilatha
Updated•24 years ago
|
Attachment #52924 -
Flags: superreview+
Updated•24 years ago
|
Attachment #52924 -
Flags: needs-work+
| Assignee | ||
Comment 18•24 years ago
|
||
| Assignee | ||
Updated•24 years ago
|
Attachment #52924 -
Attachment is obsolete: true
Attachment #52924 -
Flags: superreview+
Attachment #52924 -
Flags: review+
| Assignee | ||
Updated•24 years ago
|
Attachment #52861 -
Attachment is obsolete: true
| Assignee | ||
Updated•24 years ago
|
Attachment #52860 -
Attachment is obsolete: true
| Assignee | ||
Updated•24 years ago
|
Attachment #53073 -
Attachment is obsolete: true
| Assignee | ||
Updated•24 years ago
|
Attachment #53079 -
Attachment is obsolete: true
| Assignee | ||
Updated•24 years ago
|
Attachment #53112 -
Flags: superreview+
Attachment #53112 -
Flags: review+
| Assignee | ||
Comment 19•24 years ago
|
||
The last patch attachment 53112 [details] [diff] [review] is the one I got r and sr from Sean and Dan.
This is checked into 0.9.4 branch
Updated•24 years ago
|
Whiteboard: [PDT+] → [PDT+] [Fix on 094 branch]
Comment 20•24 years ago
|
||
Fixed in 0.9.4 branch
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Updated•21 years ago
|
Product: MailNews → Core
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•