Re: Build break with latest GTK+ 3



On Thu, 2010-09-02 at 11:03 +0200, Murray Cumming wrote:
> On Tue, 2010-08-31 at 12:28 +0200, Murray Cumming wrote:
> > git master of goocanvas currently doesn't build against git master of
> > GTK+, which has removed GdkGC, apparently in favor of using cairo_t.
> > 
> > goocanvas.c: In function ‘goo_canvas_expose_event’:
> > goocanvas.c:2695: error: ‘GtkStyle’ has no member named ‘base_gc’.
> 
> Luckily that is the only code in goocanvas affected by the change:
> 
>   /* Clear the background. */
>   if (canvas->clear_background)
>     {
>       gdk_draw_rectangle (canvas->canvas_window,
> 			  gtk_widget_get_style (widget)->base_gc[gtk_widget_get_state
> (widget)], TRUE,
> 			  event->area.x, event->area.y,
> 			  event->area.width, event->area.height);
>     }
> 
>   cr = goo_canvas_create_cairo_context (canvas);

It looks fairly easy to fix. We need to use something like this instead
(and move the goo_canvas_create_cairo_context() call above the code):

 GdkColor *bg;
 bg = gtk_widget_get_style (widget)->base[gtk_widget_get_state(widget)];
 gdk_cairo_set_source_color (cr, bg);
 cairo_rectangle (cr, event->area.x, event->area.y,
		  event->area.width, event->area.height);
 cairo_fill (cr);

Or just comment it out for now.

I can't get GTK+ to build right now so I can't fix it immediately.

Damon




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]