Skip to content

Commit

Permalink
compile a list of MIME types that GIMP can read.
Browse files Browse the repository at this point in the history
2008-01-06  Sven Neumann  <[email protected]>

	* 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.


svn path=/trunk/; revision=24550
  • Loading branch information
Sven Neumann authored and Sven Neumann committed Jan 6, 2008
1 parent b67f887 commit b95be71
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 50 deletions.
14 changes: 14 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
2008-01-06 Sven Neumann <[email protected]>

* 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 <[email protected]>

* configure.in: applied patch from Matt Smith that adds a
Expand Down
50 changes: 44 additions & 6 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
###################
Expand All @@ -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)
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand All @@ -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)

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions desktop/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand Down
9 changes: 0 additions & 9 deletions desktop/gimp.applications.in

This file was deleted.

2 changes: 1 addition & 1 deletion desktop/gimp.desktop.in.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@
25 changes: 0 additions & 25 deletions desktop/gimp.keys.in

This file was deleted.

2 changes: 1 addition & 1 deletion plug-ins/psd/psd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
}

Expand Down

0 comments on commit b95be71

Please sign in to comment.