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:
@ -155,8 +155,8 @@ static inline gdouble calc_lineintersect_ratio (gdouble p1x,
|
||||
gdouble q2y);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpToolHandleGrid, gimp_tool_handle_grid,
|
||||
GIMP_TYPE_TOOL_TRANSFORM_GRID)
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GimpToolHandleGrid, gimp_tool_handle_grid,
|
||||
GIMP_TYPE_TOOL_TRANSFORM_GRID)
|
||||
|
||||
#define parent_class gimp_tool_handle_grid_parent_class
|
||||
|
||||
@ -338,16 +338,12 @@ gimp_tool_handle_grid_class_init (GimpToolHandleGridClass *klass)
|
||||
0.0,
|
||||
GIMP_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT));
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GimpToolHandleGridPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_tool_handle_grid_init (GimpToolHandleGrid *grid)
|
||||
{
|
||||
grid->private = G_TYPE_INSTANCE_GET_PRIVATE (grid,
|
||||
GIMP_TYPE_TOOL_HANDLE_GRID,
|
||||
GimpToolHandleGridPrivate);
|
||||
grid->private = gimp_tool_handle_grid_get_instance_private (grid);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user