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:
@ -84,7 +84,8 @@ static void gimp_ui_configurer_configure_for_multi_window (GimpUIC
|
||||
static GimpImageWindow * gimp_ui_configurer_get_uber_window (GimpUIConfigurer *ui_configurer);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpUIConfigurer, gimp_ui_configurer, GIMP_TYPE_OBJECT)
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GimpUIConfigurer, gimp_ui_configurer,
|
||||
GIMP_TYPE_OBJECT)
|
||||
|
||||
#define parent_class gimp_ui_configurer_parent_class
|
||||
|
||||
@ -102,16 +103,12 @@ gimp_ui_configurer_class_init (GimpUIConfigurerClass *klass)
|
||||
GIMP_TYPE_GIMP,
|
||||
GIMP_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
g_type_class_add_private (klass,
|
||||
sizeof (GimpUIConfigurerPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_ui_configurer_init (GimpUIConfigurer *ui_configurer)
|
||||
{
|
||||
ui_configurer->p = G_TYPE_INSTANCE_GET_PRIVATE (ui_configurer,
|
||||
GIMP_TYPE_UI_CONFIGURER,
|
||||
GimpUIConfigurerPrivate);
|
||||
ui_configurer->p = gimp_ui_configurer_get_instance_private (ui_configurer);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user