From e0e01b806ca252ef07147527c1e51bd4e2b523ff Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Sat, 26 Jan 2019 16:46:47 +0100 Subject: math-variable-popup: avoid deprecated 'g_type_class_add_private' --- src/math-variable-popup.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/math-variable-popup.c b/src/math-variable-popup.c index e5c0926..787d13e 100644 --- a/src/math-variable-popup.c +++ b/src/math-variable-popup.c @@ -27,7 +27,7 @@ struct MathVariablePopupPrivate GtkWidget *add_variable_button; }; -G_DEFINE_TYPE (MathVariablePopup, math_variable_popup, GTK_TYPE_WINDOW); +G_DEFINE_TYPE_WITH_PRIVATE (MathVariablePopup, math_variable_popup, GTK_TYPE_WINDOW); MathVariablePopup * math_variable_popup_new(MathEquation *equation) @@ -276,8 +276,6 @@ math_variable_popup_class_init(MathVariablePopupClass *klass) object_class->get_property = math_variable_popup_get_property; object_class->set_property = math_variable_popup_set_property; - g_type_class_add_private(klass, sizeof(MathVariablePopupPrivate)); - g_object_class_install_property(object_class, PROP_EQUATION, g_param_spec_object("equation", @@ -291,7 +289,7 @@ math_variable_popup_class_init(MathVariablePopupClass *klass) static void math_variable_popup_init(MathVariablePopup *popup) { - popup->priv = G_TYPE_INSTANCE_GET_PRIVATE(popup, math_variable_popup_get_type(), MathVariablePopupPrivate); + popup->priv = math_variable_popup_get_instance_private (popup); gtk_window_set_decorated(GTK_WINDOW(popup), FALSE); gtk_window_set_skip_taskbar_hint(GTK_WINDOW(popup), TRUE); -- cgit v1.2.1