app, libgimp*, modules: don't use g_type_class_add_private() ...

... and G_TYPE_INSTANCE_GET_PRIVATE()

g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58.  Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.

This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.

Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
This commit is contained in:
Ell
2018-09-18 12:09:39 -04:00
parent ee11477dc5
commit 31b369d09f
172 changed files with 485 additions and 1036 deletions

View File

@ -54,9 +54,7 @@ struct _GimpCanvasGridPrivate
};
#define GET_PRIVATE(grid) \
G_TYPE_INSTANCE_GET_PRIVATE (grid, \
GIMP_TYPE_CANVAS_GRID, \
GimpCanvasGridPrivate)
((GimpCanvasGridPrivate *) gimp_canvas_grid_get_instance_private ((GimpCanvasGrid *) (grid)))
/* local function prototypes */
@ -77,7 +75,8 @@ static void gimp_canvas_grid_stroke (GimpCanvasItem *item,
cairo_t *cr);
G_DEFINE_TYPE (GimpCanvasGrid, gimp_canvas_grid, GIMP_TYPE_CANVAS_ITEM)
G_DEFINE_TYPE_WITH_PRIVATE (GimpCanvasGrid, gimp_canvas_grid,
GIMP_TYPE_CANVAS_ITEM)
#define parent_class gimp_canvas_grid_parent_class
@ -106,8 +105,6 @@ gimp_canvas_grid_class_init (GimpCanvasGridClass *klass)
NULL, NULL,
FALSE,
GIMP_PARAM_READWRITE));
g_type_class_add_private (klass, sizeof (GimpCanvasGridPrivate));
}
static void