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:
@ -82,9 +82,7 @@ struct _GimpSpinScalePrivate
|
||||
gint pointer_warp_start_x;
|
||||
};
|
||||
|
||||
#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
|
||||
GIMP_TYPE_SPIN_SCALE, \
|
||||
GimpSpinScalePrivate))
|
||||
#define GET_PRIVATE(obj) ((GimpSpinScalePrivate *) gimp_spin_scale_get_instance_private ((GimpSpinScale *) (obj)))
|
||||
|
||||
|
||||
static void gimp_spin_scale_dispose (GObject *object);
|
||||
@ -129,7 +127,8 @@ static void gimp_spin_scale_setup_mnemonic (GimpSpinScale *scale,
|
||||
guint previous_keyval);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpSpinScale, gimp_spin_scale, GTK_TYPE_SPIN_BUTTON);
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GimpSpinScale, gimp_spin_scale,
|
||||
GTK_TYPE_SPIN_BUTTON)
|
||||
|
||||
#define parent_class gimp_spin_scale_parent_class
|
||||
|
||||
@ -162,8 +161,6 @@ gimp_spin_scale_class_init (GimpSpinScaleClass *klass)
|
||||
g_param_spec_string ("label", NULL, NULL,
|
||||
NULL,
|
||||
GIMP_PARAM_READWRITE));
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GimpSpinScalePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user