Save gtkliststore



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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]