Skip to content
Permalink
Browse files

math-preferences: avoid deprecated 'g_type_class_add_private'

  • Loading branch information...
sc0w committed Jan 26, 2019
1 parent 0dd1f73 commit 740f9a571ff20c9cc3a2241edea9864a77f07c7f
Showing with 3 additions and 4 deletions.
  1. +3 −4 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);
}

0 comments on commit 740f9a5

Please sign in to comment.
You can’t perform that action at this time.