Enlightenment CVS committal Author : rbdpngn Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/bin Modified Files: main.c Log Message: Added more simple unit tests to the image test. Added a menu bar to the test app, only Exit is hooked up. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/bin/main.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- main.c 10 Mar 2006 04:05:41 -0000 1.12 +++ main.c 10 Mar 2006 07:07:28 -0000 1.13 @@ -24,6 +24,7 @@ static void setup_unit_tests(Ewl_Test *test); static void ewl_test_cb_delete_window(Ewl_Widget *w, void *ev, void *data); +static void ewl_test_cb_exit(Ewl_Widget *w, void *ev, void *data); static void cb_run_unit_tests(Ewl_Widget *w, void *ev, void *data); static Ecore_List *tests = NULL; @@ -107,6 +108,13 @@ } static void +ewl_test_cb_exit(Ewl_Widget *w __UNUSED__, void *ev __UNUSED__, + void *data __UNUSED__) +{ + ewl_main_quit(); +} + +static void ewl_test_print_tests(void) { Ewl_Test *t; @@ -261,11 +269,47 @@ create_main_test_window(Ewl_Container *box) { Ewl_Test *t; - Ewl_Widget *note, *tree, *o, *o2; + Ewl_Widget *menubar, *note, *tree, *o, *o2; Ewl_Widget *sim, *adv, *misc, *container; char *entries[1]; char *headers[] = {"Test", "Pass/Fail", "Reason"}; + menubar = ewl_hmenubar_new(); + ewl_container_child_append(EWL_CONTAINER(box), menubar); + ewl_widget_show(menubar); + + o = ewl_menu_new(); + ewl_container_child_append(EWL_CONTAINER(menubar), o); + ewl_button_label_set(EWL_BUTTON(o), "File"); + ewl_object_fill_policy_set(EWL_OBJECT(o), EWL_FLAG_FILL_NONE); + ewl_widget_show(o); + + o2 = ewl_menu_item_new(); + ewl_button_label_set(EWL_BUTTON(o2), "Exit"); + ewl_callback_append(o2, EWL_CALLBACK_CLICKED, ewl_test_cb_exit, NULL); + ewl_container_child_append(EWL_CONTAINER(o), o2); + ewl_widget_show(o2); + + o = ewl_spacer_new(); + ewl_container_child_append(EWL_CONTAINER(menubar), o); + ewl_widget_show(o); + + o = ewl_menu_new(); + ewl_container_child_append(EWL_CONTAINER(menubar), o); + ewl_button_label_set(EWL_BUTTON(o), "Help"); + ewl_object_fill_policy_set(EWL_OBJECT(o), EWL_FLAG_FILL_NONE); + ewl_widget_show(o); + + o2 = ewl_menu_item_new(); + ewl_button_label_set(EWL_BUTTON(o2), "About EWL..."); + ewl_container_child_append(EWL_CONTAINER(o), o2); + ewl_widget_show(o2); + + o2 = ewl_menu_item_new(); + ewl_button_label_set(EWL_BUTTON(o2), "EWL Test Help"); + ewl_container_child_append(EWL_CONTAINER(o), o2); + ewl_widget_show(o2); + note = ewl_notebook_new(); ewl_container_child_append(box, note); ewl_widget_name_set(note, "notebook"); @@ -341,6 +385,13 @@ ewl_widget_name_set(o2, "unit_test_tree"); ewl_widget_show(o2); + o2 = ewl_hbox_new(); + ewl_container_child_append(EWL_CONTAINER(o), o2); + ewl_object_fill_policy_set(EWL_OBJECT(o2), EWL_FLAG_FILL_HFILL); + ewl_widget_show(o2); + + o = o2; + o2 = ewl_button_new(); ewl_container_child_append(EWL_CONTAINER(o), o2); ewl_button_label_set(EWL_BUTTON(o2), "Run unit tests"); @@ -349,6 +400,11 @@ ewl_widget_name_set(o2, "unit_test_button"); ewl_widget_show(o2); + o2 = ewl_progressbar_new(); + ewl_widget_name_set(o2, "unit_test_progress"); + ewl_container_child_append(EWL_CONTAINER(o), o2); + ewl_widget_show(o2); + o = ewl_text_new(); ewl_container_child_append(EWL_CONTAINER(note), o); ewl_notebook_page_tab_text_set(EWL_NOTEBOOK(note), o, "Tutorial"); ------------------------------------------------------- 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