summaryrefslogtreecommitdiff
path: root/libmate-desktop/mate-bg-crossfade.c
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-01-26 21:46:37 +0800
committerlukefromdc <[email protected]>2019-01-29 20:18:27 +0000
commit46950f4bbedb593a4dc792b88c15977953904e2b (patch)
tree90c8630dc5a99483a3f6cea539ea4a2dc640c7c9 /libmate-desktop/mate-bg-crossfade.c
parent6d30b651e3f2ac1ac668c741e19d2fc1cde62b3e (diff)
downloadmate-desktop-46950f4bbedb593a4dc792b88c15977953904e2b.tar.bz2
mate-desktop-46950f4bbedb593a4dc792b88c15977953904e2b.tar.xz
Avoid deprecated g_type_class_add_private
Changed MateBgCrossfade, MateColorbutton and MateDesktopThumbnail
Diffstat (limited to 'libmate-desktop/mate-bg-crossfade.c')
-rw-r--r--libmate-desktop/mate-bg-crossfade.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libmate-desktop/mate-bg-crossfade.c b/libmate-desktop/mate-bg-crossfade.c
index 96e48eb..78e9b83 100644
--- a/libmate-desktop/mate-bg-crossfade.c
+++ b/libmate-desktop/mate-bg-crossfade.c
@@ -66,10 +66,7 @@ enum {
static guint signals[NUMBER_OF_SIGNALS] = { 0 };
-G_DEFINE_TYPE (MateBGCrossfade, mate_bg_crossfade, G_TYPE_OBJECT)
-#define MATE_BG_CROSSFADE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o),\
- MATE_TYPE_BG_CROSSFADE,\
- MateBGCrossfadePrivate))
+G_DEFINE_TYPE_WITH_PRIVATE (MateBGCrossfade, mate_bg_crossfade, G_TYPE_OBJECT)
static void
mate_bg_crossfade_set_property (GObject *object,
@@ -201,14 +198,12 @@ mate_bg_crossfade_class_init (MateBGCrossfadeClass *fade_class)
G_SIGNAL_RUN_LAST, 0, NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, G_TYPE_OBJECT);
-
- g_type_class_add_private (gobject_class, sizeof (MateBGCrossfadePrivate));
}
static void
mate_bg_crossfade_init (MateBGCrossfade *fade)
{
- fade->priv = MATE_BG_CROSSFADE_GET_PRIVATE (fade);
+ fade->priv = mate_bg_crossfade_get_instance_private (fade);
fade->priv->window = NULL;
fade->priv->widget = NULL;