From 72dd61aa3a3a98bf38c2cc3aa7e36f99b620be24 Mon Sep 17 00:00:00 2001 From: infirit Date: Thu, 9 Jul 2015 12:08:18 +0200 Subject: Use accessor functions instead of direct access Make Gtk2 build with GSEAL_ENABLE And cut down on ifdef hell. --- savers/gste-slideshow.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'savers/gste-slideshow.c') diff --git a/savers/gste-slideshow.c b/savers/gste-slideshow.c index 4bc5dbb..72ca87b 100644 --- a/savers/gste-slideshow.c +++ b/savers/gste-slideshow.c @@ -194,7 +194,7 @@ start_fade (GSTESlideshow *show, gdk_pixbuf_get_height (colored), pixbuf, 0, 0); #else - pixmap = gdk_pixmap_new (NULL, ph, pw, gdk_visual_get_system ()->depth); + pixmap = gdk_pixmap_new (NULL, ph, pw, gdk_visual_get_depth (gdk_visual_get_system ())); gdk_draw_pixbuf (pixmap, NULL, colored, 0, 0, 0, 0, -1, -1, GDK_RGB_DITHER_MAX, 0, 0); gdk_pixbuf_get_from_drawable (pixbuf, pixmap, NULL, 0, 0, 0, 0, -1, -1); @@ -339,7 +339,7 @@ update_display (GSTESlideshow *show) gtk_widget_queue_draw (GTK_WIDGET (show)); #else /* paint the image buffer into the window */ - cr = gdk_cairo_create (GTK_WIDGET (show)->window); + cr = gdk_cairo_create (gtk_widget_get_window (GTK_WIDGET (show))); cairo_set_source_surface (cr, show->priv->surf, 0, 0); @@ -951,11 +951,7 @@ gste_slideshow_real_configure (GtkWidget *widget, cairo_surface_destroy (show->priv->surf); } -#if GTK_CHECK_VERSION (3, 0, 0) cr = gdk_cairo_create (gtk_widget_get_window (widget)); -#else - cr = gdk_cairo_create (widget->window); -#endif show->priv->surf = cairo_surface_create_similar (cairo_get_target (cr), CAIRO_CONTENT_COLOR, show->priv->window_width, -- cgit v1.2.1