diff options
author | Pablo Barciela <[email protected]> | 2019-01-26 16:06:00 +0100 |
---|---|---|
committer | ZenWalker <[email protected]> | 2019-01-29 15:16:05 +0100 |
commit | b85ea87947cfe40246ccfa8844f406069c91cf62 (patch) | |
tree | 56402786cbd08ffd541c3706311a9a92ae244936 /src/math-converter.c | |
parent | f9e4e7ed260bed84d8c1963b982683c3066ef5ad (diff) | |
download | mate-calc-b85ea87947cfe40246ccfa8844f406069c91cf62.tar.bz2 mate-calc-b85ea87947cfe40246ccfa8844f406069c91cf62.tar.xz |
math-converter: avoid deprecated 'g_type_class_add_private'
Diffstat (limited to 'src/math-converter.c')
-rw-r--r-- | src/math-converter.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/math-converter.c b/src/math-converter.c index 02eba4b..d5c637c 100644 --- a/src/math-converter.c +++ b/src/math-converter.c @@ -33,7 +33,7 @@ struct MathConverterPrivate }; -G_DEFINE_TYPE (MathConverter, math_converter, GTK_TYPE_BOX); +G_DEFINE_TYPE_WITH_PRIVATE (MathConverter, math_converter, GTK_TYPE_BOX); static void display_changed_cb(MathEquation *equation, GParamSpec *spec, MathConverter *converter); static void update_from_model(MathConverter *converter); @@ -288,8 +288,6 @@ math_converter_get_conversion(MathConverter *converter, Unit **from_unit, Unit * static void math_converter_class_init(MathConverterClass *klass) { - g_type_class_add_private(klass, sizeof(MathConverterPrivate)); - signals[CHANGED] = g_signal_new("changed", G_TYPE_FROM_CLASS (klass), @@ -387,7 +385,7 @@ math_converter_init(MathConverter *converter) GtkWidget *hbox, *label, *swap_button; GtkCellRenderer *renderer; - converter->priv = G_TYPE_INSTANCE_GET_PRIVATE(converter, math_converter_get_type(), MathConverterPrivate); + converter->priv = math_converter_get_instance_private (converter); gtk_box_set_spacing(GTK_BOX(converter), 6); gtk_orientable_set_orientation (GTK_ORIENTABLE (converter), |