diff options
author | Pablo Barciela <[email protected]> | 2019-01-26 15:58:39 +0100 |
---|---|---|
committer | ZenWalker <[email protected]> | 2019-01-29 15:15:40 +0100 |
commit | f9e4e7ed260bed84d8c1963b982683c3066ef5ad (patch) | |
tree | 8c3ff6cc7e297790324d59ef4adf1d211496fa3e /src | |
parent | 8c5611d94c7f16eed496a6ae8736e194481d1e7e (diff) | |
download | mate-calc-f9e4e7ed260bed84d8c1963b982683c3066ef5ad.tar.bz2 mate-calc-f9e4e7ed260bed84d8c1963b982683c3066ef5ad.tar.xz |
math-buttons: avoid deprecated 'g_type_class_add_private'
Diffstat (limited to 'src')
-rw-r--r-- | src/math-buttons.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/math-buttons.c b/src/math-buttons.c index 69aad47..8334706 100644 --- a/src/math-buttons.c +++ b/src/math-buttons.c @@ -58,7 +58,7 @@ struct MathButtonsPrivate GtkWidget *character_code_entry; }; -G_DEFINE_TYPE (MathButtons, math_buttons, GTK_TYPE_BOX); +G_DEFINE_TYPE_WITH_PRIVATE (MathButtons, math_buttons, GTK_TYPE_BOX); #define UI_BASIC_FILE UI_DIR "/buttons-basic.ui" #define UI_ADVANCED_FILE UI_DIR "/buttons-advanced.ui" @@ -1331,8 +1331,6 @@ math_buttons_class_init(MathButtonsClass *klass) object_class->get_property = math_buttons_get_property; object_class->set_property = math_buttons_set_property; - g_type_class_add_private(klass, sizeof(MathButtonsPrivate)); - button_mode_type = g_enum_register_static("ButtonMode", button_mode_values); g_object_class_install_property(object_class, @@ -1363,7 +1361,7 @@ math_buttons_class_init(MathButtonsClass *klass) static void math_buttons_init(MathButtons *buttons) { - buttons->priv = G_TYPE_INSTANCE_GET_PRIVATE(buttons, math_buttons_get_type(), MathButtonsPrivate); + buttons->priv = math_buttons_get_instance_private (buttons); gtk_box_set_spacing(GTK_BOX(buttons), 6); gtk_orientable_set_orientation (GTK_ORIENTABLE (buttons), GTK_ORIENTATION_VERTICAL); |