Enlightenment CVS committal Author : titansoccer15 Project : e17 Module : proto
Dir : e17/proto/ephoto/src Modified Files: ephoto.c ephoto_misc.c ephoto_presentation.c Log Message: Finally! All options are now available via commands! ephoto --help ! =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/ephoto/src/ephoto.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -3 -r1.17 -r1.18 --- ephoto.c 21 Mar 2006 23:44:15 -0000 1.17 +++ ephoto.c 22 Mar 2006 00:26:02 -0000 1.18 @@ -25,8 +25,8 @@ char buf[PATH_MAX]; char argimage[PATH_MAX]; char argaudio[PATH_MAX]; -char argheight[PATH_MAX] = "600"; -char argwidth[PATH_MAX] = "480"; +char argheight[PATH_MAX] = "480"; +char argwidth[PATH_MAX] = "600"; char tempdb[PATH_MAX]; char db[PATH_MAX]; /*****************/ @@ -57,6 +57,7 @@ imageint++; while ( imageint < argc && ecore_file_exists(argv[imageint]) != 0 ) { ecore_dlist_append(m->imagelist, strdup(argv[imageint])); + slidenum++; imageint++; } mainwin = 0; @@ -86,6 +87,7 @@ imageint++; snprintf(argaudio, PATH_MAX, "%s", argv[imageint]); audios = argaudio; + audio = 1; } else if ( argint < argc && !strcmp(argv[argint], "--length") ) { int imageint; @@ -114,15 +116,16 @@ } else if ( argint < argc && !strcmp(argv[argint], "--help") ) { printf("ephoto /path/to/dir loads /path/to/dir as default directory\n"); - printf("ephoto --view-image /full/path/to/image sets /full/path/to/image as the default image in the image viewer tab.\n"); - printf("ephoto --slideshow /full/path/to/image /full/path/to/image /full/path/to/image starts the slideshow using the specified images\n"); - printf("ephoto --presentation /full/path/to/image /full/path/to/image /full/path/to/image starts the presentation using the specified images\n"); printf("ephoto --audio /full/path/to/audio sets /full/path/to/audio as default audio for slideshow\n"); - printf("ephoto --length length sets the integer length(seconds) as the transition time for slideshow\n"); + printf("ephoto --fit-to-audio sets the slideshow to fit audio\n"); printf("ephoto --fullscreen sets the presentation/slideshow window to be fullscreen\n"); - printf("ephoto --win-size integer integer sets the first integer as the width and the second integer as the height of the presentation/slideshow window\n"); + printf("ephoto --help displays all available options\n"); + printf("ephoto --length slidelength sets the integer slidelength(seconds) as the transition time for slideshow\n"); printf("ephoto --loop sets the slideshow to loop\n"); - printf("ephoto --fit-to-audio sets the slideshow to fit audio\n"); + printf("ephoto --presentation /full/path/to/image /full/path/to/image /full/path/to/image starts the presentation using the specified images\n"); + printf("ephoto --slideshow /full/path/to/image /full/path/to/image /full/path/to/image starts the slideshow using the specified images\n"); + printf("ephoto --view-image /full/path/to/image sets /full/path/to/image as the default image in the image viewer tab.\n"); + printf("ephoto --win-size integer integer sets the first integer as the width and the second integer as the height of the presentation/slideshow window\n"); mainwin = 0; } argint++; =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/ephoto/src/ephoto_misc.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- ephoto_misc.c 21 Mar 2006 23:44:15 -0000 1.3 +++ ephoto_misc.c 22 Mar 2006 00:26:02 -0000 1.4 @@ -34,6 +34,9 @@ /****Shut down the presentation****/ ewl_widget_destroy(s->wins); wino = 0; + if ( mainwin == 0 ) { + ewl_main_quit(); + } return; data = NULL; /**********************************/ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/ephoto/src/ephoto_presentation.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- ephoto_presentation.c 21 Mar 2006 02:36:53 -0000 1.11 +++ ephoto_presentation.c 22 Mar 2006 00:26:02 -0000 1.12 @@ -33,14 +33,8 @@ h = atoi(hsize); } if ( mainwin == 0 ) { - if ( argwidth == NULL && argheight == NULL ) { - w = 600; - h = 480; - } - else { - w = atoi(argwidth); - h = atoi(argheight); - } + w = atoi(argwidth); + h = atoi(argheight); } s->screen = ewl_image_new(); ewl_image_proportional_set(EWL_IMAGE(s->screen), TRUE); @@ -167,8 +161,8 @@ } if ( mainwin == 0 ) { - ws = 800; - h= 600; + ws = atoi(argwidth); + h= atoi(argheight); } s->wins = ewl_window_new(); @@ -190,6 +184,11 @@ ewl_callback_append(s->wins, EWL_CALLBACK_REALIZE, realize_cb, NULL); } } + if ( mainwin == 0 ) { + if ( argfullscreen == 1 ) { + ewl_callback_append(s->wins, EWL_CALLBACK_REALIZE, realize_cb, NULL); + } + } ewl_callback_append(s->wins, EWL_CALLBACK_DELETE_WINDOW, destroys_cb, NULL); ewl_callback_append(s->wins, EWL_CALLBACK_CLICKED, destroys_cb, NULL); ewl_widget_show(s->wins); @@ -233,10 +232,13 @@ } } else { - if ( arglength != 0 ) { + if ( argfit == 1 ) { + time = audiolen / slidenum; + } + if ( arglength != 0 && argfit == 0 ) { time = arglength; } - if ( arglength == 0 ) { + if ( arglength == 0 && argfit == 0 ) { time = 3; } } @@ -253,7 +255,7 @@ ewl_object_maximum_size_set(EWL_OBJECT(s->screen), ws, h); } } - if ( mainwin == 0 ) { + if ( mainwin == 0 && argfullscreen == 0 ) { ewl_object_maximum_size_set(EWL_OBJECT(s->screen), ws, h); } ewl_object_fill_policy_set(EWL_OBJECT(s->screen), EWL_FLAG_FILL_SHRINK); @@ -373,21 +375,36 @@ /*******************************************/ /***Setup the presentation layout!***/ - wsize = ewl_text_text_get(EWL_TEXT(m->wsize)); - ws = atoi(wsize); - hsize = ewl_text_text_get(EWL_TEXT(m->hsize)); - h = atoi(hsize); - + if ( mainwin == 1 ) { + wsize = ewl_text_text_get(EWL_TEXT(m->wsize)); + ws = atoi(wsize); + hsize = ewl_text_text_get(EWL_TEXT(m->hsize)); + h = atoi(hsize); + } + if ( mainwin == 0 ) { + ws = atoi(argwidth); + h = atoi(argheight); + } s->wins = ewl_window_new(); wino = 1; ewl_window_title_set(EWL_WINDOW(s->wins), "Presentation"); ewl_window_name_set(EWL_WINDOW(s->wins), "Presentation"); ewl_window_class_set(EWL_WINDOW(s->wins), "Presentation"); - if ( ewl_checkbutton_is_checked(EWL_CHECKBUTTON(m->fullrad)) == 0 ) { - ewl_object_maximum_size_set(EWL_OBJECT(s->wins), ws, h); + if ( mainwin == 1 ) { + if ( ewl_checkbutton_is_checked(EWL_CHECKBUTTON(m->fullrad)) == 0 ) { + ewl_object_maximum_size_set(EWL_OBJECT(s->wins), ws, h); + } + if ( ewl_checkbutton_is_checked(EWL_CHECKBUTTON(m->fullrad)) == 1 ) { + ewl_callback_append(s->wins, EWL_CALLBACK_REALIZE, realize_cb, NULL); + } } - if ( ewl_checkbutton_is_checked(EWL_CHECKBUTTON(m->fullrad)) == 1 ) { - ewl_callback_append(s->wins, EWL_CALLBACK_REALIZE, realize_cb, NULL); + if ( mainwin == 0 ) { + if ( argfullscreen == 1 ) { + ewl_callback_append(s->wins, EWL_CALLBACK_REALIZE, realize_cb, NULL); + } + if ( argfullscreen == 0 ) { + ewl_object_maximum_size_set(EWL_OBJECT(s->wins), ws, h); + } } ewl_callback_append(s->wins, EWL_CALLBACK_DELETE_WINDOW, destroyp_cb, NULL); ewl_widget_show(s->wins); ------------------------------------------------------- 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