GNOME Bugzilla – Bug 626678
Error during phase build of gtk-engines-3; Compiling with jhbuild
Last modified: 2010-08-16 01:29:47 UTC
make[2]: Entering directory `/home/fabio/checkout/gnome/gtk-engines-3/engines/support' make all-am make[3]: Entering directory `/home/fabio/checkout/gnome/gtk-engines-3/engines/support' CC cairo-support.lo CC widget-information.lo CCLD libsupport.la make[3]: Leaving directory `/home/fabio/checkout/gnome/gtk-engines-3/engines/support' make[2]: Leaving directory `/home/fabio/checkout/gnome/gtk-engines-3/engines/support' Making all in clearlooks make[2]: Entering directory `/home/fabio/checkout/gnome/gtk-engines-3/engines/clearlooks' CC clearlooks_rc_style.lo CC clearlooks_style.lo ./src/clearlooks_style.c: In function ‘clearlooks_style_draw_box’: ./src/clearlooks_style.c:775: warning: #warning Assuming non-pulsing progress bars because there is currently no way to query them in GTK+ 3.0. ./src/clearlooks_style.c: In function ‘clearlooks_style_draw_layout’: ./src/clearlooks_style.c:1796: error: ‘GdkGC’ undeclared (first use in this function) ./src/clearlooks_style.c:1796: error: (Each undeclared identifier is reported only once ./src/clearlooks_style.c:1796: error: for each function it appears in.) ./src/clearlooks_style.c:1796: error: ‘gc’ undeclared (first use in this function) ./src/clearlooks_style.c:1801: error: ‘GtkStyle’ has no member named ‘text_gc’ ./src/clearlooks_style.c:1801: error: ‘GtkStyle’ has no member named ‘fg_gc’ ./src/clearlooks_style.c:1808: error: ‘old_gc’ undeclared (first use in this function) make[2]: *** [clearlooks_style.lo] Error 1 make[2]: Leaving directory `/home/fabio/checkout/gnome/gtk-engines-3/engines/clearlooks' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/fabio/checkout/gnome/gtk-engines-3/engines' make: *** [all-recursive] Error 1 *** Error during phase build of gtk-engines-3: ########## Error running make *** [50/67]
This is due to the removal of the Gdk drawing API.. maybe it would have been nicer not to just chop off the API without giving some time for developers to migrate?
Created attachment 167703 [details] [review] [clearlooks] Replace GDK drawing API with cairo The GDK drawing API was deprecated/removed, so a port to cairo is necessary.
Created attachment 167709 [details] [review] [crux] Replace GDK drawing API with cairo Crux compiles with this patch, but scroll bar handles are not drawn due to a failed assertion in SANITIZE_SIZE. I don't see how the attached patch could possibly cause this, but nevertheless it means that the patch is untested.
Created attachment 167715 [details] [review] [redmond] Replace GDK drawing API with cairo Both hc and mist use GtkStyle->draw_polygon, which was removed. I'm unsure about the correct replacement, so the patch series continues with redmond ...
Created attachment 167718 [details] [review] [glide] Replace GDK drawing API with cairo Last patch for now - the remaining thinice engine implements style->draw_polygon, so I'll skip it for now.
Thanks for the patches! Two things: 1. I think we could just remove the draw_polygon function from the engines completely, and let the GTK+ build in default version handle it. 2. It looks to me that you might have misaligned the stroke drawing. You need to be carefull to start at the center of the line (so for a 1px line at the center of the pixel). The end depends on the cap setting. The same goes for stroking a rectangle, there is a helper function for that in gtk-engines though, ge_cairo_inner_rectangle that does the trick. Other than the alignment issue, feel free to commit.
Created attachment 167754 [details] [review] support: Add ge_cairo_transform_for_layout() This function does the voodoo that is required to get a rotated PangoLayout to show up just like the GTK2 drawing code expects it. You can use the "rotating label" example in GTK source's tests/testgtk to reproduce it.
You'll also need the function above in the draw_layout() functions. The way you use it should be obvious from my Cairo port of Clearlooks that I'm about to attach.
Created attachment 167755 [details] [review] Clearlooks: Port entirely to Cairo drawing
Created attachment 167762 [details] [review] [crux] Replace GDK drawing API with cairo Use ge_cairo_transform_for_layout()
Created attachment 167763 [details] [review] [redmond] Replace GDK drawing API with cairo Update patch to use ge_cairo_inner_rectangle().
Created attachment 167764 [details] [review] [glide] Replace GDK drawing API with cairo Update patch to use ge_cairo_transform_for_layout().
Created attachment 167765 [details] [review] [thinice] Remove draw_polygon() from style class The hook has been deprecated/removed from GtkStyle.
*** Bug 626790 has been marked as a duplicate of this bug. ***
Created attachment 167871 [details] [review] [mist] Remove draw_polygon() from style class The hook has been deprecated/removed from GtkStyle.
Created attachment 167872 [details] [review] [hc] Replace GDK drawing API with cairo The GDK drawing API was deprecated/removed.
Review of attachment 167755 [details] [review]: Looking good.
Review of attachment 167754 [details] [review]: Looks good. ::: engines/support/cairo-support.c @@ +900,3 @@ + pango_extents_to_pixels (&rect, NULL); + + tmp_matrix = *matrix; Unused.
Comment on attachment 167754 [details] [review] support: Add ge_cairo_transform_for_layout() Committed with the variable removed that you pointed out.
Comment on attachment 167755 [details] [review] Clearlooks: Port entirely to Cairo drawing Pushed.
Comment on attachment 167762 [details] [review] [crux] Replace GDK drawing API with cairo I made sure the handle lines were pixel aligned and pushed it.
Comment on attachment 167763 [details] [review] [redmond] Replace GDK drawing API with cairo Committed pretty much as is.
Comment on attachment 167764 [details] [review] [glide] Replace GDK drawing API with cairo The patch called ge_cairo_transform_for_layout() twice for insensitive widgets. As that modifies the transformation matrix twice, it's not a good idea. I also used ge_gdk_drawable_to_cairo() instead of gdk_cairo_create() as that conveniently takes care of the clipping. With that fixed, I pushed it.
Comment on attachment 167765 [details] [review] [thinice] Remove draw_polygon() from style class Pushed. btw: You should get used to using "foo:" instead of "[foo]" As the tag at the start of commits, as git am and git bz apply "conveniently" delete all tags in "[]" as they assume those are mailing list names...
Comment on attachment 167871 [details] [review] [mist] Remove draw_polygon() from style class Committed.
Comment on attachment 167872 [details] [review] [hc] Replace GDK drawing API with cairo Committed with the s/gdk_cairo_create/ge_gdk_drawable_to_cairo/ change already mentioned above.