Commit 741854b5 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

define G*_DISABLE_DEPRECATED for all G* modules except GTK+. Don't do so

2004-05-11  Michael Natterer  <mitch@gimp.org>

	* configure.in: define G*_DISABLE_DEPRECATED for all G* modules
	except GTK+. Don't do so if compiling against GLib, GTK+ >= 2.5.0
	and Pango >= 1.5.0

	* libgimpwidgets/gimpoffsetarea.c: s/gdk_gc_unref/g_object_unref/

	* app/config/gimpconfig-deserialize.c
	* app/widgets/gimpdeviceinfo.c:
	s/g_value_set_foo_take_ownership/g_value_take_foo/

	* app/text/gimptext-vectors.c
	* app/text/gimptext-bitmap.c:
	s/pango_ft2_font_get_face/pango_fc_font_lock,unlock_face/
parent 515712f3
2004-05-11 Michael Natterer <mitch@gimp.org>
* configure.in: define G*_DISABLE_DEPRECATED for all G* modules
except GTK+. Don't do so if compiling against GLib, GTK+ >= 2.5.0
and Pango >= 1.5.0
* libgimpwidgets/gimpoffsetarea.c: s/gdk_gc_unref/g_object_unref/
* app/config/gimpconfig-deserialize.c
* app/widgets/gimpdeviceinfo.c:
s/g_value_set_foo_take_ownership/g_value_take_foo/
* app/text/gimptext-vectors.c
* app/text/gimptext-bitmap.c:
s/pango_ft2_font_get_face/pango_fc_font_lock,unlock_face/
2004-05-11 Michael Natterer <mitch@gimp.org>
* app/actions/images-commands.c: added missing #includes.
......
......@@ -716,7 +716,7 @@ gimp_config_deserialize_value_array (GValue *value,
return token;
}
g_value_set_boxed_take_ownership (value, array);
g_value_take_boxed (value, array);
return G_TOKEN_RIGHT_PAREN;
}
......
......@@ -221,7 +221,7 @@ memsize_to_string (const GValue *src_value,
else
str = g_strdup_printf ("%" G_GUINT64_FORMAT, size);
g_value_set_string_take_ownership (dest_value, str);
g_value_take_string (dest_value, str);
}
static void
......
......@@ -22,6 +22,8 @@
#include "config.h"
#include <glib-object.h>
#define PANGO_ENABLE_ENGINE
#include <pango/pangoft2.h>
#include "text/text-types.h"
......@@ -51,7 +53,7 @@ gimp_text_render_bitmap (PangoFont *font,
const guchar *src;
guchar *dest;
face = pango_ft2_font_get_face (font);
face = pango_fc_font_lock_face (PANGO_FC_FONT (font));
FT_Set_Transform (face, trafo, NULL);
......@@ -138,4 +140,6 @@ gimp_text_render_bitmap (PangoFont *font,
default:
break;
}
pango_fc_font_unlock_face (PANGO_FC_FONT (font));
}
......@@ -23,6 +23,7 @@
#include <glib-object.h>
#define PANGO_ENABLE_ENGINE
#include <pango/pangoft2.h>
#include <ft2build.h>
......@@ -237,7 +238,7 @@ gimp_text_render_vectors (PangoFont *font,
FT_Face face;
FT_Glyph glyph;
face = pango_ft2_font_get_face (font);
face = pango_fc_font_lock_face (PANGO_FC_FONT (font));
FT_Load_Glyph (face, (FT_UInt) pango_glyph, flags);
......@@ -254,4 +255,6 @@ gimp_text_render_vectors (PangoFont *font,
}
FT_Done_Glyph (glyph);
pango_fc_font_unlock_face (PANGO_FC_FONT (font));
}
......@@ -382,7 +382,7 @@ gimp_device_info_get_property (GObject *object,
g_value_unset (&enum_value);
g_value_set_boxed_take_ownership (value, array);
g_value_take_boxed (value, array);
}
break;
......@@ -429,13 +429,13 @@ gimp_device_info_get_property (GObject *object,
{
g_value_set_string (&string_value, "");
}
g_value_array_append (array, &string_value);
}
g_value_unset (&string_value);
g_value_set_boxed_take_ownership (value, array);
g_value_take_boxed (value, array);
}
break;
......
......@@ -395,6 +395,14 @@ PKG_CHECK_MODULES(GMODULE, gmodule-2.0 gobject-2.0)
AC_SUBST(GMODULE_CFLAGS)
AC_SUBST(GMODULE_LIBS)
AC_MSG_CHECKING([if GLib is version 2.5.0 or newer])
if $PKG_CONFIG --atleast-version=2.5.0 glib-2.0; then
have_glib_2_5=yes
else
have_glib_2_5=no
fi
AC_MSG_RESULT($have_glib_2_5)
dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
gimp_save_LIBS=$LIBS
LIBS="$LIBS $GLIB_LIBS"
......@@ -407,13 +415,13 @@ AC_PATH_XTRA
AM_PATH_GTK_2_0(gtk_required_version, :,
AC_MSG_ERROR(Test for GTK+ failed. See the file 'INSTALL' for help.))
AC_MSG_CHECKING([if GTK+ is version 2.3.0 or newer])
if $PKG_CONFIG --atleast-version=2.3.0 gtk+-2.0; then
have_gtk_2_3=yes
AC_MSG_CHECKING([if GTK+ is version 2.5.0 or newer])
if $PKG_CONFIG --atleast-version=2.5.0 gtk+-2.0; then
have_gtk_2_5=yes
else
have_gtk_2_3=no
have_gtk_2_5=no
fi
AC_MSG_RESULT($have_gtk_2_3)
AC_MSG_RESULT($have_gtk_2_5)
PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0 >= gdk_pixbuf_required_version)
AC_SUBST(GDK_PIXBUF_CFLAGS)
......@@ -435,6 +443,14 @@ PKG_CHECK_MODULES(PANGOFT2, pangoft2 >= pangoft2_required_version, :,
AC_SUBST(PANGOFT2_CFLAGS)
AC_SUBST(PANGOFT2_LIBS)
AC_MSG_CHECKING([if Pango is version 1.5.0 or newer])
if $PKG_CONFIG --atleast-version=1.5.0 pango; then
have_pango_1_5=yes
else
have_pango_1_5=no
fi
AC_MSG_RESULT($have_pango_1_5)
PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= fontconfig_required_version)
AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
......@@ -1429,8 +1445,19 @@ CPPFLAGS="${CPPFLAGS} -DGIMP_DISABLE_DEPRECATED"
# Default to disable deprecated GTK+ stuff for 2.2.x
####################################################
if test "x$have_gtk_2_3" != "xyes"; then
CPPFLAGS="${CPPFLAGS} -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
if test "x$have_glib_2_5" != "xyes"; then
CPPFLAGS="${CPPFLAGS} -DG_DISABLE_DEPRECATED"
fi
if test "x$have_gtk_2_5" != "xyes"; then
CPPFLAGS="${CPPFLAGS} -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED"
# -DGTK_DISABLE_DEPRECATED"
fi
if test "x$have_pango_1_5" != "xyes"; then
CPPFLAGS="${CPPFLAGS} -DPANGO_DISABLE_DEPRECATED"
fi
############################
......
......@@ -716,7 +716,7 @@ gimp_config_deserialize_value_array (GValue *value,
return token;
}
g_value_set_boxed_take_ownership (value, array);
g_value_take_boxed (value, array);
return G_TOKEN_RIGHT_PAREN;
}
......
......@@ -474,7 +474,7 @@ gimp_offset_area_expose_event (GtkWidget *widget,
gdk_draw_rectangle (widget->window, gc, FALSE,
x + 1, y + 1, w - 3, h - 3);
gdk_gc_unref (gc);
g_object_unref (gc);
}
else
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment