summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-01-26 16:39:52 +0100
committerZenWalker <[email protected]>2019-01-29 15:16:52 +0100
commit740f9a571ff20c9cc3a2241edea9864a77f07c7f (patch)
tree12d51023c501995bbbe58b8ef3bcf43f1ee2e18c /src
parent0dd1f73683ef154d892e6f26731f45b4d37439ef (diff)
downloadmate-calc-740f9a571ff20c9cc3a2241edea9864a77f07c7f.tar.bz2
mate-calc-740f9a571ff20c9cc3a2241edea9864a77f07c7f.tar.xz
math-preferences: avoid deprecated 'g_type_class_add_private'
Diffstat (limited to 'src')
-rw-r--r--src/math-preferences.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/math-preferences.c b/src/math-preferences.c
index 4fbb214..1ba91cc 100644
--- a/src/math-preferences.c
+++ b/src/math-preferences.c
@@ -14,7 +14,6 @@
#include "math-preferences.h"
#include "utility.h"
-G_DEFINE_TYPE (MathPreferencesDialog, math_preferences, GTK_TYPE_DIALOG);
enum {
PROP_0,
@@ -27,6 +26,8 @@ struct MathPreferencesDialogPrivate
GtkBuilder *ui;
};
+G_DEFINE_TYPE_WITH_PRIVATE (MathPreferencesDialog, math_preferences, GTK_TYPE_DIALOG);
+
#define UI_DIALOGS_FILE UI_DIR "/preferences.ui"
#define GET_WIDGET(ui, name) \
GTK_WIDGET(gtk_builder_get_object(ui, name))
@@ -386,8 +387,6 @@ math_preferences_class_init(MathPreferencesDialogClass *klass)
object_class->get_property = math_preferences_get_property;
object_class->set_property = math_preferences_set_property;
- g_type_class_add_private(klass, sizeof(MathPreferencesDialogPrivate));
-
g_object_class_install_property(object_class,
PROP_EQUATION,
g_param_spec_object("equation",
@@ -401,5 +400,5 @@ math_preferences_class_init(MathPreferencesDialogClass *klass)
static void
math_preferences_init(MathPreferencesDialog *dialog)
{
- dialog->priv = G_TYPE_INSTANCE_GET_PRIVATE(dialog, math_preferences_get_type(), MathPreferencesDialogPrivate);
+ dialog->priv = math_preferences_get_instance_private (dialog);
}