Closed Bug 322808 Opened 19 years ago Closed 19 years ago

Can not launch my own extension using the "-chrome" option.

Categories

(Thunderbird :: General, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird2.0

People

(Reporter: pagalmes, Assigned: mscott)

Details

(Keywords: fixed1.8.0.4, fixed1.8.1)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7 Build Identifier: Thunderbird-1.5rc2, official : version 1.5 (20051201) With firefox, we can use the "-chrome" option to launch our extensions, while developping and also for automation purposes (scripting some actions). For example : "firefox -chrome chrome://browser/content" or "firefox -chrome chrome://MyApp/content" For Thunderbird 1.5, this does not work... > "thunderbird -chrome chrome://messenger/content" > Warning: unrecognized command line flag -chrome This is a pity, as it was onr of the nice features of Mozilla to be able to launch it in a scriptable way. Reproducible: Always Steps to Reproduce: 1. "thunderbird -chrome chrome://messenger/content" 2. 3. Actual Results: "Warning: unrecognized command line flag -chrome" Expected Results: Launch of the package called
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → Thunderbird2.0
You should be able to easily work around this by implementing a command line handler interface inside your extension. Then you can just invoke thunderbird with something like: thunderbird.exe -doOurMigration where your command line handler handles "-doOurMigration" and invokes your migration chrome. I did this for our RSS module already and you can copy most of it: http://lxr.mozilla.org/mozilla1.8/source/mail/extensions/newsblog/js/newsblog.js#253
Severity: enhancement → normal
Thanks for the workaround !
Please keep me posted if you get around this issue with my work around.
I will give you info about how we do progress on this point.
Attached patch a fix (deleted) — Splinter Review
this patch adds -chrome command line handling support to Thunderbird.
Attachment #218869 - Flags: superreview?(benjamin)
(In reply to comment #5) > Created an attachment (id=218869) [edit] > a fix > > this patch adds -chrome command line handling support to Thunderbird. Cool ! Thanks a lot :-)
Bob's automated testing work should benefit from this change as well.
Comment on attachment 218869 [details] [diff] [review] a fix We could probably move this code into nsDefaultCLH.js so that all XULRunner apps would recognize -chrome... except hrm, maybe that's not a good thing, need to think that through.
Attachment #218869 - Flags: superreview?(benjamin) → superreview+
Comment on attachment 218869 [details] [diff] [review] a fix low risk fix, that helps a large enterprise deployment of Thunderbird.
Attachment #218869 - Flags: approval1.8.0.3?
Pierre, it'd be great if you could try this out and see how it works for you in tomorrow's nightly Thunderbird 2 nightly build: ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-mozilla1.8.0 make sure the build is dated 04/22 or later.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-mozilla1.8.0 is still Thunderbird 1.5.0.x, you meant ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-mozilla1.8, right? Is this something that could make it on the 1.8.0 branch to simplify testing in the future?
yes I meant: ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-mozilla1.8 I get trigger happy with the zeroes. Good catch Bob.
Comment on attachment 218869 [details] [diff] [review] a fix approved for 1.8.0 branch, a=dveditz for drivers
Attachment #218869 - Flags: approval1.8.0.3? → approval1.8.0.3+
(In reply to comment #10) > Pierre, it'd be great if you could try this out and see how it works for you in > tomorrow's nightly Thunderbird 2 nightly build: > > ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-mozilla1.8.0 > > make sure the build is dated 04/22 or later. I downloaded it. I will try to test it during the week (sorry not to be responsive).
Bob, does this patch work for you with your automated testing scripts now?
(In reply to comment #15) I can launch a chrome app successfully in thunderbird 2 and 3 on windows. Is this something I can get on 1.8.0.x? If 1.8.0.3 is possible that would be very nice since it would allow me to use the same code on 1.8.0.x, 1.8.x, 1.9.
I was looking for QA support (which you just gave me) to make sure the change worked for you before landing on the 1.8.0 branch.
sorry it took me so long to give you the answer. I meant to get to it before now and was planning on tonight, but should have done it earlier. /me smacks me with a wet trout.
excellent. Patch landed for 1.8.0.4. Pierre, it would still help if you could confirm that the fix is working on your end as well.
Keywords: fixed1.8.0.4
(In reply to comment #19) > Patch landed for 1.8.0.4. Pierre, it would still help if you could confirm that > the fix is working on your end as well. The following works for me. I put some commands for those who may need them : Launching the global thunderbird : ./thunderbird -chrome chrome://messenger/content/ Launching the composer windows (to write mails) : ./thunderbird -chrome chrome://messenger/content/messengercompose/messengercompose.xul Launching the adressbook : ./thunderbird -chrome chrome://messenger/content/addressbook/addressbook.xul Launching the "about:config" windows : ./thunderbird -chrome chrome://global/content/config.xul Launching my own extension : ./thunderbird -chrome chrome://foo/content/foo/foo.xul Really great, it works, at list on Linux !!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: