diff --git a/app/config/gimpconfig-dump.c b/app/config/gimpconfig-dump.c index 8f3decd1a6..41b5cb0b22 100644 --- a/app/config/gimpconfig-dump.c +++ b/app/config/gimpconfig-dump.c @@ -258,8 +258,8 @@ dump_gimprc_manpage (GimpConfig *rc, guint n_property_specs; guint i; - gimp_output_stream_printf (output, NULL, NULL, NULL, - "%s", man_page_header); + g_output_stream_printf (output, NULL, NULL, NULL, + "%s", man_page_header); klass = G_OBJECT_GET_CLASS (rc); property_specs = g_object_class_list_properties (klass, &n_property_specs); @@ -275,20 +275,20 @@ dump_gimprc_manpage (GimpConfig *rc, if (prop_spec->flags & GIMP_CONFIG_PARAM_IGNORE) continue; - gimp_output_stream_printf (output, NULL, NULL, NULL, - ".TP\n"); + g_output_stream_printf (output, NULL, NULL, NULL, + ".TP\n"); if (gimp_config_serialize_property (rc, prop_spec, writer)) { - gimp_output_stream_printf (output, NULL, NULL, NULL, - "\n"); + g_output_stream_printf (output, NULL, NULL, NULL, + "\n"); desc = dump_describe_param (prop_spec); dump_with_linebreaks (output, desc); - gimp_output_stream_printf (output, NULL, NULL, NULL, - "\n"); + g_output_stream_printf (output, NULL, NULL, NULL, + "\n"); g_free (desc); } @@ -296,10 +296,10 @@ dump_gimprc_manpage (GimpConfig *rc, g_free (property_specs); - gimp_output_stream_printf (output, NULL, NULL, NULL, - "%s", man_page_path); - gimp_output_stream_printf (output, NULL, NULL, NULL, - "%s", man_page_footer); + g_output_stream_printf (output, NULL, NULL, NULL, + "%s", man_page_path); + g_output_stream_printf (output, NULL, NULL, NULL, + "%s", man_page_footer); } @@ -521,8 +521,8 @@ dump_with_linebreaks (GOutputStream *output, /* groff doesn't like lines to start with a single quote */ if (*text == '\'') - gimp_output_stream_printf (output, NULL, NULL, NULL, - "\\&"); /* a zero width space */ + g_output_stream_printf (output, NULL, NULL, NULL, + "\\&"); /* a zero width space */ for (t = text, i = 0, space = 0; *t != '\n' && (i <= LINE_LENGTH || space == 0) && i < len; @@ -536,12 +536,12 @@ dump_with_linebreaks (GOutputStream *output, i = space; g_output_stream_write_all (output, text, i, NULL, NULL, NULL); - gimp_output_stream_printf (output, NULL, NULL, NULL, - "\n"); + g_output_stream_printf (output, NULL, NULL, NULL, + "\n"); if (*t == '\n') - gimp_output_stream_printf (output, NULL, NULL, NULL, - ".br\n"); + g_output_stream_printf (output, NULL, NULL, NULL, + ".br\n"); i++; diff --git a/app/gui/themes.c b/app/gui/themes.c index 4535f56d6c..0e628da20f 100644 --- a/app/gui/themes.c +++ b/app/gui/themes.c @@ -305,7 +305,7 @@ themes_apply_theme (Gimp *gimp, esc_gtkrc_user = g_strescape (tmp, NULL); g_free (tmp); - if (! gimp_output_stream_printf + if (! g_output_stream_printf (output, NULL, NULL, &error, "# GIMP themerc\n" "#\n" diff --git a/app/widgets/gimptextbuffer.c b/app/widgets/gimptextbuffer.c index 9b6b77307a..a3e4dc0c79 100644 --- a/app/widgets/gimptextbuffer.c +++ b/app/widgets/gimptextbuffer.c @@ -1435,7 +1435,7 @@ gimp_text_buffer_load (GimpTextBuffer *buffer, gtk_text_buffer_get_end_iter (GTK_TEXT_BUFFER (buffer), &iter); remaining = (buf + remaining + bytes_read) - leftover; - g_memmove (buf, leftover, remaining); + memmove (buf, leftover, remaining); if (! success) { diff --git a/configure.ac b/configure.ac index 34532f83a0..c8051b391f 100644 --- a/configure.ac +++ b/configure.ac @@ -42,7 +42,7 @@ m4_define([gimp_full_name], [GNU Image Manipulation Program]) # required versions of other packages m4_define([babl_required_version], [0.1.11]) m4_define([gegl_required_version], [0.3.0]) -m4_define([glib_required_version], [2.36.0]) +m4_define([glib_required_version], [2.40.0]) m4_define([atk_required_version], [2.2.0]) m4_define([gtk_required_version], [2.24.10]) m4_define([gdk_pixbuf_required_version], [2.24.1]) @@ -583,13 +583,13 @@ if test "x$GDBUS_CODEGEN" = xno; then AC_MSG_ERROR([Could not find gdbus-codegen in your PATH]) fi -AC_MSG_CHECKING([if GLib is version 2.39.0 or newer]) -if $PKG_CONFIG --atleast-version=2.39.0 glib-2.0; then - have_glib_2_39=yes +AC_MSG_CHECKING([if GLib is version 2.43.0 or newer]) +if $PKG_CONFIG --atleast-version=2.43.0 glib-2.0; then + have_glib_2_43=yes else - have_glib_2_39=no + have_glib_2_43=no fi -AC_MSG_RESULT($have_glib_2_39) +AC_MSG_RESULT($have_glib_2_43) # Check for bind_textdomain_codeset, including -lintl if GLib brings it in. @@ -2035,7 +2035,7 @@ CPPFLAGS="${CPPFLAGS} -DGIMP_DISABLE_DEPRECATED -DBABL_DISABLE_DEPRECATED -DGSEA # We must build without problems with future releases of libraries # and disabling deprecated API risks breaking the build -if test "x$have_glib_2_39" != "xyes"; then +if test "x$have_glib_2_43" != "xyes"; then CPPFLAGS="${CPPFLAGS} -DG_DISABLE_DEPRECATED" fi diff --git a/libgimpbase/gimpbase.def b/libgimpbase/gimpbase.def index 730d86e759..4832eee52d 100644 --- a/libgimpbase/gimpbase.def +++ b/libgimpbase/gimpbase.def @@ -83,8 +83,6 @@ EXPORTS gimp_minor_version gimp_offset_type_get_type gimp_orientation_type_get_type - gimp_output_stream_printf - gimp_output_stream_vprintf gimp_paint_application_mode_get_type gimp_param_memsize_get_type gimp_param_parasite_get_type diff --git a/libgimpbase/gimputils.c b/libgimpbase/gimputils.c index 87eda3d905..e22329204b 100644 --- a/libgimpbase/gimputils.c +++ b/libgimpbase/gimputils.c @@ -810,47 +810,3 @@ gimp_flags_value_get_help (GFlagsClass *flags_class, return NULL; } - -gboolean -gimp_output_stream_printf (GOutputStream *stream, - gsize *bytes_written, - GCancellable *cancellable, - GError **error, - const gchar *format, - ...) -{ - va_list args; - gboolean success; - - va_start (args, format); - success = gimp_output_stream_vprintf (stream, bytes_written, cancellable, - error, format, args); - va_end (args); - - return success; -} - -gboolean -gimp_output_stream_vprintf (GOutputStream *stream, - gsize *bytes_written, - GCancellable *cancellable, - GError **error, - const gchar *format, - va_list args) -{ - gchar *text; - gboolean success; - - g_return_val_if_fail (G_IS_OUTPUT_STREAM (stream), FALSE); - g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (stream), FALSE); - g_return_val_if_fail (error == NULL || *error == NULL, FALSE); - g_return_val_if_fail (format != NULL, FALSE); - - text = g_strdup_vprintf (format, args); - success = g_output_stream_write_all (stream, - text, strlen (text), - bytes_written, cancellable, error); - g_free (text); - - return success; -} diff --git a/libgimpbase/gimputils.h b/libgimpbase/gimputils.h index 20f25c01f4..4af931ab4a 100644 --- a/libgimpbase/gimputils.h +++ b/libgimpbase/gimputils.h @@ -69,21 +69,6 @@ const gchar * gimp_flags_value_get_desc (GFlagsClass *flags_class, const gchar * gimp_flags_value_get_help (GFlagsClass *flags_class, GFlagsValue *flags_value); -/* temporary, to be removed when we depend on glib 2.40, which will - * clearly be before gimp 2.10 - */ -gboolean gimp_output_stream_printf (GOutputStream *stream, - gsize *bytes_written, - GCancellable *cancellable, - GError **error, - const gchar *format, - ...) G_GNUC_PRINTF (5, 6); -gboolean gimp_output_stream_vprintf (GOutputStream *stream, - gsize *bytes_written, - GCancellable *cancellable, - GError **error, - const gchar *format, - va_list args) G_GNUC_PRINTF (5, 0); G_END_DECLS diff --git a/libgimpbase/gimpvaluearray.c b/libgimpbase/gimpvaluearray.c index fe48dc0155..e3e5250487 100644 --- a/libgimpbase/gimpvaluearray.c +++ b/libgimpbase/gimpvaluearray.c @@ -277,8 +277,8 @@ gimp_value_array_insert (GimpValueArray *value_array, value_array_grow (value_array, value_array->n_values + 1, FALSE); if (index + 1 < value_array->n_values) - g_memmove (value_array->values + index + 1, value_array->values + index, - (i - index) * sizeof (value_array->values[0])); + memmove (value_array->values + index + 1, value_array->values + index, + (i - index) * sizeof (value_array->values[0])); memset (value_array->values + index, 0, sizeof (value_array->values[0])); @@ -317,8 +317,8 @@ gimp_value_array_remove (GimpValueArray *value_array, value_array->n_values--; if (index < value_array->n_values) - g_memmove (value_array->values + index, value_array->values + index + 1, - (value_array->n_values - index) * sizeof (value_array->values[0])); + memmove (value_array->values + index, value_array->values + index + 1, + (value_array->n_values - index) * sizeof (value_array->values[0])); value_array_shrink (value_array); diff --git a/plug-ins/common/file-csource.c b/plug-ins/common/file-csource.c index 86f04ec905..26f86c3198 100644 --- a/plug-ins/common/file-csource.c +++ b/plug-ins/common/file-csource.c @@ -309,8 +309,8 @@ print (GOutputStream *stream, gboolean success; va_start (args, format); - success = gimp_output_stream_vprintf (stream, NULL, NULL, - error, format, args); + success = g_output_stream_vprintf (stream, NULL, NULL, + error, format, args); va_end (args); return success; diff --git a/plug-ins/common/file-pcx.c b/plug-ins/common/file-pcx.c index 4fab4f7216..d0e2be1c43 100644 --- a/plug-ins/common/file-pcx.c +++ b/plug-ins/common/file-pcx.c @@ -323,8 +323,8 @@ pcx_header_from_buffer (guint8 *buf) for (i = 0; pcx_header_buf_xlate[i].size != 0; i++) { - g_memmove (pcx_header_buf_xlate[i].address, buf + buf_offset, - pcx_header_buf_xlate[i].size); + memmove (pcx_header_buf_xlate[i].address, buf + buf_offset, + pcx_header_buf_xlate[i].size); buf_offset += pcx_header_buf_xlate[i].size; } } @@ -337,8 +337,8 @@ pcx_header_to_buffer (guint8 *buf) for (i = 0; pcx_header_buf_xlate[i].size != 0; i++) { - g_memmove (buf + buf_offset, pcx_header_buf_xlate[i].address, - pcx_header_buf_xlate[i].size); + memmove (buf + buf_offset, pcx_header_buf_xlate[i].address, + pcx_header_buf_xlate[i].size); buf_offset += pcx_header_buf_xlate[i].size; } }