Re: Key-value file parser, howto get all groups and create loop from them
- From: "Peter \"Firefly\" Lund" <firefly diku dk>
- To: rupert <rupertt gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Key-value file parser, howto get all groups and create loop from them
- Date: Mon, 14 Aug 2006 14:35:14 +0200 (CEST)
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
- References:
- Key-value file parser, howto get all groups and create loop from them
- Re: Key-value file parser, howto get all groups and create loop from them
- From: David =?iso-8859-2?B?TmXoYXMgKFlldGkp?=
- Re: Key-value file parser, howto get all groups and create loop from them
- Re: Key-value file parser, howto get all groups and create loop from them
- From: David =?iso-8859-2?B?TmXoYXMgKFlldGkp?=
- Re: Key-value file parser, howto get all groups and create loop from them
- Re: Key-value file parser, howto get all groups and create loop from them
- Re: Key-value file parser, howto get all groups and create loop from them
- Re: Key-value file parser, howto get all groups and create loop from them
- From: Peter \"Firefly\" Lund
- Re: Key-value file parser, howto get all groups and create loop from them
- Re: Key-value file parser, howto get all groups and create loop from them
- From: Peter \"Firefly\" Lund
- Re: Key-value file parser, howto get all groups and create loop from them
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]