Re: which column cell is changed when "row-changed" is emitted



On Sat, May 4, 2013 at 12:44 PM, yu wu <vanii warem gmail com> wrote:
For the signal "row-changed" of GtkTreeModel, how can I know which column
cell is changed. For example, I defined 10 renderers by
`gtk_cell_renderer_text_new' which means 10 columns. When column 1 and
column 3 in a row are changed, the signal "row-changed" will be emitted
twice. Then how can I know who emitted the change -- column 1 or column 3?

You don't need to know which cell renderer is effected by a given row change,
in fact, even if you did, you wouldn't be informed of what data in the row has
changed, only that the row itself has changed.

The row change will cause the GtkTreeView/GtkIconView to render the row
again (if it's visible), at which time the renderer will render the new data
(or your custom function will set the cell attributes, if you used
gtk_cell_layout_set_cell_data_func()).

Cheers,
    -Tristan


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