Skip to content
Permalink
Browse files

math-window: avoid deprecated 'g_type_class_add_private'

  • Loading branch information...
sc0w committed Jan 26, 2019
1 parent 9ac7540 commit 8c5611d94c7f16eed496a6ae8736e194481d1e7e
Showing with 2 additions and 4 deletions.
  1. +2 −4 src/math-window.c
@@ -48,7 +48,7 @@ struct MathWindowPrivate
GtkWidget *mode_programming_menu_item;
};

G_DEFINE_TYPE (MathWindow, math_window, GTK_TYPE_WINDOW);
G_DEFINE_TYPE_WITH_PRIVATE (MathWindow, math_window, GTK_TYPE_WINDOW);

enum
{
@@ -536,8 +536,6 @@ math_window_class_init(MathWindowClass *klass)
object_class->get_property = math_window_get_property;
object_class->set_property = math_window_set_property;

g_type_class_add_private(klass, sizeof(MathWindowPrivate));

g_object_class_install_property(object_class,
PROP_EQUATION,
g_param_spec_object("equation",
@@ -559,7 +557,7 @@ math_window_class_init(MathWindowClass *klass)
static void
math_window_init(MathWindow *window)
{
window->priv = G_TYPE_INSTANCE_GET_PRIVATE(window, math_window_get_type(), MathWindowPrivate);
window->priv = math_window_get_instance_private (window);
gtk_window_set_title(GTK_WINDOW(window),
/* Title of main window */
_("Calculator"));

0 comments on commit 8c5611d

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