Open Bug 397699 Opened 17 years ago Updated 2 years ago

Implement application selector (nsIMIMEInfo.possibleLocalHandlers) for Mac

Categories

(Firefox :: File Handling, enhancement, P3)

PowerPC
macOS
enhancement

Tracking

()

People

(Reporter: dmosedale, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [proto])

This is the mac version of bug 348808.
Flags: blocking1.9?
Requesting [wanted-1.9].
What timeline are we looking for? Beta? Or can this be done post-beta.

And just to be clear, this is not a UI bug, it's for implementing getting the list of applications able to handle a specified mime type?
Flags: blocking1.9? → blocking1.9-
Whiteboard: [wanted-1.9]
Colin - yes, mime-type or file extension, whichever mac works with. This is similar to Finder's "open with" context menu.

Also note, bug 400852 - we'll be adding protocol app picker support at some point.
(In reply to comment #3)
> Colin - yes, mime-type or file extension, whichever mac works with. This is
> similar to Finder's "open with" context menu.

I'll look into at least the API to use. This *is* on my radar.
Alright, so I looked at what you'd need to write this morning. Here's roughly what it would look like (memory management ignored):

CFStringRef uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, someMimeType, CFSTR("public.data") /* hint since we're looking for files here */);
CFArrayRef handlers = LSCopyAllRoleHandlersForContentType(uti, kLSRolesAll /* might want to be more restrictive? */)

and then convert that to whatever array type we need. Documentation at these two links:

http://developer.apple.com/documentation/Carbon/Reference/LaunchServicesReference/Reference/reference.html#//apple_ref/c/func/LSCopyKindStringForMIMEType
http://developer.apple.com/documentation/Carbon/Conceptual/understanding_utis/understand_utis.tasks/chapter_3_section_3.html#//apple_ref/doc/uid/TP40001319-CH203-DontLinkElementID_8

Blocks: 404434
Re-requesting blocking-1.9+, as it turns out this blocks bug 404434, and that already has blocking-1.9+.
Flags: blocking1.9-
Whiteboard: [wanted-1.9] → [wanted-1.9][proto]
Whiteboard: [wanted-1.9][proto] → [wanted-1.9] [proto]
Flags: blocking1.9?
+'ing with P3.
Flags: blocking1.9? → blocking1.9+
Priority: -- → P3
Flags: wanted1.9+
Whiteboard: [wanted-1.9] [proto] → [proto]
Adding Josh ...
Flags: tracking1.9+ → wanted-next+
Blocks: 348808
No longer depends on: 348808
Product: Core → Firefox
Version: Trunk → unspecified
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.