diff --git a/ChangeLog b/ChangeLog index 369a7ead78..576521e48e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2008-01-06 Sven Neumann + + * 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. + 2008-01-06 Sven Neumann * configure.in: applied patch from Matt Smith that adds a diff --git a/configure.in b/configure.in index c30620ab04..4c3d7d7070 100644 --- a/configure.in +++ b/configure.in @@ -944,6 +944,15 @@ fi AM_CONDITIONAL(TOOLBOX_MENU, test "x$enable_toolbox_menu" = "xyes") +############ +# MIME types +############ + +# The list of MIME types that are supported by plug-ins that are compiled +# unconditionally: +MIME_TYPES="application/postscript;application/pdf;image/bmp;image/g3fax;image/gif;image/x-fits;image/pcx;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-psd;image/x-sgi;image/x-tga;image/x-xbitmap;image/x-xwindowdump;image/x-xcf;image/x-compressed-xcf" + + ################### # Check for libtiff ################### @@ -968,11 +977,15 @@ AC_ARG_WITH(libtiff, [ --without-libtiff build without TIFF support]) fi if test "x$with_libtiff" != xno && test -z "$LIBTIFF"; then - AC_MSG_ERROR([ + AC_MSG_ERROR([ *** Checks for TIFF libary failed. You can build without it by passing *** --without-libtiff to configure but you won't be able to use TIFFs then.]) fi + if test "x$have_libtiff" = xyes; then + MIME_TYPES="$MIME_TYPES;image/tiff" + fi + AC_SUBST(TIFF_LOAD) AC_SUBST(TIFF_SAVE) AC_SUBST(LIBTIFF) @@ -1013,11 +1026,15 @@ AC_ARG_WITH(libjpeg, [ --without-libjpeg build without JPEG support]) fi if test "x$with_libjpeg" != xno && test -z "$LIBJPEG"; then - AC_MSG_ERROR([ + AC_MSG_ERROR([ *** Checks for JPEG library failed. You can build without it by passing *** --without-libjpeg to configure but you won't be able to use JPEGs then.]) fi + if test "x$jpeg_ok" = xyes; then + MIME_TYPES="$MIME_TYPES;image/jpeg" + fi + AM_CONDITIONAL(BUILD_JPEG, test "x$jpeg_ok" = xyes) AC_SUBST(LIBJPEG) @@ -1047,6 +1064,10 @@ if test -z "$LIBZ"; then [have_zlib="no (ZLIB library not found)"]) fi +if test "x$have_zlib" = xyes; then + MIME_TYPES="$MIME_TYPES;image/x-psd" +fi + AC_SUBST(LIBZ) AC_SUBST(PSP) @@ -1068,6 +1089,10 @@ if test "x$with_libpng" != xno; then *** --without-libpng to configure but you won't be able to use PNGs then.])]) fi +if test "x$have_libpng" = xyes; then + MIME_TYPES="$MIME_TYPES;image/png;image/x-icon" +fi + AC_SUBST(PNG) AC_SUBST(LIBPNG) @@ -1159,6 +1184,10 @@ fi CFLAGS="$gimp_save_CFLAGS" LDFLAGS="$gimp_save_LDFLAGS" +if test "x$have_libxpm" = xyes; then + MIME_TYPES="$MIME_TYPES;image/x-xpixmap" +fi + AC_SUBST(XPM) AC_SUBST(LIBXPM) @@ -1200,6 +1229,10 @@ else have_librsvg="no (librsvg support disabled)" fi +if test "x$have_librsvg" = xyes; then + MIME_TYPES="$MIME_TYPES;image/svg+xml" +fi + AC_SUBST(SVG) AC_SUBST(LIBSVG) @@ -1336,6 +1369,11 @@ if test "x$WMF_CONFIG" != "xno" ; then else have_libwmf="no (libwmf not found)" fi + +if test "x$have_libwmf" = xyes; then + MIME_TYPES="$MIME_TYPES;image/x-wmf" +fi + AC_SUBST(LIBWMF) AC_SUBST(WMF_CFLAGS) AC_SUBST(WMF) @@ -1614,7 +1652,7 @@ AM_CONDITIONAL(BUILD_PYTHON, test "x$enable_python" != xno) ######################################### -# Check whether script_fu should be built +# Check whether Script-Fu should be built ######################################### have_script_fu=yes @@ -1716,7 +1754,7 @@ AM_CONDITIONAL(ENABLE_GTK_DOC_APP, test "x$enable_gtk_doc_app" = xyes) ######################################### -# Allow to configure the gimp environment +# Allow to configure the GIMP environment ######################################### AC_ARG_ENABLE(default-binary, [ --enable-default-binary install this as the default gimp binary (default=gimp_stable)], , enable_default_binary=gimp_stable) @@ -1775,6 +1813,8 @@ AM_CONDITIONAL(STATICLIBS, test "x$enable_static" = xyes) GIMP_MKENUMS="\$(PERL) \$(top_srcdir)/tools/gimp-mkenums" AC_SUBST(GIMP_MKENUMS) +AC_SUBST(MIME_TYPES) + ######################### # Disable deprecated APIs @@ -1983,9 +2023,7 @@ data/palettes/Makefile data/patterns/Makefile data/tips/Makefile desktop/Makefile -desktop/gimp.applications desktop/gimp.desktop.in -desktop/gimp.keys etc/Makefile m4macros/Makefile po/Makefile.in diff --git a/desktop/Makefile.am b/desktop/Makefile.am index 974b2456bf..6deecf9f78 100644 --- a/desktop/Makefile.am +++ b/desktop/Makefile.am @@ -9,12 +9,6 @@ if DESKTOP_DATADIR applicationsdir = $(DESKTOP_DATADIR)/applications applications_DATA = $(desktop_files) -mimeinfodir = $(DESKTOP_DATADIR)/mime-info -mimeinfo_DATA = gimp.keys - -registrydir = $(DESKTOP_DATADIR)/application-registry -registry_DATA = gimp.applications - icons16dir = $(DESKTOP_DATADIR)/icons/hicolor/16x16/apps icons16_DATA = 16x16/gimp.png @@ -46,9 +40,7 @@ endif EXTRA_DIST = \ - gimp.applications.in \ gimp.desktop.in.in \ - gimp.keys.in \ 16x16/gimp.png \ 22x22/gimp.png \ 24x24/gimp.png \ diff --git a/desktop/gimp.applications.in b/desktop/gimp.applications.in deleted file mode 100644 index 70d04b2a13..0000000000 --- a/desktop/gimp.applications.in +++ /dev/null @@ -1,9 +0,0 @@ -gimp - command=@GIMP_COMMAND@ - name=GNU Image Manipulation Program - can_open_multiple_files=true - expects_uris=non-file - requires_terminal=false - supported_uri_schemes=file,http,ftp - mime_types=image/bmp,image/g3fax,image/gif,image/jpeg,image/png,image/tiff,image/x-bmp,image/x-compressed-xcf,image/x-pcx,image/x-png,image/x-portable-anymap,image/x-portable-bitmap,image/x-portable-graymap,image/x-portable-pixmap,image/x-psd,image/x-sun-raster,image/x-tga,image/x-xbitmap,image/x-xcf,image/x-xpixmap,image/x-xwindowdump - diff --git a/desktop/gimp.desktop.in.in b/desktop/gimp.desktop.in.in index 2c6bcc59fa..9595ee42c8 100644 --- a/desktop/gimp.desktop.in.in +++ b/desktop/gimp.desktop.in.in @@ -16,4 +16,4 @@ X-GNOME-Bugzilla-Component=General X-GNOME-Bugzilla-Version=@GIMP_VERSION@ X-GNOME-Bugzilla-OtherBinaries=gimp-@GIMP_APP_VERSION@ StartupNotify=true -MimeType=image/bmp;image/g3fax;image/gif;image/jpeg;image/jpg;image/pjpeg;image/png;image/tiff;image/x-bmp;image/x-compressed-xcf;image/x-fits;image/x-gray;image/x-pcx;image/x-png;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-psd;image/x-sgi;image/x-sun-raster;image/x-tga;image/x-xbitmap;image/x-xcf;image/x-xpixmap;image/x-xwindowdump; +MimeType=@MIME_TYPES@ diff --git a/desktop/gimp.keys.in b/desktop/gimp.keys.in deleted file mode 100644 index 6aee100de4..0000000000 --- a/desktop/gimp.keys.in +++ /dev/null @@ -1,25 +0,0 @@ -# also image/x-bmp -image/bmp -image/g3fax -image/gif -image/jpeg -# also image/x-png -image/png -image/tiff -# also image/bmp -image/x-bmp -image/x-compressed-xcf -image/x-pcx -# also image/png -image/x-png -image/x-portable-anymap -image/x-portable-bitmap -image/x-portable-graymap -image/x-portable-pixmap -image/x-psd -image/x-sun-raster -image/x-tga -image/x-xbitmap -image/x-xcf -image/x-xpixmap -image/x-xwindowdump diff --git a/plug-ins/psd/psd.c b/plug-ins/psd/psd.c index 052e8cd24c..fe34e22f0c 100644 --- a/plug-ins/psd/psd.c +++ b/plug-ins/psd/psd.c @@ -157,7 +157,7 @@ query (void) save_args, NULL); gimp_register_save_handler (SAVE_PROC, "psd", ""); - gimp_register_file_handler_mime (SAVE_PROC, "image/psd"); + gimp_register_file_handler_mime (SAVE_PROC, "image/x-psd"); #endif /* PSD_SAVE */ }