Closed Bug 619718 Opened 14 years ago Closed 14 years ago

-setDefaultMail does not set Thunderbird as default mail client

Categories

(Thunderbird :: OS Integration, defect)

defect
Not set
normal

Tracking

(thunderbird3.1 .8-fixed)

RESOLVED FIXED
Tracking Status
thunderbird3.1 --- .8-fixed

People

(Reporter: fooraide, Assigned: rain1)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_5; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.19 Safari/534.13
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13; Gecko/20101207 Thunderbird 3.1.7

Under Windows XP, fresh install of Thunderbird 3.1.7 through commandline (with argument -ms), I am unable to set Thunderbird as default mail client with the command:
"%programfiles%\Mozilla Thunderbird\thunderbird.exe" -silent -setDefaultMail

I'd expect that command to work as documented on the wiki:
https://developer.mozilla.org/en/Command_Line_Options#-setDefaultMail

Reproducible: Always

Steps to Reproduce:
1. Have a different email client to be set as default (e.g, outlook)
2. Install thunderbird 3.1.7, do not check the option to set it as default if using the GUI / or install using command line and argument "-ms"
3. Hit Start -> Run, then: "%programfiles%\Mozilla Thunderbird\thunderbird.exe" -silent -setDefaultMail
4. Open Thunderbird
Actual Results:  
Thunderbird complains that it is not default and asks if you want it to be set as default

Expected Results:  
Thunderbird should be set as default

Context: Automated deployment of thunderbird on a high number of workstations.

Once firefox is installed in command line with the "-ms" argument, if I run:
"%programfiles%\Mozilla Firefox\firefox.exe" -silent -setDefaultBrowser

Firefox is set as default browser properly.
According to https://mxr.mozilla.org/comm-central/source/mail/components/shell/nsSetDefaultMail.js we should be setting the pref.

do you see anything on the command line prompt if you add the -console flag ?
One more question did this work in 3.0 and 2.0 ?
I am out of the office until wednesday so I'll test with the -console option and report then.

I am unaware as to wether or not it worked in previous versions, Thunderbird is a relatively new standard for us.

Thanks for your interest,
I've tested on a Windows XP workstation I have on hand and what I am getting by adding the -console option is:

Warning: unrecognized command line flag -setDefaultMail
Status: UNCONFIRMED → NEW
Ever confirmed: true
Looking: from what it seems trunk works fine but 3.1 simply doesn't have that component (Components.classes["@mozilla.org/mail/default-mail-clh;1"] is undefined).
Assignee: nobody → sid.bugzilla
Attached patch fix (1.9.2 only)Splinter Review
Yeah. nsSetDefaultMail.js wasn't in the components whitelist (components/components.list). EXTRA_COMPONENTS automatically gives us that.

This has been fixed on trunk, so the patch is 1.9.2 only.
Attachment #498981 - Flags: review?(bugzilla)
Attachment #498981 - Flags: approval-thunderbird3.1.8?
Comment on attachment 498981 [details] [diff] [review]
fix (1.9.2 only)

>diff --git a/mail/components/shell/Makefile.in b/mail/components/shell/Makefile.in

>-CXXFLAGS += $(TK_CFLAGS)

I'm not sure this bit is intentional, however, if it is safe to remove, I don't mind it being removed.

So r+a=Standard8 with either push-to-try first to verify removing that CXXFLAGS is fine, or not removing it in the patch that's pushed to 1.9.2.

If it can be removed, then we should think about it on trunk as well.

Thanks for finding this.
Attachment #498981 - Flags: review?(bugzilla)
Attachment #498981 - Flags: review+
Attachment #498981 - Flags: approval-thunderbird3.1.8?
Attachment #498981 - Flags: approval-thunderbird3.1.8+
Oops, that wasn't intentional, and it'll probably be required on Linux.

I've pushed the fixed patch:
https://hg.mozilla.org/releases/comm-1.9.2/rev/36a5cfd5ccca
Status: NEW → RESOLVED
Closed: 14 years ago
OS: Windows XP → All
Hardware: x86 → All
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: