Enlightenment CVS committal Author : titan Project : e17 Module : proto
Dir : e17/proto/ephoto/src Modified Files: ephoto.c ephoto_misc.c ephoto.h Log Message: ephoto --list-albums will now list all of your albums. =================================================================== RCS file: /cvs/e/e17/proto/ephoto/src/ephoto.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -3 -r1.40 -r1.41 --- ephoto.c 8 Apr 2006 23:12:48 -0000 1.40 +++ ephoto.c 10 Apr 2006 21:41:06 -0000 1.41 @@ -76,6 +76,10 @@ mainwin = 0; nopresent = 0; } + if ( argint < argc && !strcmp(argv[argint], "--list-albums") ) { + list_albums_cb(NULL, NULL, NULL); + mainwin = 0; + } if ( argint < argc && !strcmp(argv[argint], "--slideshow-dir") && noslide != 0 ) { int imageint; Ecore_List *image_list; @@ -225,7 +229,8 @@ "ephoto --fit-to-audio sets the slideshow to fit audio | ephoto --fullscreen sets " "the presentation/slideshow window to be fullscreen | ephoto --help displays all available options | " "ephoto --length slidelength sets the integer slidelength(seconds) as the transition time for slideshow | " - "ephoto --load-album album opens ephoto with album showing. No need to specify a path. " + "ephoto --list_albums lists all of your albums. | " + "ephoto --load-album album opens ephoto with album showing. No need to specify a path. " "Just put the basename of the album. | ephoto --loop sets the slideshow to loop | " "ephoto --presentation-dir /path/to/dir loads every image from /path/to/dir into a presentation | " "ephoto --presentation /path/to/image /path/to/image /path/to/image starts the presentation using " =================================================================== RCS file: /cvs/e/e17/proto/ephoto/src/ephoto_misc.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -3 -r1.15 -r1.16 --- ephoto_misc.c 8 Apr 2006 23:12:48 -0000 1.15 +++ ephoto_misc.c 10 Apr 2006 21:41:06 -0000 1.16 @@ -436,3 +436,18 @@ ewl_text_text_set(EWL_TEXT(m->atext), ""); audio = 0; } + +void list_albums_cb(Ewl_Widget *w, void *event, void *data) +{ + Ecore_List *albums; + albums = ecore_list_new(); + char *home = getenv("HOME"); + char path[PATH_MAX]; + snprintf(path, PATH_MAX, "%s/.e/ephoto/", home); + albums = ecore_file_ls(path); + while ( !ecore_list_is_empty(albums) ) { + char *path2; + path2 = ecore_list_remove_first(albums); + printf("%s\n", path2); + } +} =================================================================== RCS file: /cvs/e/e17/proto/ephoto/src/ephoto.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -3 -r1.18 -r1.19 --- ephoto.h 8 Apr 2006 23:12:48 -0000 1.18 +++ ephoto.h 10 Apr 2006 21:41:06 -0000 1.19 @@ -45,6 +45,7 @@ void reseti_cb(Ewl_Widget *w, void *event, void *data); void reseta_cb(Ewl_Widget *w, void *event, void *data); void create_list_cb(Ewl_Widget *w, void *event, void *data); +void list_albums_cb(Ewl_Widget *w, void *event, void *data); typedef struct _Main Main; typedef struct _Slide Slide; ------------------------------------------------------- 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