Just a wild guess here, but I'd say that your callback will be called
anytime anything at all happens that would require rendering of the
cell to which you linked it. I have looked, but I have not found a
list of the events that would trigger the callback. Bob Caryl Joaquim Schmidlap wrote: On Wed, Jul 25, 2007 at 10:57:54AM -0500, Robert Caryl wrote:Use a dispatcher in your GUI window that will call Gtk::Widget::queue_draw for your Gtk::TreeView whenever your thread updates the Gtk::TreeModel displayed by your Gtk::TreeView.This worked, thank you. I'm still a bit confused why the Gtk event loop didn't just wake up on its own, but I'll accept this and move on. Follow up: I have set up a callback for custom rendering based on the values in the cells using set_cell_data_func, and I'm seeing many more callbacks than I would expect. At a minimum, it appears the callback for a given cell is triggered three times for each write into the model for that cell, and then once more for every cell in the view when the TreeModel::queue_draw executes. Finally, it appears that other input events such as mousing over the cells can cause a callback. Is this expected, or am I doing something else wrong? Are the events that should trigger this callback enumerated somewhere? Thanks very much for the help. |