summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-09-05 02:55:33 +0200
committerVictor Kareh <[email protected]>2019-10-02 06:48:58 -0400
commit7e0e0e442e9d196eecf27df1ae3c59029b9b497e (patch)
treed804c07208bad7e63a39fb85833c7cc014e07467
parent86cb5f8a9802686be8966dc036098454412f74d3 (diff)
downloadmate-screensaver-7e0e0e442e9d196eecf27df1ae3c59029b9b497e.tar.bz2
mate-screensaver-7e0e0e442e9d196eecf27df1ae3c59029b9b497e.tar.xz
gs-fade: avoid 'g_type_class_add_private'
-rw-r--r--src/gs-fade.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gs-fade.c b/src/gs-fade.c
index 8e9a858..3248260 100644
--- a/src/gs-fade.c
+++ b/src/gs-fade.c
@@ -60,8 +60,6 @@ static void gs_fade_class_init (GSFadeClass *klass);
static void gs_fade_init (GSFade *fade);
static void gs_fade_finalize (GObject *object);
-#define GS_FADE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GS_TYPE_FADE, GSFadePrivate))
-
struct GSGammaInfo
{
int size;
@@ -121,7 +119,7 @@ enum
static guint signals [LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (GSFade, gs_fade, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GSFade, gs_fade, G_TYPE_OBJECT)
static gpointer fade_object = NULL;
@@ -892,14 +890,12 @@ gs_fade_class_init (GSFadeClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE,
0, G_TYPE_NONE);
-
- g_type_class_add_private (klass, sizeof (GSFadePrivate));
}
static void
gs_fade_init (GSFade *fade)
{
- fade->priv = GS_FADE_GET_PRIVATE (fade);
+ fade->priv = gs_fade_get_instance_private (fade);
fade->priv->timeout = 1000;
fade->priv->current_alpha = 1.0;