Launch Windows app picker dialog if file has no association



17 years ago
2 years ago


(Reporter: bugzilla, Assigned: bugzilla)


(Depends on: 1 bug)

Firefox Tracking Flags

(Not tracked)



(1 attachment)



17 years ago
Bill, what do you think of this change?  (Unlikely that this way of opening
Windows' "What do you want to do with this file?" dialog is documented
officially, but it seems to be all over google.)

Comment 1

17 years ago
Created attachment 72275 [details] [diff] [review]


17 years ago
Hardware: All → PC
Um... does this code ever get hit?  We should not be getting into ShellExecute
unless we found a MIME info for that type based on the registry or something....

Comment 3

17 years ago
(Talked to bz, he understands now what this change is about.)

Nominating for nsbeta1.  This is a really nice-to-have.  To explain more fully,
there's currently a launch button in progress dialogs (and download manager)
that launches the file you've download with its associated application. 
However, if there is no application associated with the file type on your
machine, clicking the button will do nothing.  With this simple patch, clicking
the button will open the standard Windows "What do you want to do?" dialog that
lets you use the application picker to choose the app to open it with.  If for
no other reason than that this is currently useless/broken ui, I think this
should be plussed.
Keywords: nsbeta1

Comment 4

17 years ago
I agree, this should have been part of the feature work for MachV. Is it
feasible to set the association if user picks an app?  cc marlon for UE input,
Keywords: nsbeta1 → nsbeta1+

Comment 5

17 years ago
The dialog has an "Always open with this program" checkbox that sets an 
association (on winxp, at least).

Comment 6

17 years ago
Yes, this looks like a good feature.

I had planned to do likewise while fixing the other bug I have related to this
code (no alert when something goes wrong).  That still needs to be fixed
(although that's a change to the calling code).

If the user is clever, then they'll check the "always use this program box" and
I suppose that's good enough for this case.

There's also the issue of opening this "application picker" dialog when the user
clicks one of the "pick app" buttons on the helper app dialog or helper app pref
panel dialogs.  That can be done (I've now learned) via use of another
undocumented "feature" of the Win32 API.  But that code is also independent of this.
this sounds cool!

related question: how would this work on Mac? or, would we simply tell the
Finder to open the file? just wondering if a separate mac-specific sister bug
should be filed for this...

Comment 8

17 years ago
I don't have a clue how to make this work on mac, sorry. Maybe a mac guy knows
the mac equivalent.

Comment 9

17 years ago
bryner currently has bug #97321 to make an App Picker dialog work for Winders
and *nix.  I've commented in the bug that he can re-assign it to me for Mac
luvin once he lands for those platforms.  Note that letting the user pick any
app to process a file isn't necessarily going to be a Good Thing™
Depends on: 97321

Comment 10

17 years ago
law, can you r=?

Comment 12

17 years ago
Comment on attachment 72275 [details] [diff] [review]


With one caveat.  Can you test whether this works OK for files with blanks in
the path on Win95 and/or Win98?  I'm wondering if we need to enclose the patch
in double quotes?  It worked OK for me on Win2k, but Win2k is better about
dealing with such situations (e.g., you can type "cd c:\Program Files" and it
works).  "cd c:\Program Files" doesn't work on Win98 or Win95.

If you can't test this, then maybe we should just add the quotes anyway?
Attachment #72275 - Flags: review+

Comment 13

17 years ago
I had someone on irc with Windows 98 test it and they said it worked. That's
interesting, because I didn't much expect it to.

Last Resolved: 17 years ago
Resolution: --- → FIXED
i've gone through a bunch of sample/test links, but all of 'em have an
OS-defined association on my win2k machine...okay, except one: (audio/mpeg) --however, when
i clicked this link i just got the helper app dialog with "save to disk"
selected. tested using 2002.03.06.06 comm verif bits.

should this bug be reopened because of this, or is this somehow not a good test?
if it isn't a valid test, could someone pls add a test link which would suffice?

Comment 15

17 years ago
This should be tested by downloading a file without an association and then
choosing Launch in the progress dialog. I don't know where else this can
currently be tested.  I touched the launch function, so any place that uses it
gets this functionality, but anything else is not in my domain.

Comment 16

17 years ago
To reproduce, you can download any file and just save it with some bogus
extension that Windows doesn't know what to do with (it knows nothing of the
original content type at that point).

Saving with any ol' extension maybe be subject to bugs related to that,
vis-a-vis saving web pages, etc., but is easy enough for binary-type files.
blake, bill, thanks for the help!

vrfy'd fixed using 2002.03.11.05 comm bits on win2k.

however, while testing, i ran into an interesting side-issue with the Launch
File button --see bug 130132 for details.
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.