On Mon, 14 Aug 2006, rupert wrote:

> thx for the hel, with adding the tip lanve gave its working somehow now,
> but i had to do some changes:
>
> gtk_tree_model_get_iter_first(treedata->store,&treedata->iter);
> i have this line now before make_list and also in the function that updates
> the
> pixbuf.

The next improvement you should try is to remove the iter field from the 
struct, remove the gtk_tree_model_get_iter_first() call before the call to 
make_list() and put a gtk_tree_model_get_iter_first() call into your 
callback function (probably as the first line of code after the 
declarations of the local variables).

Iterators are usually just used as a special kind of loop variables -- you 
don't make loop variables global just so you can use the same loop 
variable in another loop inside a completely unrelated function.  Or so 
that you can initialize a local loop variable to whatever value was left 
in the global loop variable from the last executed loop somewhere else.

Just get rid of it.

> Now i have to extract one field from every single line, so that i update the
> pixbuf in
> each line.

use gtk_tree_model_iter_next() inside your loop.  You can use it instead 
of normal loop variable: just call it until it returns FALSE.

-Peter
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to