Re: Save gtkliststore
- From: "Ignacio Martín" <newwen gmail com>
- To: "Bellicano Pascal" <pascal_bellicano yahoo fr>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Save gtkliststore
- Date: Mon, 6 Mar 2006 19:09:38 +0100
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 <pascal_bellicano yahoo fr>:
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]