GNOME Bugzilla – Bug 507318
generate the list of supported MIME types for gimp.desktop
Last modified: 2008-10-30 20:07:58 UTC
Please describe the problem: Gimp also supports opening "image/svg+xml" (svg) files, would be interesting include it to desktop file for allowing, for example, launch gimp from eog when a svg file is opened Thanks a lot Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information:
Created attachment 102144 [details] [review] gimp-desktop.patch
Actually, this file should be generated during the build or perhaps even at run-time. The file plug-ins register the MIME types they can handle. So it should be possible to create a proper gimp.desktop file from that information.
Adding image/svg+xml unconditionally would be wrong since the SVG import plug-in is optional and may not be available on all installations. We definitely need to come up with a better solution. I am changing the summary accordingly.
OK, thanks for info
As the list of supported MIME types may change when additional file plug-ins are installed or file plug-ins are removed, the best solution would be to somehow register the mime-types at run-time. But this needs support from the desktop. As far as I know there is discussion about adding such a feature. But as long as that hasn't happened, the best we can do is to go for a compile-time solution. I see two options here: (1) Compile a special executable that queries all compiled file plug-ins for their MIME types or alternatively run the compiled gimp executable in a special mode that does this job. (2) Let the configure script construct the list of MIME types. Option 1 will cause problems for cross-compilations. Option 2 is somewhat inelegant as we need to duplicate the MIME type information in the configure script. Still, it looks like the easier solution.
2008-01-06 Sven Neumann <sven@gimp.org> * configure.in: compile a list of MIME types that GIMP can read. * desktop/gimp.desktop.in.in: use the list of MIME types as compiled by the configure script. Fixes bug #507318. * desktop/Makefile.am * desktop/gimp.applications.in * desktop/gimp.keys.in: removed, the gimp.application and gimp.keys files are obsolete. * plug-ins/psd/psd.c (MAIN): corrected MIME type in unused code.
Thanks a lot for the fast fix :-)