File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1414#include "math-preferences.h"
1515#include "utility.h"
1616
17- G_DEFINE_TYPE (MathPreferencesDialog , math_preferences , GTK_TYPE_DIALOG );
1817
1918enum {
2019 PROP_0 ,
@@ -27,6 +26,8 @@ struct MathPreferencesDialogPrivate
2726 GtkBuilder * ui ;
2827};
2928
29+ G_DEFINE_TYPE_WITH_PRIVATE (MathPreferencesDialog , math_preferences , GTK_TYPE_DIALOG );
30+
3031#define UI_DIALOGS_FILE UI_DIR "/preferences.ui"
3132#define GET_WIDGET (ui , name ) \
3233 GTK_WIDGET(gtk_builder_get_object(ui, name))
@@ -386,8 +387,6 @@ math_preferences_class_init(MathPreferencesDialogClass *klass)
386387 object_class -> get_property = math_preferences_get_property ;
387388 object_class -> set_property = math_preferences_set_property ;
388389
389- g_type_class_add_private (klass , sizeof (MathPreferencesDialogPrivate ));
390-
391390 g_object_class_install_property (object_class ,
392391 PROP_EQUATION ,
393392 g_param_spec_object ("equation" ,
@@ -401,5 +400,5 @@ math_preferences_class_init(MathPreferencesDialogClass *klass)
401400static void
402401math_preferences_init (MathPreferencesDialog * dialog )
403402{
404- dialog -> priv = G_TYPE_INSTANCE_GET_PRIVATE ( dialog , math_preferences_get_type (), MathPreferencesDialogPrivate );
403+ dialog -> priv = math_preferences_get_instance_private ( dialog );
405404}
You can’t perform that action at this time.
0 commit comments