Commit 3b0040c0 authored by Ell's avatar Ell

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.
parent d5586ed9
...@@ -121,9 +121,7 @@ struct _GimpDialogConfigPrivate ...@@ -121,9 +121,7 @@ struct _GimpDialogConfigPrivate
}; };
#define GET_PRIVATE(config) \ #define GET_PRIVATE(config) \
G_TYPE_INSTANCE_GET_PRIVATE (config, \ ((GimpDialogConfigPrivate *) gimp_dialog_config_get_instance_private ((GimpDialogConfig *) (config)))
GIMP_TYPE_DIALOG_CONFIG, \
GimpDialogConfigPrivate)
static void gimp_dialog_config_constructed (GObject *object); static void gimp_dialog_config_constructed (GObject *object);
...@@ -145,7 +143,8 @@ static void gimp_dialog_config_stroke_options_notify (GObject *object, ...@@ -145,7 +143,8 @@ static void gimp_dialog_config_stroke_options_notify (GObject *object,
gpointer data); gpointer data);
G_DEFINE_TYPE (GimpDialogConfig, gimp_dialog_config, GIMP_TYPE_GUI_CONFIG) G_DEFINE_TYPE_WITH_PRIVATE (GimpDialogConfig, gimp_dialog_config,
GIMP_TYPE_GUI_CONFIG)
#define parent_class gimp_dialog_config_parent_class #define parent_class gimp_dialog_config_parent_class
...@@ -524,8 +523,6 @@ gimp_dialog_config_class_init (GimpDialogConfigClass *klass) ...@@ -524,8 +523,6 @@ gimp_dialog_config_class_init (GimpDialogConfigClass *klass)
GIMP_TYPE_STROKE_OPTIONS, GIMP_TYPE_STROKE_OPTIONS,
GIMP_PARAM_STATIC_STRINGS | GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_AGGREGATE); GIMP_CONFIG_PARAM_AGGREGATE);
g_type_class_add_private (klass, sizeof (GimpDialogConfigPrivate));
} }
static void static void
......
...@@ -112,6 +112,7 @@ static void gimp_async_run_callbacks (GimpAsync *async ...@@ -112,6 +112,7 @@ static void gimp_async_run_callbacks (GimpAsync *async
G_DEFINE_TYPE_WITH_CODE (GimpAsync, gimp_async, G_TYPE_OBJECT, G_DEFINE_TYPE_WITH_CODE (GimpAsync, gimp_async, G_TYPE_OBJECT,
G_ADD_PRIVATE (GimpAsync)
G_IMPLEMENT_INTERFACE (GIMP_TYPE_WAITABLE, G_IMPLEMENT_INTERFACE (GIMP_TYPE_WAITABLE,
gimp_async_waitable_iface_init) gimp_async_waitable_iface_init)
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CANCELABLE, G_IMPLEMENT_INTERFACE (GIMP_TYPE_CANCELABLE,
...@@ -134,8 +135,6 @@ gimp_async_class_init (GimpAsyncClass *klass) ...@@ -134,8 +135,6 @@ gimp_async_class_init (GimpAsyncClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = gimp_async_finalize; object_class->finalize = gimp_async_finalize;
g_type_class_add_private (klass, sizeof (GimpAsyncPrivate));
} }
static void static void
...@@ -155,9 +154,7 @@ gimp_async_cancelable_iface_init (GimpCancelableInterface *iface) ...@@ -155,9 +154,7 @@ gimp_async_cancelable_iface_init (GimpCancelableInterface *iface)
static void static void
gimp_async_init (GimpAsync *async) gimp_async_init (GimpAsync *async)
{ {
async->priv = G_TYPE_INSTANCE_GET_PRIVATE (async, async->priv = gimp_async_get_instance_private (async);
GIMP_TYPE_ASYNC,
GimpAsyncPrivate);
g_mutex_init (&async->priv->mutex); g_mutex_init (&async->priv->mutex);
g_cond_init (&async->priv->cond); g_cond_init (&async->priv->cond);
......
...@@ -73,6 +73,7 @@ static void gimp_async_set_async_callback (GimpAsync ...@@ -73,6 +73,7 @@ static void gimp_async_set_async_callback (GimpAsync
G_DEFINE_TYPE_WITH_CODE (GimpAsyncSet, gimp_async_set, G_TYPE_OBJECT, G_DEFINE_TYPE_WITH_CODE (GimpAsyncSet, gimp_async_set, G_TYPE_OBJECT,
G_ADD_PRIVATE (GimpAsyncSet)
G_IMPLEMENT_INTERFACE (GIMP_TYPE_WAITABLE, G_IMPLEMENT_INTERFACE (GIMP_TYPE_WAITABLE,
gimp_async_set_waitable_iface_init) gimp_async_set_waitable_iface_init)
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CANCELABLE, G_IMPLEMENT_INTERFACE (GIMP_TYPE_CANCELABLE,
...@@ -99,8 +100,6 @@ gimp_async_set_class_init (GimpAsyncSetClass *klass) ...@@ -99,8 +100,6 @@ gimp_async_set_class_init (GimpAsyncSetClass *klass)
NULL, NULL, NULL, NULL,
FALSE, FALSE,
GIMP_PARAM_READABLE)); GIMP_PARAM_READABLE));
g_type_class_add_private (klass, sizeof (GimpAsyncSetPrivate));
} }
static void static void
...@@ -120,9 +119,7 @@ gimp_async_set_cancelable_iface_init (GimpCancelableInterface *iface) ...@@ -120,9 +119,7 @@ gimp_async_set_cancelable_iface_init (GimpCancelableInterface *iface)
static void static void
gimp_async_set_init (GimpAsyncSet *async_set) gimp_async_set_init (GimpAsyncSet *async_set)
{ {
async_set->priv = G_TYPE_INSTANCE_GET_PRIVATE (async_set, async_set->priv = gimp_async_set_get_instance_private (async_set);
GIMP_TYPE_ASYNC_SET,
GimpAsyncSetPrivate);
async_set->priv->asyncs = g_hash_table_new (NULL, NULL); async_set->priv->asyncs = g_hash_table_new (NULL, NULL);
} }
......
...@@ -53,7 +53,7 @@ static void gimp_aux_item_set_property (GObject *object, ...@@ -53,7 +53,7 @@ static void gimp_aux_item_set_property (GObject *object,
GParamSpec *pspec); GParamSpec *pspec);
G_DEFINE_ABSTRACT_TYPE (GimpAuxItem, gimp_aux_item, G_TYPE_OBJECT) G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GimpAuxItem, gimp_aux_item, G_TYPE_OBJECT)
static guint gimp_aux_item_signals[LAST_SIGNAL] = { 0 }; static guint gimp_aux_item_signals[LAST_SIGNAL] = { 0 };
...@@ -82,16 +82,12 @@ gimp_aux_item_class_init (GimpAuxItemClass *klass) ...@@ -82,16 +82,12 @@ gimp_aux_item_class_init (GimpAuxItemClass *klass)
0, G_MAXUINT32, 0, 0, G_MAXUINT32, 0,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_CONSTRUCT_ONLY |
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
g_type_class_add_private (klass, sizeof (GimpAuxItemPrivate));
} }
static void static void
gimp_aux_item_init (GimpAuxItem *aux_item) gimp_aux_item_init (GimpAuxItem *aux_item)
{ {
aux_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (aux_item, aux_item->priv = gimp_aux_item_get_instance_private (aux_item);
GIMP_TYPE_AUX_ITEM,
GimpAuxItemPrivate);
} }
static void static void
......
...@@ -96,6 +96,7 @@ static gchar * gimp_brush_get_checksum (GimpTagged *tag ...@@ -96,6 +96,7 @@ static gchar * gimp_brush_get_checksum (GimpTagged *tag
G_DEFINE_TYPE_WITH_CODE (GimpBrush, gimp_brush, GIMP_TYPE_DATA, G_DEFINE_TYPE_WITH_CODE (GimpBrush, gimp_brush, GIMP_TYPE_DATA,
G_ADD_PRIVATE (GimpBrush)
G_IMPLEMENT_INTERFACE (GIMP_TYPE_TAGGED, G_IMPLEMENT_INTERFACE (GIMP_TYPE_TAGGED,
gimp_brush_tagged_iface_init)) gimp_brush_tagged_iface_init))
...@@ -151,8 +152,6 @@ gimp_brush_class_init (GimpBrushClass *klass) ...@@ -151,8 +152,6 @@ gimp_brush_class_init (GimpBrushClass *klass)
1.0, 5000.0, 20.0, 1.0, 5000.0, 20.0,
GIMP_PARAM_READWRITE | GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT)); G_PARAM_CONSTRUCT));
g_type_class_add_private (klass, sizeof (GimpBrushPrivate));
} }
static void static void
...@@ -164,9 +163,7 @@ gimp_brush_tagged_iface_init (GimpTaggedInterface *iface) ...@@ -164,9 +163,7 @@ gimp_brush_tagged_iface_init (GimpTaggedInterface *iface)
static void static void
gimp_brush_init (GimpBrush *brush) gimp_brush_init (GimpBrush *brush)
{ {
brush->priv = G_TYPE_INSTANCE_GET_PRIVATE (brush, brush->priv = gimp_brush_get_instance_private (brush);
GIMP_TYPE_BRUSH,
GimpBrushPrivate);
brush->priv->spacing = 20; brush->priv->spacing = 20;
brush->priv->x_axis.x = 15.0; brush->priv->x_axis.x = 15.0;
......
...@@ -69,7 +69,7 @@ typedef struct ...@@ -69,7 +69,7 @@ typedef struct
GQuark quark; /* used to attach the signal id's of child signals */ GQuark quark; /* used to attach the signal id's of child signals */
} GimpContainerHandler; } GimpContainerHandler;
struct _GimpContainerPriv struct _GimpContainerPrivate
{ {
GType children_type; GType children_type;
GimpContainerPolicy policy; GimpContainerPolicy policy;
...@@ -116,6 +116,7 @@ static void gimp_container_disconnect_callback (GimpObject *object, ...@@ -116,6 +116,7 @@ static void gimp_container_disconnect_callback (GimpObject *object,
G_DEFINE_TYPE_WITH_CODE (GimpContainer, gimp_container, GIMP_TYPE_OBJECT, G_DEFINE_TYPE_WITH_CODE (GimpContainer, gimp_container, GIMP_TYPE_OBJECT,
G_ADD_PRIVATE (GimpContainer)
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
gimp_container_config_iface_init)) gimp_container_config_iface_init))
...@@ -212,8 +213,6 @@ gimp_container_class_init (GimpContainerClass *klass) ...@@ -212,8 +213,6 @@ gimp_container_class_init (GimpContainerClass *klass)
GIMP_CONTAINER_POLICY_STRONG, GIMP_CONTAINER_POLICY_STRONG,
GIMP_PARAM_READWRITE | GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY)); G_PARAM_CONSTRUCT_ONLY));
g_type_class_add_private (klass, sizeof (GimpContainerPriv));
} }
static void static void
...@@ -226,9 +225,7 @@ gimp_container_config_iface_init (GimpConfigInterface *iface) ...@@ -226,9 +225,7 @@ gimp_container_config_iface_init (GimpConfigInterface *iface)
static void static void
gimp_container_init (GimpContainer *container) gimp_container_init (GimpContainer *container)
{ {
container->priv = G_TYPE_INSTANCE_GET_PRIVATE (container, container->priv = gimp_container_get_instance_private (container);
GIMP_TYPE_CONTAINER,
GimpContainerPriv);
container->priv->handlers = NULL; container->priv->handlers = NULL;
container->priv->freeze_count = 0; container->priv->freeze_count = 0;
......
...@@ -33,14 +33,14 @@ ...@@ -33,14 +33,14 @@
#define GIMP_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_CONTAINER, GimpContainerClass)) #define GIMP_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_CONTAINER, GimpContainerClass))
typedef struct _GimpContainerClass GimpContainerClass; typedef struct _GimpContainerClass GimpContainerClass;
typedef struct _GimpContainerPriv GimpContainerPriv; typedef struct _GimpContainerPrivate GimpContainerPrivate;
struct _GimpContainer struct _GimpContainer
{ {
GimpObject parent_instance; GimpObject parent_instance;
GimpContainerPriv *priv; GimpContainerPrivate *priv;
}; };
struct _GimpContainerClass struct _GimpContainerClass
......
...@@ -106,7 +106,8 @@ static GFile * gimp_data_factory_get_save_dir (GimpDataFactory *fa ...@@ -106,7 +106,8 @@ static GFile * gimp_data_factory_get_save_dir (GimpDataFactory *fa
GError **error); GError **error);
G_DEFINE_ABSTRACT_TYPE (GimpDataFactory, gimp_data_factory, GIMP_TYPE_OBJECT) G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GimpDataFactory, gimp_data_factory,
GIMP_TYPE_OBJECT)
#define parent_class gimp_data_factory_parent_class #define parent_class gimp_data_factory_parent_class
...@@ -174,16 +175,12 @@ gimp_data_factory_class_init (GimpDataFactoryClass *klass) ...@@ -174,16 +175,12 @@ gimp_data_factory_class_init (GimpDataFactoryClass *klass)
NULL, NULL, NULL, NULL,
GIMP_PARAM_READWRITE | GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY)); G_PARAM_CONSTRUCT_ONLY));
g_type_class_add_private (klass, sizeof (GimpDataFactoryPrivate));
} }
static void static void
gimp_data_factory_init (GimpDataFactory *factory) gimp_data_factory_init (GimpDataFactory *factory)
{ {
factory->priv = G_TYPE_INSTANCE_GET_PRIVATE (factory, factory->priv = gimp_data_factory_get_instance_private (factory);
GIMP_TYPE_DATA_FACTORY,
GimpDataFactoryPrivate);
factory->priv->async_set = gimp_async_set_new (); factory->priv->async_set = gimp_async_set_new ();
} }
......
...@@ -99,8 +99,8 @@ static GimpDataLoader * gimp_data_loader_new (const gchar *name, ...@@ -99,8 +99,8 @@ static GimpDataLoader * gimp_data_loader_new (const gchar *name,
static void gimp_data_loader_free (GimpDataLoader *loader); static void gimp_data_loader_free (GimpDataLoader *loader);
G_DEFINE_TYPE (GimpDataLoaderFactory, gimp_data_loader_factory, G_DEFINE_TYPE_WITH_PRIVATE (GimpDataLoaderFactory, gimp_data_loader_factory,
GIMP_TYPE_DATA_FACTORY) GIMP_TYPE_DATA_FACTORY)
#define parent_class gimp_data_loader_factory_parent_class #define parent_class gimp_data_loader_factory_parent_class
...@@ -115,16 +115,12 @@ gimp_data_loader_factory_class_init (GimpDataLoaderFactoryClass *klass) ...@@ -115,16 +115,12 @@ gimp_data_loader_factory_class_init (GimpDataLoaderFactoryClass *klass)
factory_class->data_init = gimp_data_loader_factory_data_init; factory_class->data_init = gimp_data_loader_factory_data_init;
factory_class->data_refresh = gimp_data_loader_factory_data_refresh; factory_class->data_refresh = gimp_data_loader_factory_data_refresh;
g_type_class_add_private (klass, sizeof (GimpDataLoaderFactoryPrivate));
} }
static void static void
gimp_data_loader_factory_init (GimpDataLoaderFactory *factory) gimp_data_loader_factory_init (GimpDataLoaderFactory *factory)
{ {
factory->priv = G_TYPE_INSTANCE_GET_PRIVATE (factory, factory->priv = gimp_data_loader_factory_get_instance_private (factory);
GIMP_TYPE_DATA_LOADER_FACTORY,
GimpDataLoaderFactoryPrivate);
} }
static void static void
......
...@@ -199,6 +199,7 @@ static GeglNode * gimp_drawable_real_get_source_node (GimpDrawable *drawable) ...@@ -199,6 +199,7 @@ static GeglNode * gimp_drawable_real_get_source_node (GimpDrawable *drawable)
G_DEFINE_TYPE_WITH_CODE (GimpDrawable, gimp_drawable, GIMP_TYPE_ITEM, G_DEFINE_TYPE_WITH_CODE (GimpDrawable, gimp_drawable, GIMP_TYPE_ITEM,
G_ADD_PRIVATE (GimpDrawable)
G_IMPLEMENT_INTERFACE (GIMP_TYPE_COLOR_MANAGED, G_IMPLEMENT_INTERFACE (GIMP_TYPE_COLOR_MANAGED,
gimp_color_managed_iface_init) gimp_color_managed_iface_init)
G_IMPLEMENT_INTERFACE (GIMP_TYPE_PICKABLE, G_IMPLEMENT_INTERFACE (GIMP_TYPE_PICKABLE,
...@@ -277,16 +278,12 @@ gimp_drawable_class_init (GimpDrawableClass *klass) ...@@ -277,16 +278,12 @@ gimp_drawable_class_init (GimpDrawableClass *klass)
klass->get_source_node = gimp_drawable_real_get_source_node; klass->get_source_node = gimp_drawable_real_get_source_node;
g_object_class_override_property (object_class, PROP_BUFFER, "buffer"); g_object_class_override_property (object_class, PROP_BUFFER, "buffer");
g_type_class_add_private (klass, sizeof (GimpDrawablePrivate));
} }
static void static void
gimp_drawable_init (GimpDrawable *drawable) gimp_drawable_init (GimpDrawable *drawable)
{ {
drawable->private = G_TYPE_INSTANCE_GET_PRIVATE (drawable, drawable->private = gimp_drawable_get_instance_private (drawable);
GIMP_TYPE_DRAWABLE,
GimpDrawablePrivate);
drawable->private->filter_stack = gimp_filter_stack_new (GIMP_TYPE_FILTER); drawable->private->filter_stack = gimp_filter_stack_new (GIMP_TYPE_FILTER);
} }
......
...@@ -74,9 +74,7 @@ struct _GimpDynamicsPrivate ...@@ -74,9 +74,7 @@ struct _GimpDynamicsPrivate
}; };
#define GET_PRIVATE(output) \ #define GET_PRIVATE(output) \
G_TYPE_INSTANCE_GET_PRIVATE (output, \ ((GimpDynamicsPrivate *) gimp_dynamics_get_instance_private ((GimpDynamics *) (output)))
GIMP_TYPE_DYNAMICS, \
GimpDynamicsPrivate)
static void gimp_dynamics_finalize (GObject *object); static void gimp_dynamics_finalize (GObject *object);
...@@ -106,8 +104,7 @@ static void gimp_dynamics_output_notify (GObject *output, ...@@ -106,8 +104,7 @@ static void gimp_dynamics_output_notify (GObject *output,
GimpDynamics *dynamics); GimpDynamics *dynamics);
G_DEFINE_TYPE (GimpDynamics, gimp_dynamics, G_DEFINE_TYPE_WITH_PRIVATE (GimpDynamics, gimp_dynamics, GIMP_TYPE_DATA)
GIMP_TYPE_DATA)
#define parent_class gimp_dynamics_parent_class #define parent_class gimp_dynamics_parent_class
...@@ -201,8 +198,6 @@ gimp_dynamics_class_init (GimpDynamicsClass *klass) ...@@ -201,8 +198,6 @@ gimp_dynamics_class_init (GimpDynamicsClass *klass)
NULL, NULL, NULL, NULL,
GIMP_TYPE_DYNAMICS_OUTPUT, GIMP_TYPE_DYNAMICS_OUTPUT,
GIMP_CONFIG_PARAM_AGGREGATE); GIMP_CONFIG_PARAM_AGGREGATE);
g_type_class_add_private (klass, sizeof (GimpDynamicsPrivate));
} }
static void static void
......
...@@ -91,9 +91,7 @@ struct _GimpDynamicsOutputPrivate ...@@ -91,9 +91,7 @@ struct _GimpDynamicsOutputPrivate
}; };
#define GET_PRIVATE(output) \ #define GET_PRIVATE(output) \
G_TYPE_INSTANCE_GET_PRIVATE (output, \ ((GimpDynamicsOutputPrivate *) gimp_dynamics_output_get_instance_private ((GimpDynamicsOutput *) (output)))
GIMP_TYPE_DYNAMICS_OUTPUT, \
GimpDynamicsOutputPrivate)
static void gimp_dynamics_output_finalize (GObject *object); static void gimp_dynamics_output_finalize (GObject *object);
...@@ -117,6 +115,7 @@ static void gimp_dynamics_output_curve_dirty (GimpCurve *curve, ...@@ -117,6 +115,7 @@ static void gimp_dynamics_output_curve_dirty (GimpCurve *curve,
G_DEFINE_TYPE_WITH_CODE (GimpDynamicsOutput, gimp_dynamics_output, G_DEFINE_TYPE_WITH_CODE (GimpDynamicsOutput, gimp_dynamics_output,
GIMP_TYPE_OBJECT, GIMP_TYPE_OBJECT,
G_ADD_PRIVATE (GimpDynamicsOutput)
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL)) G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, NULL))
#define parent_class gimp_dynamics_output_parent_class #define parent_class gimp_dynamics_output_parent_class
...@@ -222,8 +221,6 @@ gimp_dynamics_output_class_init (GimpDynamicsOutputClass *klass) ...@@ -222,8 +221,6 @@ gimp_dynamics_output_class_init (GimpDynamicsOutputClass *klass)
NULL, NULL, NULL, NULL,
GIMP_TYPE_CURVE, GIMP_TYPE_CURVE,
GIMP_CONFIG_PARAM_AGGREGATE); GIMP_CONFIG_PARAM_AGGREGATE);
g_type_class_add_private (klass, sizeof (GimpDynamicsOutputPrivate));
} }
static void static void
......
...@@ -108,7 +108,7 @@ static void appstream_text_characters (GMarkupParseContext *contex ...@@ -108,7 +108,7 @@ static void appstream_text_characters (GMarkupParseContext *contex
gpointer user_data, gpointer user_data,
GError **error); GError **error);
G_DEFINE_TYPE (GimpExtension, gimp_extension, GIMP_TYPE_OBJECT) G_DEFINE_TYPE_WITH_PRIVATE (GimpExtension, gimp_extension, GIMP_TYPE_OBJECT)
#define parent_class gimp_extension_parent_class #define parent_class gimp_extension_parent_class
...@@ -136,16 +136,12 @@ gimp_extension_class_init (GimpExtensionClass *klass) ...@@ -136,16 +136,12 @@ gimp_extension_class_init (GimpExtensionClass *klass)
g_param_spec_boolean ("running", g_param_spec_boolean ("running",
NULL, NULL, FALSE, NULL, NULL, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
g_type_class_add_private (klass, sizeof (GimpExtensionPrivate));
} }
static void static void
gimp_extension_init (GimpExtension *extension) gimp_extension_init (GimpExtension *extension)
{ {
extension->p = G_TYPE_INSTANCE_GET_PRIVATE (extension, extension->p = gimp_extension_get_instance_private (extension);
GIMP_TYPE_EXTENSION,
GimpExtensionPrivate);
} }
static void static void
......
...@@ -115,7 +115,9 @@ static void gimp_extension_manager_extension_running (GimpExtension ...@@ -115,7 +115,9 @@ static void gimp_extension_manager_extension_running (GimpExtension
GParamSpec *pspec, GParamSpec *pspec,
GimpExtensionManager *manager); GimpExtensionManager *manager);
G_DEFINE_TYPE_WITH_CODE (GimpExtensionManager, gimp_extension_manager, GIMP_TYPE_OBJECT, G_DEFINE_TYPE_WITH_CODE (GimpExtensionManager, gimp_extension_manager,
GIMP_TYPE_OBJECT,
G_ADD_PRIVATE (GimpExtensionManager)
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
gimp_extension_manager_config_iface_init)) gimp_extension_manager_config_iface_init))
...@@ -176,16 +178,12 @@ gimp_extension_manager_class_init (GimpExtensionManagerClass *klass) ...@@ -176,16 +178,12 @@ gimp_extension_manager_class_init (GimpExtensionManagerClass *klass)
g_param_spec_pointer ("plug-in-paths", g_param_spec_pointer ("plug-in-paths",
NULL, NULL, NULL, NULL,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
g_type_class_add_private (klass, sizeof (GimpExtensionManagerPrivate));
} }
static void static void
gimp_extension_manager_init (GimpExtensionManager *manager) gimp_extension_manager_init (GimpExtensionManager *manager)
{ {
manager->p = G_TYPE_INSTANCE_GET_PRIVATE (manager, manager->p = gimp_extension_manager_get_instance_private (manager);
GIMP_TYPE_EXTENSION_MANAGER,
GimpExtensionManagerPrivate);
manager->p->extensions = NULL; manager->p->extensions = NULL;
manager->p->sys_extensions = NULL; manager->p->sys_extensions = NULL;
} }
......
...@@ -64,9 +64,7 @@ struct _GimpFillOptionsPrivate ...@@ -64,9 +64,7 @@ struct _GimpFillOptionsPrivate
}; };
#define GET_PRIVATE(options) \ #define GET_PRIVATE(options) \
G_TYPE_INSTANCE_GET_PRIVATE (options, \ ((GimpFillOptionsPrivate *) gimp_fill_options_get_instance_private ((GimpFillOptions *) (options)))
GIMP_TYPE_FILL_OPTIONS, \
GimpFillOptionsPrivate)
static void gimp_fill_options_config_init (GimpConfigInterface *iface); static void gimp_fill_options_config_init (GimpConfigInterface *iface);
...@@ -86,6 +84,7 @@ static gboolean gimp_fill_options_serialize (GimpConfig *config, ...@@ -86,6 +84,7 @@ static gboolean gimp_fill_options_serialize (GimpConfig *config,
G_DEFINE_TYPE_WITH_CODE (GimpFillOptions, gimp_fill_options, GIMP_TYPE_CONTEXT, G_DEFINE_TYPE_WITH_CODE (GimpFillOptions, gimp_fill_options, GIMP_TYPE_CONTEXT,
G_ADD_PRIVATE (GimpFillOptions)
G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG, G_IMPLEMENT_INTERFACE (GIMP_TYPE_CONFIG,
gimp_fill_options_config_init)) gimp_fill_options_config_init))
...@@ -129,8 +128,6 @@ gimp_fill_options_class_init (GimpFillOptionsClass *klass) ...@@ -129,8 +128,6 @@ gimp_fill_options_class_init (GimpFillOptionsClass *klass)
GIMP_VIEW_SIZE_SMALL, GIMP_VIEW_SIZE_SMALL,
G_PARAM_CONSTRUCT | G_PARAM_CONSTRUCT |
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
g_type_class_add_private (klass, sizeof (GimpFillOptionsPrivate));
} }
static void static void
......
...@@ -56,9 +56,7 @@ struct _GimpFilterPrivate ...@@ -56,9 +56,7 @@ struct _GimpFilterPrivate
GimpApplicator *applicator; GimpApplicator *applicator;
}; };
#define GET_PRIVATE(filter) G_TYPE_INSTANCE_GET_PRIVATE (filter, \ #define GET_PRIVATE(filter) ((GimpFilterPrivate *) gimp_filter_get_instance_private ((GimpFilter *) (filter)))
GIMP_TYPE_FILTER, \
GimpFilterPrivate)
/* local function prototypes */ /* local function prototypes */
...@@ -79,7 +77,7 @@ static gint64 gimp_filter_get_memsize (GimpObject *object, ...@@ -79,7 +77,7 @@ static gint64 gimp_filter_get_memsize (GimpObject *object,
static GeglNode * gimp_filter_real_get_node (GimpFilter *filter); static GeglNode * gimp_filter_real_get_node (GimpFilter *filter);
G_DEFINE_TYPE (GimpFilter, gimp_filter, GIMP_TYPE_VIEWABLE) G_DEFINE_TYPE_WITH_PRIVATE (GimpFilter, gimp_filter, GIMP_TYPE_VIEWABLE)
#define parent_class gimp_filter_parent_class #define parent_class gimp_filter_parent_class
...@@ -120,8 +118,6 @@ gimp_filter_class_init (GimpFilterClass *klass) ...@@ -120,8 +118,6 @@ gimp_filter_class_init (GimpFilterClass *klass)
NULL, NULL, NULL, NULL,
FALSE, FALSE,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
g_type_class_add_private (klass, sizeof (GimpFilterPrivate));
} }
static void static void
......
...@@ -74,9 +74,7 @@ struct _GimpGroupLayerPrivate ...@@ -74,9 +74,7 @@ struct _GimpGroupLayerPrivate
gint reallocate_height;