[Bug 25166] Multiple mime type handling registered for different file extensions

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Nov 20 09:05:59 CST 2011


--- Comment #22 from Damjan Jovanovic <damjan.jov at gmail.com> 2011-11-20 09:05:59 CST ---
(In reply to comment #21)
> (In reply to comment #17)
> Damjan, I don't understand why we can only store one progid per desktop file.
> Where are the progids currently stored?
> Why can't we have something like..
> X-Wine-ProgID=application/x-wine-extension-001:progid1;application/x-wine-extension-002:progid2;
> etc

Fd.o first recognizes the file's MIME type, then the application registered for
that MIME type is launched with the given file(s). If the application is
registered with multiple MIME types, it has no idea which MIME type it was
launched for.

Windows checks the extension. The ProgID registered for that extension is
found. The application listed under that ProgID is launched, and this
application knows which ProgID it was launched for.

Currently we correctly emulate Window's behavior. If multiple extension list
the same ProgID, we do de-duplicate them down to just ONE entry: you only have
a wine-extension-jpe.desktop, and not also a wine-extension-jpeg.desktop and
wine-extension-jpg.desktop, because all 3 of those extensions have the same
"jpegfile" ProgID. But if you right-click a JPEG file, you'll see another entry
from Wine, and that's from wine-extension-jfif.desktop, which has a different
ProgID of "pjpegfile".

You want to de-duplicate ProgIDs down to the application. This is particularly
difficult. Different ProgID entries could use different command line options,
in which case we can't merge them, since the .desktop file only allows ONE
command line. Even if we don't merge them in that case, but only merge them
when the entire command line matches, like I mentioned earlier, the Windows
application knows which ProgID it was launched for, and we have no idea which
MIME type fd.o launched us for, so we have to guess...

Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the wine-bugs mailing list