Re: Problem with GtkCellRenderer derivated attributes



On Sat, 2002-12-14 at 17:18, Fernando Herrera wrote:
>         Hello!
>                                                                                           
> 	While trying to fix #86711 I realized that the cell derivated class was
> setting wrongly the custom attibutes sometimes (via x_set_property). When 
> moving from one cell to the one above, the cell gets the attributes of the old
> one, but when moving from one cell to the one below it was done correctly. 
> Maybe there is a problem with the cell leave/enter sequence.
>                                                                                           
>         I've wroten a test to verify this at:
>         http://www.eurielec.etsit.upm.es/~fherrera/test-cell.tar.bz2
>                                                                                           
>         It g_prints the values and when clicking in the first row, show the
> current attribute. For example, moving from ID3 to ID2 and clicking shows the
> problem.
>                                                                                           
>         So, I'm doing something wrong or it's a bug gtk+.
>         Can anyone take a look at this?

You cannot rely on the value of cru->uri in cell_renderer_uri_activate.
Note that cell_renderer_uri_activate has a path as an argument, you can
use this path to get the data from the model. But of course the cell
renderer doesn't know from which column it should get the data. So a
better approach may be to add an "activated" signal to your cell
renderer and emit that, and write a nice signal handler. See
gtkcellrenderertoggle.c for an example.



	-Kris

>                                                                                           
> Thank you very much!



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