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 507318 - generate the list of supported MIME types for gimp.desktop
generate the list of supported MIME types for gimp.desktop
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Data
2.4.x
Other All
: Normal enhancement
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2008-01-04 18:46 UTC by Pacho Ramos
Modified: 2008-10-30 20:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gimp-desktop.patch (1.20 KB, patch)
2008-01-04 18:46 UTC, Pacho Ramos
rejected Details | Review

Description Pacho Ramos 2008-01-04 18:46:19 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:
Comment 1 Pacho Ramos 2008-01-04 18:46:39 UTC
Created attachment 102144 [details] [review]
gimp-desktop.patch
Comment 2 Sven Neumann 2008-01-04 18:57:06 UTC
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.
Comment 3 Sven Neumann 2008-01-04 19:01:35 UTC
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.
Comment 4 Pacho Ramos 2008-01-04 23:57:49 UTC
OK, thanks for info
Comment 5 Sven Neumann 2008-01-06 12:51:18 UTC
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.
Comment 6 Sven Neumann 2008-01-06 13:57:13 UTC
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.

Comment 7 Pacho Ramos 2008-01-06 15:07:58 UTC
Thanks a lot for the fast fix :-)