argh: commit message being truncated. heres the full one: Add a REALLY simple command line option to elementary_test. You can now call the test app with the name of a specific test to make it "autorun". examples: elementary_test Animation elementary_test "Box Vert 2" will open the given test on startup... saving you LOTS of time ;)
If you think this is too "hackish" feel free to revert, or just ask me to do so. DaveMDS 2010/9/9 Enlightenment SVN <no-re...@enlightenment.org>: > Log: > > Add a REALLY simple command line option to elementary_test. > You can now call the test app with the name of a specific test > to make it \autorun'. > Author: davemds > Date: 2010-09-08 16:04:49 -0700 (Wed, 08 Sep 2010) > New Revision: 51997 > > Modified: > trunk/TMP/st/elementary/src/bin/test.c > > Modified: trunk/TMP/st/elementary/src/bin/test.c > =================================================================== > --- trunk/TMP/st/elementary/src/bin/test.c 2010-09-08 22:49:30 UTC (rev > 51996) > +++ trunk/TMP/st/elementary/src/bin/test.c 2010-09-08 23:04:49 UTC (rev > 51997) > @@ -121,10 +121,11 @@ > } > > static void > -my_win_main(void) > +my_win_main(char *autorun) > { > Evas_Object *win, *bg, *bx0, *lb, *li, *idx, *fr; > - Eina_List *tests; > + Eina_List *tests, *l; > + struct elm_test *t; > > /* 1 create an elm window - it returns an evas object. this is a little > * special as the object lives in the canvas that is inside the window > @@ -289,10 +290,16 @@ > ADD_TEST("Calendar 2", test_calendar2); > #undef ADD_TEST > > + if (autorun) > + { > + EINA_LIST_FOREACH(tests, l, t) > + if ((t->name) && (t->cb) && (!strcmp(t->name, autorun))) > + t->cb(NULL, NULL, NULL); > + } > + > if (tests) > { > char last_letter = 0; > - struct elm_test *t; > EINA_LIST_FREE(tests, t) > { > Elm_List_Item *it; > @@ -322,8 +329,16 @@ > EAPI int > elm_main(int argc, char **argv) > { > - /* put ere any init specific to this app like parsing args etc. */ > - my_win_main(); /* create main window */ > + char *autorun = NULL; > + > + /* if called with a single argument try to autorun a test with > + * the same name as the given param > + * ex: elementary_test "Box Vert 2" */ > + if (argc == 2) > + autorun = argv[1]; > + > + /* put here any init specific to this app like parsing args etc. */ > + my_win_main(autorun); /* create main window */ > elm_run(); /* and run the program now and handle all events etc. */ > /* if the mainloop that elm_run() runs exist - we exit the app */ > elm_shutdown(); /* clean up and shut down */ > > > ------------------------------------------------------------------------------ > This SF.net Dev2Dev email is sponsored by: > > Show off your parallel programming skills. > Enter the Intel(R) Threading Challenge 2010. > http://p.sf.net/sfu/intel-thread-sfd > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel