remove FOO_DISABLE_DEPRECATED for only glib >= 2.15 and gtk+ >= 2.13, GIMP

2007-09-13  Michael Natterer  <mitch@gimp.org>

	* configure.in: remove FOO_DISABLE_DEPRECATED for only glib >= 2.15
	and gtk+ >= 2.13, GIMP builds fine against the 2.14 and 2.12 APIs
	apart from:

	* app/tools/gimpselectionoptions.c
	* libgimpwidgets/gimphelpui.c: undef GTK_DISABLE_DEPRECATED because
	GtkTooltips is deprecated in gtk+ 2.12.

	* libgimp/gimpui.c
	* plug-ins/common/pat.c: the address of an array is always
	non-NULL, no need to check for that. Fixes new gcc warnings.


svn path=/trunk/; revision=23522
This commit is contained in:
Michael Natterer 2007-09-13 10:44:07 +00:00 committed by Michael Natterer
parent eb8924c0cb
commit ec11dbc1a1
6 changed files with 38 additions and 15 deletions

View File

@ -1,3 +1,17 @@
2007-09-13 Michael Natterer <mitch@gimp.org>
* configure.in: remove FOO_DISABLE_DEPRECATED for only glib >= 2.15
and gtk+ >= 2.13, GIMP builds fine against the 2.14 and 2.12 APIs
apart from:
* app/tools/gimpselectionoptions.c
* libgimpwidgets/gimphelpui.c: undef GTK_DISABLE_DEPRECATED because
GtkTooltips is deprecated in gtk+ 2.12.
* libgimp/gimpui.c
* plug-ins/common/pat.c: the address of an array is always
non-NULL, no need to check for that. Fixes new gcc warnings.
2007-09-12 Øyvind Kolås <pippin@gimp.org>
* app/display/gimpdisplayshell-render.c: (render_image_tile_fault),

View File

@ -18,6 +18,11 @@
#include "config.h"
#ifdef __GNUC__
#warning GTK_DISABLE_DEPRECATED (GtkTooltips)
#endif
#undef GTK_DISABLE_DEPRECATED
#include <gtk/gtk.h>
#include "libgimpconfig/gimpconfig.h"

View File

@ -421,13 +421,13 @@ AM_PATH_GLIB_2_0(glib_required_version, :,
PKG_CHECK_MODULES(GMODULE_NO_EXPORT, gmodule-no-export-2.0)
AC_MSG_CHECKING([if GLib is version 2.13.0 or newer])
if $PKG_CONFIG --atleast-version=2.13.0 glib-2.0; then
have_glib_2_13=yes
AC_MSG_CHECKING([if GLib is version 2.15.0 or newer])
if $PKG_CONFIG --atleast-version=2.15.0 glib-2.0; then
have_glib_2_15=yes
else
have_glib_2_13=no
have_glib_2_15=no
fi
AC_MSG_RESULT($have_glib_2_13)
AC_MSG_RESULT($have_glib_2_15)
dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
gimp_save_LIBS=$LIBS
@ -445,13 +445,13 @@ AM_PATH_GTK_2_0(gtk_required_version, :,
AC_MSG_ERROR(Test for GTK+ failed. See the file 'INSTALL' for help.),
gthread)
AC_MSG_CHECKING([if GTK+ is version 2.11.0 or newer])
if $PKG_CONFIG --atleast-version=2.11.0 gtk+-2.0; then
have_gtk_2_11=yes
AC_MSG_CHECKING([if GTK+ is version 2.13.0 or newer])
if $PKG_CONFIG --atleast-version=2.13.0 gtk+-2.0; then
have_gtk_2_13=yes
else
have_gtk_2_11=no
have_gtk_2_13=no
fi
AC_MSG_RESULT($have_gtk_2_11)
AC_MSG_RESULT($have_gtk_2_13)
PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0 >= gdk_pixbuf_required_version)
@ -1778,11 +1778,11 @@ AC_SUBST(GIMP_MKENUMS)
CPPFLAGS="${CPPFLAGS} -DGIMP_DISABLE_DEPRECATED"
if test "x$have_glib_2_13" != "xyes"; then
if test "x$have_glib_2_15" != "xyes"; then
CPPFLAGS="${CPPFLAGS} -DG_DISABLE_DEPRECATED"
fi
if test "x$have_gtk_2_11" != "xyes"; then
if test "x$have_gtk_2_13" != "xyes"; then
CPPFLAGS="${CPPFLAGS} -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
fi

View File

@ -88,8 +88,7 @@ gimp_ui_init (const gchar *prog_name,
const gchar var_name[] = "GDK_DISPLAY";
#endif
if (var_name)
putenv (g_strdup_printf ("%s=%s", var_name, display_name));
putenv (g_strdup_printf ("%s=%s", var_name, display_name));
}
gtk_init (NULL, NULL);

View File

@ -22,6 +22,11 @@
#include "config.h"
#ifdef __GNUC__
#warning GTK_DISABLE_DEPRECATED (GtkTooltips)
#endif
#undef GTK_DISABLE_DEPRECATED
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>

View File

@ -274,7 +274,7 @@ run (const gchar *name,
if (export == GIMP_EXPORT_EXPORT)
gimp_image_delete (image_ID);
if (description && strlen (description))
if (strlen (description))
{
gimp_image_attach_new_parasite (orig_image_ID, "gimp-pattern-name",
GIMP_PARASITE_PERSISTENT,