After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 626678 - Error during phase build of gtk-engines-3; Compiling with jhbuild
Error during phase build of gtk-engines-3; Compiling with jhbuild
Status: RESOLVED FIXED
Product: gtk-engines
Classification: Deprecated
Component: clearlooks
2.90.x
Other Linux
: Normal major
: ---
Assigned To: gtk-engines maintainers
gtk-engines maintainers
: 626790 (view as bug list)
Depends on:
Blocks: 626688
 
 
Reported: 2010-08-11 20:41 UTC by Fabio Durán Verdugo
Modified: 2010-08-16 01:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[clearlooks] Replace GDK drawing API with cairo (2.95 KB, patch)
2010-08-12 08:49 UTC, Florian Müllner
none Details | Review
[crux] Replace GDK drawing API with cairo (3.91 KB, patch)
2010-08-12 09:25 UTC, Florian Müllner
none Details | Review
[redmond] Replace GDK drawing API with cairo (3.63 KB, patch)
2010-08-12 10:27 UTC, Florian Müllner
none Details | Review
[glide] Replace GDK drawing API with cairo (3.69 KB, patch)
2010-08-12 11:19 UTC, Florian Müllner
none Details | Review
support: Add ge_cairo_transform_for_layout() (2.86 KB, patch)
2010-08-12 17:55 UTC, Benjamin Otte (Company)
committed Details | Review
Clearlooks: Port entirely to Cairo drawing (3.15 KB, patch)
2010-08-12 17:57 UTC, Benjamin Otte (Company)
committed Details | Review
[crux] Replace GDK drawing API with cairo (3.93 KB, patch)
2010-08-12 18:58 UTC, Florian Müllner
committed Details | Review
[redmond] Replace GDK drawing API with cairo (3.65 KB, patch)
2010-08-12 18:59 UTC, Florian Müllner
committed Details | Review
[glide] Replace GDK drawing API with cairo (3.74 KB, patch)
2010-08-12 18:59 UTC, Florian Müllner
committed Details | Review
[thinice] Remove draw_polygon() from style class (5.06 KB, patch)
2010-08-12 18:59 UTC, Florian Müllner
committed Details | Review
[mist] Remove draw_polygon() from style class (7.07 KB, patch)
2010-08-14 14:48 UTC, Florian Müllner
committed Details | Review
[hc] Replace GDK drawing API with cairo (8.11 KB, patch)
2010-08-14 14:49 UTC, Florian Müllner
committed Details | Review

Description Fabio Durán Verdugo 2010-08-11 20:41:39 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]
Comment 1 Claudio Saavedra 2010-08-11 22:04:30 UTC
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?
Comment 2 Florian Müllner 2010-08-12 08:49:11 UTC
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.
Comment 3 Florian Müllner 2010-08-12 09:25:43 UTC
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.
Comment 4 Florian Müllner 2010-08-12 10:27:26 UTC
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 ...
Comment 5 Florian Müllner 2010-08-12 11:19:03 UTC
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.
Comment 6 Benjamin Berg 2010-08-12 17:18:58 UTC
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.
Comment 7 Benjamin Otte (Company) 2010-08-12 17:55:35 UTC
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.
Comment 8 Benjamin Otte (Company) 2010-08-12 17:57:29 UTC
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.
Comment 9 Benjamin Otte (Company) 2010-08-12 17:57:56 UTC
Created attachment 167755 [details] [review]
Clearlooks: Port entirely to Cairo drawing
Comment 10 Florian Müllner 2010-08-12 18:58:30 UTC
Created attachment 167762 [details] [review]
[crux] Replace GDK drawing API with cairo

Use ge_cairo_transform_for_layout()
Comment 11 Florian Müllner 2010-08-12 18:59:09 UTC
Created attachment 167763 [details] [review]
[redmond] Replace GDK drawing API with cairo

Update patch to use ge_cairo_inner_rectangle().
Comment 12 Florian Müllner 2010-08-12 18:59:32 UTC
Created attachment 167764 [details] [review]
[glide] Replace GDK drawing API with cairo

Update patch to use ge_cairo_transform_for_layout().
Comment 13 Florian Müllner 2010-08-12 18:59:49 UTC
Created attachment 167765 [details] [review]
[thinice] Remove draw_polygon() from style class

The hook has been deprecated/removed from GtkStyle.
Comment 14 Benjamin Berg 2010-08-13 18:02:40 UTC
*** Bug 626790 has been marked as a duplicate of this bug. ***
Comment 15 Florian Müllner 2010-08-14 14:48:59 UTC
Created attachment 167871 [details] [review]
[mist] Remove draw_polygon() from style class

The hook has been deprecated/removed from GtkStyle.
Comment 16 Florian Müllner 2010-08-14 14:49:07 UTC
Created attachment 167872 [details] [review]
[hc] Replace GDK drawing API with cairo

The GDK drawing API was deprecated/removed.
Comment 17 Florian Müllner 2010-08-14 15:07:06 UTC
Review of attachment 167755 [details] [review]:

Looking good.
Comment 18 Florian Müllner 2010-08-14 15:30:43 UTC
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 19 Benjamin Otte (Company) 2010-08-16 00:44:05 UTC
Comment on attachment 167754 [details] [review]
support: Add ge_cairo_transform_for_layout()

Committed with the variable removed that you pointed out.
Comment 20 Benjamin Otte (Company) 2010-08-16 00:44:16 UTC
Comment on attachment 167755 [details] [review]
Clearlooks: Port entirely to Cairo drawing

Pushed.
Comment 21 Benjamin Otte (Company) 2010-08-16 01:06:21 UTC
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 22 Benjamin Otte (Company) 2010-08-16 01:07:22 UTC
Comment on attachment 167763 [details] [review]
[redmond] Replace GDK drawing API with cairo

Committed pretty much as is.
Comment 23 Benjamin Otte (Company) 2010-08-16 01:22:02 UTC
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 24 Benjamin Otte (Company) 2010-08-16 01:24:38 UTC
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 25 Benjamin Otte (Company) 2010-08-16 01:28:30 UTC
Comment on attachment 167871 [details] [review]
[mist] Remove draw_polygon() from style class

Committed.
Comment 26 Benjamin Otte (Company) 2010-08-16 01:29:19 UTC
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.