From: tasn Date: Mon, 11 Jul 2011 14:46:16 +0000 (+0000) Subject: Elm test: Added a --test-win-only to not show the main list window. X-Git-Tag: REL_F_I9200_20110722_1~8^2~41^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dc3cc975f32f3d573ac4b2295090f5dba26a3d4a;p=framework%2Fuifw%2Felementary.git Elm test: Added a --test-win-only to not show the main list window. This is a nice workaround if you want to use the shot module to take pictures of the various tests, since the shot module doesn't behave nicely with multiple windows atm. git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@61246 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/bin/test.c b/src/bin/test.c index a33ce82..39b9600 100644 --- a/src/bin/test.c +++ b/src/bin/test.c @@ -187,7 +187,7 @@ _ui_tg_changed(void *data, Evas_Object *obj, void *event_info) static void -my_win_main(char *autorun) +my_win_main(char *autorun, Eina_Bool test_win_only) { Evas_Object *win, *bg, *bx0, *lb, *li, *idx, *fr, *tg; Eina_List *tests, *l; @@ -448,7 +448,8 @@ my_win_main(char *autorun) /* set an initial window size */ evas_object_resize(win, 320, 480); /* show the window */ - evas_object_show(win); + if (!test_win_only) + evas_object_show(win); } /* this is your elementary main function - it MUST be called IMMEDIATELY @@ -457,6 +458,7 @@ my_win_main(char *autorun) EAPI int elm_main(int argc, char **argv) { + Eina_Bool test_win_only = EINA_FALSE; char *autorun = NULL; /* tell elm about our app so it can figure out where to get files */ @@ -469,9 +471,19 @@ elm_main(int argc, char **argv) * ex: elementary_test "Box Vert 2" */ if (argc == 2) autorun = argv[1]; + else if (argc == 3) + { + /* Just a workaround to make the shot module more + * useful with elementary test. */ + if (!strcmp(argv[1], "--test-win-only")) + { + test_win_only = EINA_TRUE; + autorun = argv[2]; + } + } /* put here any init specific to this app like parsing args etc. */ - my_win_main(autorun); /* create main window */ + my_win_main(autorun, test_win_only); /* 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 */