After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 326878 - only return applications that handle the most specific MIME type
only return applications that handle the most specific MIME type
Status: RESOLVED WONTFIX
Product: gnome-vfs
Classification: Deprecated
Component: MIME and file/program mapping
2.12.x
Other All
: Normal normal
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2006-01-13 17:56 UTC by Daniel Leidert
Modified: 2008-09-06 19:07 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12



Description Daniel Leidert 2006-01-13 17:56:10 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.
Comment 1 Alexander Larsson 2006-01-16 08:42:03 UTC
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.
Comment 2 Stanislav Brabec 2006-01-16 13:08:36 UTC
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...
Comment 3 Daniel Leidert 2006-01-16 15:34:29 UTC
> 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
Comment 4 André Klapper 2008-09-06 19:07:59 UTC
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