File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ struct MathWindowPrivate
4848 GtkWidget * mode_programming_menu_item ;
4949};
5050
51- G_DEFINE_TYPE (MathWindow , math_window , GTK_TYPE_WINDOW );
51+ G_DEFINE_TYPE_WITH_PRIVATE (MathWindow , math_window , GTK_TYPE_WINDOW );
5252
5353enum
5454{
@@ -536,8 +536,6 @@ math_window_class_init(MathWindowClass *klass)
536536 object_class -> get_property = math_window_get_property ;
537537 object_class -> set_property = math_window_set_property ;
538538
539- g_type_class_add_private (klass , sizeof (MathWindowPrivate ));
540-
541539 g_object_class_install_property (object_class ,
542540 PROP_EQUATION ,
543541 g_param_spec_object ("equation" ,
@@ -559,7 +557,7 @@ math_window_class_init(MathWindowClass *klass)
559557static void
560558math_window_init (MathWindow * window )
561559{
562- window -> priv = G_TYPE_INSTANCE_GET_PRIVATE ( window , math_window_get_type (), MathWindowPrivate );
560+ window -> priv = math_window_get_instance_private ( window );
563561 gtk_window_set_title (GTK_WINDOW (window ),
564562 /* Title of main window */
565563 _ ("Calculator" ));
You can’t perform that action at this time.
0 commit comments