Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread rupert
I've gone through all the warning and now only get one warning on my +- 700 lines of code, now i have 3 warnings left wich I dont get away by now. Thx for the advice to go thorugh them, my old teacher told me we can ignore them :(. I packed the tree into a struct and now access the parts with

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread Peter \Firefly\ Lund
On Mon, 14 Aug 2006, rupert wrote: Strangely the function seems to stop, because i only get 1 test on the bash: (cryptomaster:11056): Gtk-CRITICAL **: gtk_list_store_set: assertion `iter-stamp == list_store-stamp' failed And how, pray tell, do you get your iterator initialized? ;) The snippet

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread rupert
On 8/14/06, Peter Firefly Lund [EMAIL PROTECTED] wrote: On Mon, 14 Aug 2006, rupert wrote: Strangely the function seems to stop, because i only get 1 test on the bash: (cryptomaster:11056): Gtk-CRITICAL **: gtk_list_store_set: assertion `iter-stamp == list_store-stamp' failed And how,

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread Peter \Firefly\ Lund
On Mon, 14 Aug 2006, rupert wrote: void make_list(GtkListStore *store, GtkTreeIter iter, gpointer pixbuf_mapper_yes, gpointer pixbuf_mapper_no, gpointer pixbuf_mount_yes, gpointer pixbuf_mount_no){ Notice the lack of * in front of the variable iter. make_list(treedata.store, treedata.iter,

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread Peter \Firefly\ Lund
On Mon, 14 Aug 2006, Lance Dillon wrote: The problem is your code doesn't seem to initialize iter in any way. Before you call make_list, you should probably do something like this: No, no. make_list() by itself is fine. It sets its local iter in every iteration through the call to

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread Lance Dillon
(I hate yahoo's quoting) - Original Message From: Peter Firefly Lund [EMAIL PROTECTED] To: Lance Dillon [EMAIL PROTECTED] Cc: gtk-app-devel-list@gnome.org Sent: Monday, August 14, 2006 8:07:43 AM Subject: 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

2006-08-14 Thread rupert
On 8/14/06, Peter Firefly Lund [EMAIL PROTECTED] wrote: On Mon, 14 Aug 2006, rupert wrote: void make_list(GtkListStore *store, GtkTreeIter iter, gpointer pixbuf_mapper_yes, gpointer pixbuf_mapper_no, gpointer pixbuf_mount_yes, gpointer pixbuf_mount_no){ Notice the lack of * in front of

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread Peter \Firefly\ Lund
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.

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread rupert
its getting good, somehow i packed the gtk_tree_model_iter_next in a do while loop, when i have no return in the loop it show all the lines once(it should show it every 100ms) , when i add a return it always loops(but loops) at the first line. void crypto_mount_set_pixbuf(struct treedata

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread rupert
grrr, simple as most of the time: void crypto_mount_set_pixbuf(struct treedata *treedata){ gchar *mountpoint; GtkTreeIter iter; gtk_tree_model_get_iter_first(treedata-store,iter); do { gtk_tree_model_get(treedata-store, iter, MOUNTPOINT_COLUMN, mountpoint, -1);

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-14 Thread Peter \Firefly\ Lund
On Mon, 14 Aug 2006, rupert wrote: void crypto_mount_set_pixbuf(struct treedata *treedata){ gchar *mountpoint; GtkTreeIter iter; gtk_tree_model_get_iter_first(treedata-store,iter); A couple of stylistic points: 1) put the opening brace as the first thing on the next line 2) add an

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-05 Thread rupert
On 8/3/06, David Nečas (Yeti) [EMAIL PROTECTED] wrote: On Thu, Aug 03, 2006 at 09:15:56PM +0200, rupert wrote: One thing beside this that bothers me is that i now kicked the idea of having buttons in the table, now I use a list and have only one pair of buttons for all of them. I got

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-05 Thread tomas
On Sat, Aug 05, 2006 at 10:18:24AM +0200, rupert wrote: On 8/3/06, David Ne?as (Yeti) [EMAIL PROTECTED] wrote: [...] but how can I pass all the Information like the treestore, itert.., with the g_timeout_add(), because it only allows me one filed for data to pass. As Yeti already pointed out,

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-03 Thread rupert
OK, you are right in some points, I started to read all the warnings and try to correct them, some tough work. I really cant find any other place then this to ask questions about GTK, most Forums only have QT people and GTK questions often are unanswered. One thing beside this that bothers me is

Key-value file parser, howto get all groups and create loop from them

2006-08-01 Thread rupert
Im playing arroung with the Gkeyfile functions and now try to get all groups from the keyfile and create a for loop that than shows me the different values, packed into strings, including the group name i have something like this in mind: crpyto_get_keyfile(){ GtkWidget *crypto_keys,

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-01 Thread Christian Neumair
Am Dienstag, den 01.08.2006, 12:52 +0200 schrieb rupert: Im playing arroung with the Gkeyfile functions and now try to get all groups from the keyfile and create a for loop that than shows me the different values, packed into strings, including the group name i have something like this in

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-01 Thread rupert
On 8/1/06, Christian Neumair [EMAIL PROTECTED] wrote: Am Dienstag, den 01.08.2006, 12:52 +0200 schrieb rupert: Im playing arroung with the Gkeyfile functions and now try to get all groups from the keyfile and create a for loop that than shows me the different values, packed into strings,

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-01 Thread Christian Neumair
Am Dienstag, den 01.08.2006, 19:12 +0200 schrieb rupert: after some more playing arround i got the things good working, the reference helps often, i have away from programming some time and never been to deep in, so sometimes i do things wrong that other wouldnt. Im so far with my code

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-01 Thread Christian Neumair
Am Dienstag, den 01.08.2006, 19:12 +0200 schrieb rupert: Im so far with my code that i want to create a table where each group gets a row that has labels, buttons and textentries. right now im using a GtkTable where i create the Widgets in the for loop that gets the content from the keyfile,

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-01 Thread rupert
On 8/1/06, Christian Neumair [EMAIL PROTECTED] wrote: Am Dienstag, den 01.08.2006, 19:12 +0200 schrieb rupert: Im so far with my code that i want to create a table where each group gets a row that has labels, buttons and textentries. right now im using a GtkTable where i create the Widgets

Re: Key-value file parser, howto get all groups and create loop from them

2006-08-01 Thread Yeti
On Tue, Aug 01, 2006 at 07:57:18PM +0200, rupert wrote: this is the part with the for loop , i had the idea of using a +i in the gtk_table_attach_defaults comamnd for the placement, right now the for only has one iteration, with more it crashes.. The code is not selfcontained. Unless the