[Sugar-devel] [PATCH sugar-toolkit-gtk3] Finish the port of the CellRendererIcon

Manuel Quiñones manuq at laptop.org
Fri Aug 24 09:13:58 EDT 2012


2012/8/24 Simon Schampijer <simon at schampijer.de>:
> On 08/23/2012 08:16 PM, Manuel Quiñones wrote:
>>
>> In pygtk custom cellrenderers were done inheriting
>> gtk.GenericCellRenderer, and overriding the on_* methods.  Now we
>> inherit Gtk.CellRenderer and the methods to override changed to do_* .
>>
>> The destroy signal was moved to Gtk.Widget [1] so the Gtk.CellRenderer
>> doesn't have it anymore.  Now we do the cleanup in the python
>> destructor method.  A testcase tests/graphics/customdestroy.py shows
>> how is done.
>>
>> tests/graphics/cellrenderericon.py tests the usage.
>>
>> Signed-off-by: Manuel Quiñones <manuq at laptop.org>
>
>
> Great, thanks for adding as well a testcase:
>
> I get one traceback when hovering over a cell:
>
> Traceback (most recent call last):
>   File
> "/home/erikos/sugar-build/install/lib/python2.7/site-packages/sugar3/graphics/palettewindow.py",
> line 1199, in __motion_notify_event_cb
>     if self._point_in_cell_renderer(event.x, event.y):
>   File
> "/home/erikos/sugar-build/install/lib/python2.7/site-packages/sugar3/graphics/palettewindow.py",
> line 1258, in _point_in_cell_renderer
>     for cell_renderer in column.get_cell_renderers():
> AttributeError: 'TreeViewColumn' object has no attribute
> 'get_cell_renderers'
>
> Do you get that as well?

Yes.  I was thinking in a separate patch for the palettewindow, but
what do you think?  Is better to do it in this one?

The issue is for the API change, column.get_cell_renderers now is
column.get_cells .

-- 
.. manuq ..


More information about the Sugar-devel mailing list