diff options
author | Pablo Barciela <[email protected]> | 2019-01-29 19:40:53 +0100 |
---|---|---|
committer | ZenWalker <[email protected]> | 2019-01-30 20:18:19 +0100 |
commit | fc0720e957613ba78e11c05da75b6611ec779498 (patch) | |
tree | 9810f175c8e9f16533e7dc1c0983623b5f48caf1 | |
parent | a61f07d0f1dc4ab88ad655ef23cbcd66277980cf (diff) | |
download | mate-calc-fc0720e957613ba78e11c05da75b6611ec779498.tar.bz2 mate-calc-fc0720e957613ba78e11c05da75b6611ec779498.tar.xz |
math-equation: avoid deprecated 'g_type_class_add_private'
-rw-r--r-- | src/math-equation.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/math-equation.c b/src/math-equation.c index 2aa687b..c8bca64 100644 --- a/src/math-equation.c +++ b/src/math-equation.c @@ -103,7 +103,7 @@ typedef struct { gchar *error; } SolveData; -G_DEFINE_TYPE (MathEquation, math_equation, GTK_TYPE_TEXT_BUFFER); +G_DEFINE_TYPE_WITH_PRIVATE (MathEquation, math_equation, GTK_TYPE_TEXT_BUFFER); MathEquation * @@ -1669,8 +1669,6 @@ math_equation_class_init(MathEquationClass *klass) object_class->set_property = math_equation_set_property; object_class->constructed = math_equation_constructed; - g_type_class_add_private(klass, sizeof(MathEquationPrivate)); - number_mode_type = g_enum_register_static("NumberMode", number_mode_values); number_format_type = math_mp_display_format_get_type(); angle_unit_type = g_enum_register_static("AngleUnit", angle_unit_values); @@ -1923,7 +1921,7 @@ math_equation_init(MathEquation *equation) gboolean use_default_digits = TRUE; int i; - equation->priv = G_TYPE_INSTANCE_GET_PRIVATE(equation, math_equation_get_type(), MathEquationPrivate); + equation->priv = math_equation_get_instance_private (equation); g_signal_connect(equation, "insert-text", G_CALLBACK(pre_insert_text_cb), equation); g_signal_connect(equation, "delete-range", G_CALLBACK(pre_delete_range_cb), equation); |