Re: Should cell renderer properties be cleared

Federico Mena Quintero <federico ximian com> writes:

> This is cumbersome.  Should the treeview reset a cell renderer's
> parameters to the defaults between invocations of the data_funcs?

In a word, no.

This is a documented and intended effect.  If you set a property in a
data_func, you need to set it consistently.  The advantage of not
resetting it is that you can do:

cell = g_object_new (GTK_TYPE_CELL_RENDERER_TEXT,
                     "editable", TRUE,
                     "weight", PANGO_WEIGHT_BOLD,

and have properties set for the entire column without needing to reset
them every time we render/measure a cell.  The confusion for you here is
that there are two different ways of setting the text in a cell.  Just
stick with markup and you should be fine.


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