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:
@ -112,6 +112,7 @@ static void gimp_editor_config_size_changed (GimpGuiConfig *config,
|
||||
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GimpEditor, gimp_editor, GTK_TYPE_BOX,
|
||||
G_ADD_PRIVATE (GimpEditor)
|
||||
G_IMPLEMENT_INTERFACE (GIMP_TYPE_DOCKED,
|
||||
gimp_editor_docked_iface_init))
|
||||
|
||||
@ -200,8 +201,6 @@ gimp_editor_class_init (GimpEditorClass *klass)
|
||||
GTK_TYPE_RELIEF_STYLE,
|
||||
DEFAULT_BUTTON_RELIEF,
|
||||
GIMP_PARAM_READABLE));
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GimpEditorPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -219,9 +218,7 @@ gimp_editor_init (GimpEditor *editor)
|
||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (editor),
|
||||
GTK_ORIENTATION_VERTICAL);
|
||||
|
||||
editor->priv = G_TYPE_INSTANCE_GET_PRIVATE (editor,
|
||||
GIMP_TYPE_EDITOR,
|
||||
GimpEditorPrivate);
|
||||
editor->priv = gimp_editor_get_instance_private (editor);
|
||||
editor->priv->popup_data = editor;
|
||||
editor->priv->show_button_bar = TRUE;
|
||||
|
||||
|
Reference in New Issue
Block a user