You should iterate through the list and get all the values you want to
store and write them. In order to read them out, you should parse them
(fscanf comes handy here). Think on the best file format for you. Try
it, it is easy. If you don't get results, ask again ;)

2006/3/6, Bellicano Pascal <[EMAIL PROTECTED]>:
> Hello,
>
> I am a beginner in c programming and in gtk.. However, using glade an
> anjuta and with a lot
> of effort, I have now a little usable app with gtkliststore (viewed with
> model and tree, of course).
>
> Here is my problem :
>
> Is there a way to save a complete list or tree ***without parsing it*** ?
>
> It's perhaps trivial for an exprienced developper...
>
> I tried it without success ..
>
> void sauver_liste_courtier(const gchar *filename)
>
> {
>         FILE *fp;
>         fp = fopen(filename,"w");
>         fwrite(courtiers_list, sizeof(courtiers_list), 1, fp);
>         fclose(fp);
> }
>
>
>
> void charger_liste_courtier (const gchar *filename)
> {
>         FILE *fp;
>         fp = fopen(filename,"r");
>         fread(courtiers_list, sizeof(courtiers_list), 1, fp);
>         fclose(fp);
> }
>
>
> courtiers_list is *gtkliststore var
>
> Remember, I am a bad programmer for now.. Please explain me how to do
> exactly.
>
> Thank you
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
_______________________________________________
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