diff options
author | Pablo Barciela <[email protected]> | 2019-09-03 02:55:31 +0200 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2019-10-02 06:48:58 -0400 |
commit | 9b64e8677ae24e091768800d09bf8ac8a76b6565 (patch) | |
tree | 075d8b4e0381866a45fcba01f20926eae3f3f824 /savers/gste-slideshow.c | |
parent | 2f8411ed7938be601b9a5c644e00d1ec0cf3846a (diff) | |
download | mate-screensaver-9b64e8677ae24e091768800d09bf8ac8a76b6565.tar.bz2 mate-screensaver-9b64e8677ae24e091768800d09bf8ac8a76b6565.tar.xz |
gste-slideshow: avoid 'g_type_class_add_private'
Diffstat (limited to 'savers/gste-slideshow.c')
-rw-r--r-- | savers/gste-slideshow.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/savers/gste-slideshow.c b/savers/gste-slideshow.c index 49e742f..530d9e8 100644 --- a/savers/gste-slideshow.c +++ b/savers/gste-slideshow.c @@ -87,11 +87,9 @@ enum PROP_NO_STRETCH_HINT }; -#define GSTE_SLIDESHOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSTE_TYPE_SLIDESHOW, GSTESlideshowPrivate)) - static GObjectClass *parent_class = NULL; -G_DEFINE_TYPE (GSTESlideshow, gste_slideshow, GS_TYPE_THEME_ENGINE) +G_DEFINE_TYPE_WITH_PRIVATE (GSTESlideshow, gste_slideshow, GS_TYPE_THEME_ENGINE) #define N_FADE_TICKS 10 #define MINIMUM_FPS 3.0 @@ -934,8 +932,6 @@ gste_slideshow_class_init (GSTESlideshowClass *klass) widget_class->draw = gste_slideshow_real_draw; widget_class->configure_event = gste_slideshow_real_configure; - g_type_class_add_private (klass, sizeof (GSTESlideshowPrivate)); - g_object_class_install_property (object_class, PROP_IMAGES_LOCATION, g_param_spec_string ("images-location", @@ -985,7 +981,7 @@ set_visual (GtkWidget *widget) static void gste_slideshow_init (GSTESlideshow *show) { - show->priv = GSTE_SLIDESHOW_GET_PRIVATE (show); + show->priv = gste_slideshow_get_instance_private (show); show->priv->images_location = g_strdup (DEFAULT_IMAGES_LOCATION); |