From 6feb7bb82cb0863dff7eacc948bf385c3b294e2b Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Wed, 5 Jul 2006 13:40:47 +0000 Subject: [PATCH] depend on glib >= 2.10.2, gtk+ >= 2.8.18 and pango >= 1.12.3. Define 2006-07-05 Michael Natterer * configure.in: depend on glib >= 2.10.2, gtk+ >= 2.8.18 and pango >= 1.12.3. Define FOO_DISABLE_DEPRECATED also for glib 2.12, gtk+ 2.10 and pango 2.14 * app/sanity.c * app/gui/gui.c: adjusted sanity checks accordingly. * app/dialogs/stroke-dialog.c * app/widgets/gimpeditor.c * app/widgets/gimpuimanager.c * libgimpwidgets/gimphelpui.c * libgimpwidgets/gimpmemsizeentry.c * plug-ins/helpbrowser/gimpthrobber.c: replace gtk_object_sink() by combinations of g_object_ref_sink() and g_object_unref(). --- ChangeLog | 17 ++++++++++++ app/dialogs/stroke-dialog.c | 3 ++- app/gui/gui.c | 2 +- app/sanity.c | 2 +- app/widgets/gimpeditor.c | 3 ++- app/widgets/gimpuimanager.c | 5 +++- configure.in | 42 ++++++++++++++--------------- libgimpwidgets/gimphelpui.c | 3 +-- libgimpwidgets/gimpmemsizeentry.c | 3 +-- plug-ins/helpbrowser/gimpthrobber.c | 5 +--- 10 files changed, 51 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index 115bfe3f38..f7de82d720 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2006-07-05 Michael Natterer + + * configure.in: depend on glib >= 2.10.2, gtk+ >= 2.8.18 + and pango >= 1.12.3. Define FOO_DISABLE_DEPRECATED also for + glib 2.12 and gtk+ 2.10. + + * app/sanity.c + * app/gui/gui.c: adjusted sanity checks accordingly. + + * app/dialogs/stroke-dialog.c + * app/widgets/gimpeditor.c + * app/widgets/gimpuimanager.c + * libgimpwidgets/gimphelpui.c + * libgimpwidgets/gimpmemsizeentry.c + * plug-ins/helpbrowser/gimpthrobber.c: replace gtk_object_sink() + by combinations of g_object_ref_sink() and g_object_unref(). + 2006-07-05 Sven Neumann * configure.in: bumped version to 2.3.11. diff --git a/app/dialogs/stroke-dialog.c b/app/dialogs/stroke-dialog.c index 959c27d5c5..81c84b8dae 100644 --- a/app/dialogs/stroke-dialog.c +++ b/app/dialogs/stroke-dialog.c @@ -141,7 +141,8 @@ stroke_dialog_new (GimpItem *item, paint_radio = g_object_ref (group->data); gtk_container_remove (GTK_CONTAINER (radio_box), paint_radio); - gtk_object_sink (GTK_OBJECT (radio_box)); + g_object_ref_sink (radio_box); + g_object_unref (radio_box); { PangoFontDescription *font_desc; diff --git a/app/gui/gui.c b/app/gui/gui.c index 145651f14e..01fba40fcc 100644 --- a/app/gui/gui.c +++ b/app/gui/gui.c @@ -256,7 +256,7 @@ gui_sanity_check (void) #define GTK_REQUIRED_MAJOR 2 #define GTK_REQUIRED_MINOR 8 -#define GTK_REQUIRED_MICRO 8 +#define GTK_REQUIRED_MICRO 18 mismatch = gtk_check_version (GTK_REQUIRED_MAJOR, GTK_REQUIRED_MINOR, diff --git a/app/sanity.c b/app/sanity.c index f2c9307818..cfd2a94db3 100644 --- a/app/sanity.c +++ b/app/sanity.c @@ -63,7 +63,7 @@ sanity_check_glib (void) const gchar *mismatch; #define GLIB_REQUIRED_MAJOR 2 -#define GLIB_REQUIRED_MINOR 8 +#define GLIB_REQUIRED_MINOR 10 #define GLIB_REQUIRED_MICRO 2 mismatch = glib_check_version (GLIB_REQUIRED_MAJOR, diff --git a/app/widgets/gimpeditor.c b/app/widgets/gimpeditor.c index cdf6b6f79c..d852031347 100644 --- a/app/widgets/gimpeditor.c +++ b/app/widgets/gimpeditor.c @@ -534,7 +534,8 @@ gimp_editor_add_stock_box (GimpEditor *editor, g_list_free (children); - gtk_object_sink (GTK_OBJECT (hbox)); + g_object_ref_sink (hbox); + g_object_unref (hbox); return first_button; } diff --git a/app/widgets/gimpuimanager.c b/app/widgets/gimpuimanager.c index 0adc004b8e..c1f2fdda6f 100644 --- a/app/widgets/gimpuimanager.c +++ b/app/widgets/gimpuimanager.c @@ -725,7 +725,10 @@ gimp_ui_manager_entry_ensure (GimpUIManager *manager, /* take ownership of popup menus */ if (GTK_IS_MENU (entry->widget)) - gtk_object_sink (GTK_OBJECT (entry->widget)); + { + g_object_ref_sink (entry->widget); + g_object_unref (entry->widget); + } if (entry->setup_func) entry->setup_func (manager, entry->ui_path); diff --git a/configure.in b/configure.in index fc9ecf6433..be714ba06e 100644 --- a/configure.in +++ b/configure.in @@ -40,10 +40,10 @@ m4_define([gimp_stable], m4_define([gimp_full_name], [GNU Image Manipulation Program]) # required versions of other packages -m4_define([glib_required_version], [2.8.2]) -m4_define([gtk_required_version], [2.8.8]) +m4_define([glib_required_version], [2.10.2]) +m4_define([gtk_required_version], [2.8.18]) m4_define([gdk_pixbuf_required_version], [gtk_required_version]) -m4_define([pangoft2_required_version], [1.10.0]) +m4_define([pangoft2_required_version], [1.12.3]) m4_define([fontconfig_required_version], [2.2.0]) m4_define([gtkdoc_required_version], [1.0]) m4_define([gtkhtml2_required_version], [2.0.0]) @@ -399,13 +399,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.11.0 or newer]) -if $PKG_CONFIG --atleast-version=2.11.0 glib-2.0; then - have_glib_2_11=yes +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 else - have_glib_2_11=no + have_glib_2_13=no fi -AC_MSG_RESULT($have_glib_2_11) +AC_MSG_RESULT($have_glib_2_13) dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in. gimp_save_LIBS=$LIBS @@ -419,13 +419,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.9.0 or newer]) -if $PKG_CONFIG --atleast-version=2.9.0 gtk+-2.0; then - have_gtk_2_9=yes +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 else - have_gtk_2_9=no + have_gtk_2_11=no fi -AC_MSG_RESULT($have_gtk_2_9) +AC_MSG_RESULT($have_gtk_2_11) PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0 >= gdk_pixbuf_required_version) @@ -443,13 +443,13 @@ PKG_CHECK_MODULES(PANGOFT2, pangoft2 >= pangoft2_required_version, :, *** We require Pango with the optional support for FreeType2 compiled in. *** See the file 'INSTALL' for more help.])) -AC_MSG_CHECKING([if Pango is version 1.13.0 or newer]) -if $PKG_CONFIG --atleast-version=1.13.0 pango; then - have_pango_1_13=yes +AC_MSG_CHECKING([if Pango is version 1.15.0 or newer]) +if $PKG_CONFIG --atleast-version=1.15.0 pango; then + have_pango_1_15=yes else - have_pango_1_13=no + have_pango_1_15=no fi -AC_MSG_RESULT($have_pango_1_13) +AC_MSG_RESULT($have_pango_1_15) gimp_save_CFLAGS=$CFLAGS CFLAGS="$PANGOFT2_CFLAGS $CFLAGS" @@ -1596,15 +1596,15 @@ AC_SUBST(GIMP_MKENUMS) CPPFLAGS="${CPPFLAGS} -DGIMP_DISABLE_DEPRECATED" -if test "x$have_glib_2_11" != "xyes"; then +if test "x$have_glib_2_13" != "xyes"; then CPPFLAGS="${CPPFLAGS} -DG_DISABLE_DEPRECATED" fi -if test "x$have_gtk_2_9" != "xyes"; then +if test "x$have_gtk_2_11" != "xyes"; then CPPFLAGS="${CPPFLAGS} -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED" fi -if test "x$have_pango_1_13" != "xyes"; then +if test "x$have_pango_1_15" != "xyes"; then CPPFLAGS="${CPPFLAGS} -DPANGO_DISABLE_DEPRECATED" fi diff --git a/libgimpwidgets/gimphelpui.c b/libgimpwidgets/gimphelpui.c index 909330cd05..275060142c 100644 --- a/libgimpwidgets/gimphelpui.c +++ b/libgimpwidgets/gimphelpui.c @@ -86,8 +86,7 @@ _gimp_help_init (void) tool_tips = gtk_tooltips_new (); /* take ownership of the tooltips */ - g_object_ref (tool_tips); - gtk_object_sink (GTK_OBJECT (tool_tips)); + g_object_ref_sink (tool_tips); } /** diff --git a/libgimpwidgets/gimpmemsizeentry.c b/libgimpwidgets/gimpmemsizeentry.c index 9b6a03582b..be7b6ed031 100644 --- a/libgimpwidgets/gimpmemsizeentry.c +++ b/libgimpwidgets/gimpmemsizeentry.c @@ -189,8 +189,7 @@ gimp_memsize_entry_new (guint64 value, #undef CAST - g_object_ref (entry->adjustment); - gtk_object_sink (GTK_OBJECT (entry->adjustment)); + g_object_ref_sink (entry->adjustment); gtk_entry_set_width_chars (GTK_ENTRY (entry->spinbutton), 10); gtk_box_pack_start (GTK_BOX (entry), entry->spinbutton, FALSE, FALSE, 0); diff --git a/plug-ins/helpbrowser/gimpthrobber.c b/plug-ins/helpbrowser/gimpthrobber.c index 6a4939c25a..5c1267ae40 100644 --- a/plug-ins/helpbrowser/gimpthrobber.c +++ b/plug-ins/helpbrowser/gimpthrobber.c @@ -339,10 +339,7 @@ gimp_throbber_set_image (GimpThrobber *button, } if (image) - { - g_object_ref (image); - gtk_object_sink (GTK_OBJECT (image)); - } + g_object_ref_sink (image); button->priv->image = image;