Closed
Bug 234541
Opened 21 years ago
Closed 20 years ago
Handle command line urls
Categories
(Thunderbird :: Mail Window Front End, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird1.1
People
(Reporter: mscott, Assigned: mscott)
References
Details
(Whiteboard: fixed-aviary-1.0)
Attachments
(4 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
You should be able to invoke thunderbird with just a url (could be mailto, news,
snews, etc) without passing in a commmand line handler.
this would help OSX properly load thunderbird when the user clicks on a mailto
url since the apple event always looks like:
./thunderbird-bin <url>
(FYI, on windows, we write the following key to the registry:
thunderbird -compose <url>
which does work today)
See Bug #228484 for more details about the mac problems this bug causes.
Assignee | ||
Updated•21 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → Thunderbird0.6
Assignee | ||
Comment 1•21 years ago
|
||
Some more polish work needs to happen here but you get the idea.
Don, you want to try this patch on your mac build? It should make things work
if thunderbird is already running and you click on a mailto url. i.e. the apple
event entry path. Not sure if it works for
./thunderbird-bin mailto:test.com
so try that too.
Updated•21 years ago
|
OS: Windows XP → MacOS X
Hardware: PC → Macintosh
Comment 2•21 years ago
|
||
*** Bug 221077 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 3•21 years ago
|
||
I checked this into the 0.6 branch. It still needs to land in the trunk in some
form so I'll leave it open.
Feel free to verify in 0.6:
http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-0.6/
Target Milestone: Thunderbird0.6 → Thunderbird0.7
Assignee | ||
Comment 4•20 years ago
|
||
this ports the same fix to the aviary 1.0 branch but with Thunderbird ifdefs
wrapped around the new code to ensure we don't break firefox with our new
behavior.
Assignee | ||
Comment 5•20 years ago
|
||
I just ported this to the 1.0 branch. leaving open and moving out so we can
figure out what to do on the trunk.
Target Milestone: Thunderbird0.7 → Thunderbird0.9
Comment 6•20 years ago
|
||
This will also be an issue for GNOME. I'd like to not put -compose in the
command string that's associated with mailto: because for the firefox 'Read
Mail' button I'd like to just invoke the mailto handler with no URL. If that
includes -compose, it will bring up an empty compose window.
Assignee | ||
Updated•20 years ago
|
Whiteboard: fixed-aviary-1.0
Assignee | ||
Updated•20 years ago
|
Target Milestone: Thunderbird0.9 → Thunderbird1.1
Assignee | ||
Comment 7•20 years ago
|
||
*** Bug 291373 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 8•20 years ago
|
||
cc'ing the toolkit guys to help figure out what the right thing to do here is
for the trunk.
The patch I made for the 1.0 branch that is shown here gets the apple event and
instead of calling OpenBrowserWindow, actually acts like the xremote service and
trys to 'open' the url, letting any open window that is registered for the
content type of the url handle it instead of forcing it into a browser window.
Comment 9•20 years ago
|
||
Since tbird is now in charge of handling its own commandline args in
nsMailDefaultHandler.js, this shouldn't be too hard. See my comment at
http://lxr.mozilla.org/mozilla/source/mail/components/nsMailDefaultHandler.js#216
Assignee | ||
Comment 10•20 years ago
|
||
so maybe we just need to make sure the apple events end up going through this
and then modify it to handle the asynch call to openURI and hopefully all will
be well.
Assignee | ||
Comment 11•20 years ago
|
||
on the trunk the apple events are still trying to create a browser instance
instead of going through the new command line handling code so we need to start
poking there first, getting it to go through nsMailDefaultHandler.js.
Assignee | ||
Comment 12•20 years ago
|
||
when the app is already running the apple event ends up triggering:
http://lxr.mozilla.org/mozilla/source/toolkit/xre/nsCommandLineServiceMac.cpp#293
which is still hard coded to look for navigator.xul instead of just trying to
open the URL.
Assignee | ||
Comment 13•20 years ago
|
||
this simple change fixes the case where we receive an apple event (i.e.
thunderbird is alread running) in nsCommandLineServicesMac::HandleEvent.
we set browser.chrome to the url for messengercompose.xul. Now HandleEvent
creates our chrome instead of trying to bring up navigator.xul.
We still aren't opening up a compose window when thunderbird is not already
running. I'm still debugging that.
Assignee | ||
Comment 14•20 years ago
|
||
Mac OS X passes "-url mailto:mscott@mozilla.org" into the command line when you
click on a mailto url in an application when thunderbird is not already
running. So I made the compose window command line handler process url in
addition to -compose (which is what windows passes in). This made the compose
handler jump up and handle the default args instead of flowing through the
default command line handler for mail.
If someone else in mail becomes interested in handling "-url <some url>" then
I'll have to make this change smarter by only trapping -url mailto:some url.
Assignee | ||
Updated•20 years ago
|
Attachment #182204 -
Flags: review?(benjamin)
Assignee | ||
Comment 15•20 years ago
|
||
Comment on attachment 182194 [details] [diff] [review]
fix for the scenario where thunderbird is already running
this fixes the case where thunderbird is already running and we were coming in
through nsCommandLineMacServices::HandleEvent with a url.
Instead of trying to open navigator.xul, use messengercompose.xul which knows
how to handle an argument.
Attachment #182194 -
Flags: review?(benjamin)
Comment 16•20 years ago
|
||
Comment on attachment 182194 [details] [diff] [review]
fix for the scenario where thunderbird is already running
As a hack, this is fine... not ideal, and we should fix it to use the uriloader
at some point soon.
Attachment #182194 -
Flags: review?(benjamin) → review+
Comment 17•20 years ago
|
||
Comment on attachment 182204 [details] [diff] [review]
fix for the scenario where thunderbird is not yet running
Again, we should probably replace this with uriloader calls in
nsMailCommandLineHandler.js, but it's a fine hack.
Attachment #182204 -
Flags: review?(benjamin) → review+
Assignee | ||
Updated•20 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•