Enlightenment CVS committal
Author : titan
Project : e17
Module : proto
Dir : e17/proto/ephoto/src
Modified Files:
ephoto_slideshow.c
Log Message:
Tie in the random order option into the dialog. It works now! yay :)
===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/ephoto_slideshow.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- ephoto_slideshow.c 18 Sep 2006 01:03:52 -0000 1.10
+++ ephoto_slideshow.c 23 Sep 2006 00:23:08 -0000 1.11
@@ -39,10 +39,21 @@
int change_picture(void *data)
{
char *image_path;
+ int total;
+ int temp;
Slide_Config *sc;
sc = data;
- ecore_dlist_next(current_thumbs);
+ if (sc->random_order)
+ {
+ total = ecore_dlist_nodes(current_thumbs);
+ temp = rand()%total;
+ ecore_dlist_goto_index(current_thumbs, temp);
+ }
+ else
+ {
+ ecore_dlist_next(current_thumbs);
+ }
image_path = ecore_dlist_current(current_thumbs);
if(image_path)
{
@@ -85,6 +96,8 @@
image_path = ecore_dlist_goto_first(current_thumbs);
if (!image_path) return;
+
+ srand((unsigned int)time((time_t *)NULL));
window = ewl_window_new();
ewl_window_title_set(EWL_WINDOW(window), "Ephoto Slideshow");
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs