Enlightenment CVS committal Author : handyande Project : misc Module : enotes
Dir : misc/enotes/src Modified Files: saveload.c Log Message: don't show files for loaded notes, stops multiple load possibilities. Really should stop folk being able to create notes with identical titles... =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/saveload.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -3 -r1.26 -r1.27 --- saveload.c 16 Mar 2006 00:13:17 -0000 1.26 +++ saveload.c 18 Mar 2006 21:11:59 -0000 1.27 @@ -326,7 +326,25 @@ sprintf(targetf, "%s/%s", target, p->d_name); stat(targetf, &buf); if (S_ISREG(buf.st_mode)) { - setup_load_opt(saveload->tree, p->d_name); + Evas_List *notes; + int found = 0; + + notes = (Evas_List *) get_cycle_begin(); + printf("start\n"); + while (notes != NULL) { + if (!strcmp + (get_title_by_note(notes), + p->d_name)) { + found = 1; + break; + } + notes = (Evas_List *) + get_cycle_next_note(notes); + } + + if (!found) + setup_load_opt(saveload->tree, + p->d_name); } } closedir(dir); ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs