summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-05-16 13:50:23 +0800
committerlukefromdc <[email protected]>2019-05-21 03:53:21 +0000
commitbb5c42041ea0f486d1dda48fdbd2853951f2d78e (patch)
treeafaca45ea414cd6caeabd1aa229a5de43e643f24
parente085328f56f2fa9aac2b26cb49ec143877968f19 (diff)
downloadmate-applets-bb5c42041ea0f486d1dda48fdbd2853951f2d78e.tar.bz2
mate-applets-bb5c42041ea0f486d1dda48fdbd2853951f2d78e.tar.xz
mateweather: deprecated g_type_class_add_private
-rw-r--r--mateweather/mateweather-dialog.c9
-rw-r--r--mateweather/mateweather-pref.c10
2 files changed, 4 insertions, 15 deletions
diff --git a/mateweather/mateweather-dialog.c b/mateweather/mateweather-dialog.c
index 4d1ff522..b6a67b14 100644
--- a/mateweather/mateweather-dialog.c
+++ b/mateweather/mateweather-dialog.c
@@ -53,10 +53,7 @@ enum {
PROP_MATEWEATHER_APPLET,
};
-G_DEFINE_TYPE(MateWeatherDialog, mateweather_dialog, GTK_TYPE_DIALOG);
-
-#define MATEWEATHER_DIALOG_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE((obj), MATEWEATHER_TYPE_DIALOG, MateWeatherDialogPrivate))
+G_DEFINE_TYPE_WITH_PRIVATE (MateWeatherDialog, mateweather_dialog, GTK_TYPE_DIALOG);
#define MONOSPACE_FONT_SCHEMA "org.mate.interface"
#define MONOSPACE_FONT_KEY "monospace-font-name"
@@ -642,7 +639,7 @@ static void mateweather_dialog_get_property(GObject* object, guint prop_id, GVal
static void mateweather_dialog_init(MateWeatherDialog* self)
{
- self->priv = MATEWEATHER_DIALOG_GET_PRIVATE (self);
+ self->priv = mateweather_dialog_get_instance_private (self);
}
static GObject* mateweather_dialog_constructor(GType type, guint n_construct_params, GObjectConstructParam* construct_params)
@@ -690,6 +687,4 @@ static void mateweather_dialog_class_init(MateWeatherDialogClass* klass)
/* This becomes an OBJECT property when MateWeatherApplet is redone */
g_object_class_install_property(object_class, PROP_MATEWEATHER_APPLET, g_param_spec_pointer ("mateweather-applet", "MateWeather Applet", "The MateWeather Applet", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
- g_type_class_add_private(klass, sizeof(MateWeatherDialogPrivate));
}
diff --git a/mateweather/mateweather-pref.c b/mateweather/mateweather-pref.c
index 0446faad..a03afca8 100644
--- a/mateweather/mateweather-pref.c
+++ b/mateweather/mateweather-pref.c
@@ -72,11 +72,7 @@ enum {
PROP_MATEWEATHER_APPLET,
};
-G_DEFINE_TYPE(MateWeatherPref, mateweather_pref, GTK_TYPE_DIALOG);
-
-#define MATEWEATHER_PREF_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE((obj), MATEWEATHER_TYPE_PREF, MateWeatherPrefPrivate))
-
+G_DEFINE_TYPE_WITH_PRIVATE (MateWeatherPref, mateweather_pref, GTK_TYPE_DIALOG);
/* set sensitive and setup NEVER_SENSITIVE appropriately */
static void hard_set_sensitive(GtkWidget* w, gboolean sensitivity)
@@ -1186,7 +1182,7 @@ static void mateweather_pref_get_property(GObject* object, guint prop_id, GValue
static void mateweather_pref_init(MateWeatherPref* self)
{
- self->priv = MATEWEATHER_PREF_GET_PRIVATE(self);
+ self->priv = mateweather_pref_get_instance_private(self);
}
@@ -1235,8 +1231,6 @@ static void mateweather_pref_class_init(MateWeatherPrefClass* klass)
/* This becomes an OBJECT property when MateWeatherApplet is redone */
g_object_class_install_property(object_class, PROP_MATEWEATHER_APPLET, g_param_spec_pointer("mateweather-applet", "MateWeather Applet", "The MateWeather Applet", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
- g_type_class_add_private(klass, sizeof(MateWeatherPrefPrivate));
}