I\'w trying to keep at ListStore non-text objects using snippet I found. These are the objects:
class Series(gobject.GObject, object):
def __init__(self, ti
Two mistakes in the second-to-last block.
GtkWarning: gtk_tree_view_column_cell_layout_set_cell_data_func: assertion `info != NULL'
In English, this means that the cell renderer is not in the column's list of cell renderers. You need to add the cell renderer to the column first before calling set_cell_data_func
.
Warning: unable to set property `text' of type `gchararray' from value of `typedata+TrayIcon+Series'
This is because the add_attribute
line causes GTK+ to try setting the cell text to a Series object, which of course fails. Just remove that line; the cell data func already takes care of setting the cell text.
In code:
col = gtk.TreeViewColumn(_("Series title"))
cell = gtk.CellRendererText()
col.pack_start(cell)
col.set_cell_data_func(cell, get_series_title)