Hello,
Sorry, I read the manual and articles about GtkTreeView, but I still can't get it over my head - I use my ListStore to fill it with some images with text (a list of icons and descriptions) and populate the store like this:
Code:
void populate_store(void)
{
GtkWidget* pImage;
GtkTreeIter iter;
gtk_list_store_clear(pNoteListStore);
gtk_list_store_append (pNoteListStore, &iter);
pImage = gtk_image_new_from_stock(GTK_STOCK_EDIT, GTK_ICON_SIZE_SMALL_TOOLBAR);
gtk_list_store_set (pNoteListStore, &iter,
COLUMN_CHECK, TRUE,
COLUMN_NOTETYPE, gtk_image_get_pixbuf(pImage),
COLUMN_SHORTTEXT, "some text",
-1);
}
Such code is called many times, filling the list store with various data. Do I need to free the pImage in any way after I called gtk_list_store_set? Or it will be taken care of when the list will be cleared?
And is it the correct way to put an icon to list store? If not, which is?