summaryrefslogtreecommitdiff
path: root/src/math-display.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-12-15 19:25:29 +0100
committerraveit65 <[email protected]>2018-12-17 17:52:35 +0100
commitf13a0231e030224e96667cc774dc3aa18fddfcac (patch)
tree01ac8c4404dc0036be93ac6a277872aa6e31a060 /src/math-display.c
parent72aee7fe9f6574b2a4a9b2c63b9fd775ed93e205 (diff)
downloadmate-calc-f13a0231e030224e96667cc774dc3aa18fddfcac.tar.bz2
mate-calc-f13a0231e030224e96667cc774dc3aa18fddfcac.tar.xz
math-display: avoid deprecated 'g_type_class_add_private'
Diffstat (limited to 'src/math-display.c')
-rw-r--r--src/math-display.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/math-display.c b/src/math-display.c
index c6e5ce2..c8c5d0f 100644
--- a/src/math-display.c
+++ b/src/math-display.c
@@ -34,7 +34,7 @@ struct MathDisplayPrivate
GtkWidget *spinner;
};
-G_DEFINE_TYPE (MathDisplay, math_display, GTK_TYPE_VIEWPORT);
+G_DEFINE_TYPE_WITH_PRIVATE (MathDisplay, math_display, GTK_TYPE_VIEWPORT);
#define GET_WIDGET(ui, name) GTK_WIDGET(gtk_builder_get_object(ui, name))
@@ -434,8 +434,6 @@ math_display_class_init(MathDisplayClass *klass)
object_class->get_property = math_display_get_property;
object_class->set_property = math_display_set_property;
- g_type_class_add_private(klass, sizeof(MathDisplayPrivate));
-
g_object_class_install_property(object_class,
PROP_EQUATION,
g_param_spec_object("equation",
@@ -449,5 +447,5 @@ math_display_class_init(MathDisplayClass *klass)
static void
math_display_init(MathDisplay *display)
{
- display->priv = G_TYPE_INSTANCE_GET_PRIVATE(display, math_display_get_type(), MathDisplayPrivate);
+ display->priv = math_display_get_instance_private (display);
}