GNOME Bugzilla – Bug 326878
only return applications that handle the most specific MIME type
Last modified: 2008-09-06 19:07:59 UTC
Please describe the problem: To describe the problem, I will use the application/bluefish-project MIME type [1][2] as example. You can read the whole discussion at gnome-vfs mailing list [3]. application/bluefish-project is only correctly found if I make it a sub-class of the text/plain MIME type. But then the "Open with" menu and tab list bluefish (handles application/bluefish-project MIME type) _and_ text editors (handle text/plain MIME type). But the text editors cannot handle this type of file properly. So this currently breakes the handling of several MIME types (e.g. almost all chemical/* MIME types, which are all text/plain files). In the above thread it was suggested to maybe change gnome_vfs_mime_get_all_desktop_entries() to sort its return list in the order of the mimetype hierarchy and IMHO only the applications which can handle the most specific MIME type should be returned. [1] bluefish MIME type declaration file for the shard-mime-info db: http://cvs.sourceforge.net/viewcvs.py/bluefish/bluefish-gtk2/data/bluefish.xml?rev=1.3&view=aut [2] bluefish .desktop file: http://cvs.sourceforge.net/viewcvs.py/bluefish/bluefish-gtk2/data/bluefish-project.desktop.in?rev=1.1&view=auto [3] http://mail.gnome.org/archives/nautilus-list/2006-January/msg00043.html Steps to reproduce: 1. Right click on a bluefish-project file 2. Read the "Open with" menu 3. Read the "Open with" tab Actual results: you will see list of text-editors and bluefish Expected results: only see bluefish, because these files are project files special to this application and not thought to be handled as pure text/plain files Does this happen every time? yes Other information: I'm using a recent Debian Sid with libgnomevfs2-0 2.12.2. If you need more infos, please let me know.
I don't think only returning the handlers for most specific mimetype is right at all (it makes the whole inheritance setup in mime useless). However, it should return the handler for the most specific mimetype as the default one.
Maybe it would be nice to add a sub-menu Related application for less-specific MIME types (with description of related file type in parantheses): Example for html file: Open with Default web browser Open with -> Web browser 1 Web browser 2 Bluefish Related application -> Text editor 1 (Plain text) Text editor 2 (Plain text) --------- Other application...
> I don't think only returning the handlers for most specific mimetype is right > at all [..] I do not agree. The "Desktop Entry Specification" states, that the MimeType-filed should "the MIME type(s) supported by this entry.". This implicates, that all MIME Types and not only the most specific MIME types should be listed there. Listing only sub-lasses is then a violation (bug) of the specification. I would still recommend to only list the applications which can handle the listed MIME types and not applications, which can list the top-level MIME types. For text/xml you also do not list text/plain editors. Regards, Daniel
gnome-vfs has been deprecated and superseded by gio/gvfs since GNOME 2.22, hence mass-closing many of the gnome-vfs requests/bug reports. This means that gnome-vfs is NOT actively maintained anymore, however patches are still welcome. If your reported issue is still valid for gio/gvfs, please feel free to file a bug report against glib/gio or gvfs. @Bugzilla mail recipients: query for gnome-vfs-mass-close to get rid of these notification emails all together. General further information: http://en.wikipedia.org/wiki/GVFS Reasons behind this decision are listed at http://www.mail-archive.com/gnome-vfs-list@gnome.org/msg00899.html