summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-09-03 02:57:21 +0200
committerVictor Kareh <[email protected]>2019-10-02 06:48:58 -0400
commit09de46a8f9752b409af9d4d8c4c3790b4d362ca5 (patch)
treee21c61d6f1fd6c0a06dff9f4754cf2b85fc35d7d
parent9b64e8677ae24e091768800d09bf8ac8a76b6565 (diff)
downloadmate-screensaver-09de46a8f9752b409af9d4d8c4c3790b4d362ca5.tar.bz2
mate-screensaver-09de46a8f9752b409af9d4d8c4c3790b4d362ca5.tar.xz
gste-popsquares: avoid 'g_type_class_add_private'
-rw-r--r--savers/gste-popsquares.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/savers/gste-popsquares.c b/savers/gste-popsquares.c
index 3a66c49..4284186 100644
--- a/savers/gste-popsquares.c
+++ b/savers/gste-popsquares.c
@@ -55,11 +55,9 @@ struct GSTEPopsquaresPrivate
square *squares;
};
-#define GSTE_POPSQUARES_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSTE_TYPE_POPSQUARES, GSTEPopsquaresPrivate))
-
static GObjectClass *parent_class = NULL;
-G_DEFINE_TYPE (GSTEPopsquares, gste_popsquares, GS_TYPE_THEME_ENGINE)
+G_DEFINE_TYPE_WITH_PRIVATE (GSTEPopsquares, gste_popsquares, GS_TYPE_THEME_ENGINE)
static void
hsv_to_rgb (int h,
@@ -502,8 +500,6 @@ gste_popsquares_class_init (GSTEPopsquaresClass *klass)
widget_class->show = gste_popsquares_real_show;
widget_class->draw = gste_popsquares_real_draw;
widget_class->configure_event = gste_popsquares_real_configure;
-
- g_type_class_add_private (klass, sizeof (GSTEPopsquaresPrivate));
}
static void
@@ -574,7 +570,7 @@ gste_popsquares_init (GSTEPopsquares *pop)
{
int delay;
- pop->priv = GSTE_POPSQUARES_GET_PRIVATE (pop);
+ pop->priv = gste_popsquares_get_instance_private (pop);
pop->priv->ncolors = 128;
pop->priv->subdivision = 5;