bug in Ubuntu Human theme?

The Saltydog thesaltydog at gmail.com
Tue Jun 21 02:19:40 CDT 2005


On 6/20/05, Matt Zimmerman <mdz at ubuntu.com> wrote:
> It's difficult to infer your original problem from his message.  First the
> problem, then the solution. :-)

This is the problem:
Download the cellrenderer_progress example in cvs:
http://cvs.sourceforge.net/viewcvs.py/gtk2-perl/gtk2-perl-xs/Gtk2/examples/cellrenderer_progress.pl?rev=1.1&view=log

If you run the program you will get a long list of:
GLib-GObject-WARNING **: invalid cast from `GtkTreeView' to `GtkRange'
at ./cellrender_progress.pl line 87.

I didn't make any adaptation. Line 87 of the code is:

 $style->paint_box ($window,
                    'normal', 'in',
                    undef, $widget, "trough",
                    $cell_area->x + $x_offset + $xpad,
                    $cell_area->y + $y_offset + $ypad,
                    $width - 1, $height - 1);

Human theme is claiming for a GtkRang, that is NEVER used in the sample program.
Neither the code in GTK+ nor the code in the example deal with a GtkRange, yet
somebody in the pipe, starting from a style method, is complaining about a bad
cast.

Now, the mail from muppet is much clear:

"The widget parameter to paint_box() is used by the theme implementation to get
hints, either from style properties or from the type of the object itself.
The "what sort of box" hint is the string "trough", and my guess is that your
theme's implementation of paint_box() thinks that a "trough" will only be
drawn for a GtkRange."



More information about the ubuntu-devel mailing list