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

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Feb 26 01:47:29 CST 2011


http://bugs.winehq.org/show_bug.cgi?id=25166

--- Comment #17 from Damjan Jovanovic <damjan.jov at gmail.com> 2011-02-26 01:47:19 CST ---
Created an attachment (id=33454)
 --> (http://bugs.winehq.org/attachment.cgi?id=33454)
Group by application

Here's a patch that groups all extensions/MIME types under one application. It
looks very promising, however I've uncovered a problem:

Currently we open files by ProgID that's written into the .desktop file. By
grouping multiple file types into the same desktop file, even when their
original ProgIDs are different, we are going to open some of them with the
wrong ProgID, but with the right application. I thought this didn't matter - I
thought an application can't see which ProgID it was opened with - but
apparently it does: opening a .dev file with Dev-C++ under the wrong ProgID of
DevCpp.c causes it to display the .dev file contents, whereas using the right
ProgID doesn't display the .dev file contents. Hence using the wrong ProgID has
unpredictable consequences.

Only zero or one ProgIDs can be stored in a .desktop file. Multiple .desktop
files, one per ProgID, is exactly what we have now.

I suppose the best options is to have Wine's start.exe determine the
Freedesktop MIME type the same way that Freedesktop does (the xdg-mime command
could provide that), and then a lookup table mapping MIME type to ProgID
somewhere in the registry could be consulted for the Wine ProgID to use. The
xdg-mime tool is somewhat out of date (it attempts to call the gnomevfs-info
tool which is no longer installed in Ubuntu) so this will also take some work
with Ubuntu/Portland utils/Gnome.

-- 
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