summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-01-26 12:57:27 +0100
committerZenWalker <[email protected]>2019-01-29 15:15:13 +0100
commit8c5611d94c7f16eed496a6ae8736e194481d1e7e (patch)
treebe9febd5c4a30410e19edcb35349b1f598c042b2 /src
parent9ac7540c7f7026266b4f849c09bf35a08869220b (diff)
downloadmate-calc-8c5611d94c7f16eed496a6ae8736e194481d1e7e.tar.bz2
mate-calc-8c5611d94c7f16eed496a6ae8736e194481d1e7e.tar.xz
math-window: avoid deprecated 'g_type_class_add_private'
Diffstat (limited to 'src')
-rw-r--r--src/math-window.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/math-window.c b/src/math-window.c
index c24b3fa..54a0e90 100644
--- a/src/math-window.c
+++ b/src/math-window.c
@@ -48,7 +48,7 @@ struct MathWindowPrivate
GtkWidget *mode_programming_menu_item;
};
-G_DEFINE_TYPE (MathWindow, math_window, GTK_TYPE_WINDOW);
+G_DEFINE_TYPE_WITH_PRIVATE (MathWindow, math_window, GTK_TYPE_WINDOW);
enum
{
@@ -536,8 +536,6 @@ math_window_class_init(MathWindowClass *klass)
object_class->get_property = math_window_get_property;
object_class->set_property = math_window_set_property;
- g_type_class_add_private(klass, sizeof(MathWindowPrivate));
-
g_object_class_install_property(object_class,
PROP_EQUATION,
g_param_spec_object("equation",
@@ -559,7 +557,7 @@ math_window_class_init(MathWindowClass *klass)
static void
math_window_init(MathWindow *window)
{
- window->priv = G_TYPE_INSTANCE_GET_PRIVATE(window, math_window_get_type(), MathWindowPrivate);
+ window->priv = math_window_get_instance_private (window);
gtk_window_set_title(GTK_WINDOW(window),
/* Title of main window */
_("Calculator"));