summaryrefslogtreecommitdiff
path: root/src/math-preferences.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math-preferences.c')
-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);
}