diff options
author | Pablo Barciela <[email protected]> | 2019-01-26 16:46:47 +0100 |
---|---|---|
committer | ZenWalker <[email protected]> | 2019-01-29 15:17:19 +0100 |
commit | e0e01b806ca252ef07147527c1e51bd4e2b523ff (patch) | |
tree | 1c3b13e1dc5ec125dfa71830f2dd748023175173 /src | |
parent | 740f9a571ff20c9cc3a2241edea9864a77f07c7f (diff) | |
download | mate-calc-e0e01b806ca252ef07147527c1e51bd4e2b523ff.tar.bz2 mate-calc-e0e01b806ca252ef07147527c1e51bd4e2b523ff.tar.xz |
math-variable-popup: avoid deprecated 'g_type_class_add_private'
Diffstat (limited to 'src')
-rw-r--r-- | src/math-variable-popup.c | 6 |
1 files 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); |