I've written a little app using GTK+ 2.0. In it is a tree with a list store. I can add data to it and clear it, but I can't dynamically add data to it, it always waits until the process is finished before it updates. Here's the function which is called every time something needs to be added:
Code:
void add_entry(char *nm, int size, char*perms) //GtkWidget *list, const gchar *str)
{
GtkTreeIter iter;
gtk_list_store_append (the_store, &iter);
gtk_list_store_set (the_store, &iter,
COL_NAME, nm,
COL_SIZE, size,
COL_PERMS, perms,
-1);
}
I don't even need to call this any more? (not sure if I really should (it's from when I did the whole thing at once))
Code:
gtk_tree_view_set_model(GTK_TREE_VIEW (the_view), GTK_TREE_MODEL (the_store));