Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/bin/tests/menubar Modified Files: ewl_menubar.c Log Message: - formatting =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/menubar/ewl_menubar.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- ewl_menubar.c 17 Oct 2006 04:59:57 -0000 1.1 +++ ewl_menubar.c 6 Dec 2006 20:21:57 -0000 1.2 @@ -17,104 +17,104 @@ static int create_test(Ewl_Container *box) { - Ewl_Widget *h_menubar = NULL, *v_menubar = NULL; + Ewl_Widget *h_menubar = NULL, *v_menubar = NULL; - h_menubar = ewl_hmenubar_new(); - { - int i; - Ewl_Widget *item; - Ewl_Widget *foo; - char *m_items[] = {"File", - "Test", - "About", - NULL}; - for(i = 0; m_items[i] != NULL; i++) { - item = ewl_menu_new(); - ewl_button_label_set(EWL_BUTTON(item), m_items[i]); - ewl_container_child_append(EWL_CONTAINER(h_menubar), item); - ewl_widget_show(item); - - foo = ewl_menu_item_new(); - ewl_button_label_set(EWL_BUTTON(foo), "foo"); - ewl_container_child_append(EWL_CONTAINER(item), foo); - ewl_widget_show(foo); - - foo = ewl_menu_item_new(); - ewl_button_label_set(EWL_BUTTON(foo), "foobar"); - ewl_container_child_append(EWL_CONTAINER(item), foo); - ewl_widget_show(foo); - - if (i != 0 && (i % 1) == 0) { - Ewl_Widget *sep; - - sep = ewl_vseparator_new(); - ewl_container_child_append(EWL_CONTAINER(h_menubar), sep); - ewl_widget_show(sep); - } - } - - item = ewl_spacer_new(); - ewl_object_fill_policy_set(EWL_OBJECT(item), EWL_FLAG_FILL_ALL); - ewl_container_child_append(EWL_CONTAINER(h_menubar), item); - ewl_widget_show(item); - - item = ewl_menu_new(); - ewl_button_label_set(EWL_BUTTON(item), "Help"); - ewl_container_child_append(EWL_CONTAINER(h_menubar), item); - ewl_widget_show(item); - - foo = ewl_menu_item_new(); - ewl_button_label_set(EWL_BUTTON(foo), "foo"); - ewl_container_child_append(EWL_CONTAINER(item), foo); - ewl_widget_show(foo); - - foo = ewl_menu_item_new(); - ewl_button_label_set(EWL_BUTTON(foo), "foobar"); - ewl_container_child_append(EWL_CONTAINER(item), foo); - ewl_widget_show(foo); - } - ewl_container_child_append(EWL_CONTAINER(box), h_menubar); - ewl_widget_show(h_menubar); - - v_menubar = ewl_vmenubar_new(); - { - int i; - Ewl_Widget *item; - char *m_items[] = {"About", - "Left", - "Right", - "foo", - NULL}; - for(i = 0; m_items[i] != NULL; i++) { - Ewl_Widget *foo; - - item = ewl_menu_new(); - ewl_button_label_set(EWL_BUTTON(item), m_items[i]); - ewl_container_child_append(EWL_CONTAINER(v_menubar), item); - ewl_widget_show(item); - - foo = ewl_menu_item_new(); - ewl_button_label_set(EWL_BUTTON(foo), "foo"); - ewl_container_child_append(EWL_CONTAINER(item), foo); - ewl_widget_show(foo); - - foo = ewl_menu_item_new(); - ewl_button_label_set(EWL_BUTTON(foo), "foobar"); - ewl_container_child_append(EWL_CONTAINER(item), foo); - ewl_widget_show(foo); - - if (i != 0 && (i % 2) == 0) - { - Ewl_Widget *sep; - - sep = ewl_hseparator_new(); - ewl_container_child_append(EWL_CONTAINER(v_menubar), sep); - ewl_widget_show(sep); - } - } - } - ewl_container_child_append(EWL_CONTAINER(box), v_menubar); - ewl_widget_show(v_menubar); + h_menubar = ewl_hmenubar_new(); + { + int i; + Ewl_Widget *item; + Ewl_Widget *foo; + char *m_items[] = {"File", + "Test", + "About", + NULL}; + for(i = 0; m_items[i] != NULL; i++) { + item = ewl_menu_new(); + ewl_button_label_set(EWL_BUTTON(item), m_items[i]); + ewl_container_child_append(EWL_CONTAINER(h_menubar), item); + ewl_widget_show(item); + + foo = ewl_menu_item_new(); + ewl_button_label_set(EWL_BUTTON(foo), "foo"); + ewl_container_child_append(EWL_CONTAINER(item), foo); + ewl_widget_show(foo); + + foo = ewl_menu_item_new(); + ewl_button_label_set(EWL_BUTTON(foo), "foobar"); + ewl_container_child_append(EWL_CONTAINER(item), foo); + ewl_widget_show(foo); + + if (i != 0 && (i % 1) == 0) { + Ewl_Widget *sep; + + sep = ewl_vseparator_new(); + ewl_container_child_append(EWL_CONTAINER(h_menubar), sep); + ewl_widget_show(sep); + } + } + + item = ewl_spacer_new(); + ewl_object_fill_policy_set(EWL_OBJECT(item), EWL_FLAG_FILL_ALL); + ewl_container_child_append(EWL_CONTAINER(h_menubar), item); + ewl_widget_show(item); + + item = ewl_menu_new(); + ewl_button_label_set(EWL_BUTTON(item), "Help"); + ewl_container_child_append(EWL_CONTAINER(h_menubar), item); + ewl_widget_show(item); + + foo = ewl_menu_item_new(); + ewl_button_label_set(EWL_BUTTON(foo), "foo"); + ewl_container_child_append(EWL_CONTAINER(item), foo); + ewl_widget_show(foo); + + foo = ewl_menu_item_new(); + ewl_button_label_set(EWL_BUTTON(foo), "foobar"); + ewl_container_child_append(EWL_CONTAINER(item), foo); + ewl_widget_show(foo); + } + ewl_container_child_append(EWL_CONTAINER(box), h_menubar); + ewl_widget_show(h_menubar); + + v_menubar = ewl_vmenubar_new(); + { + int i; + Ewl_Widget *item; + char *m_items[] = {"About", + "Left", + "Right", + "foo", + NULL}; + for(i = 0; m_items[i] != NULL; i++) { + Ewl_Widget *foo; + + item = ewl_menu_new(); + ewl_button_label_set(EWL_BUTTON(item), m_items[i]); + ewl_container_child_append(EWL_CONTAINER(v_menubar), item); + ewl_widget_show(item); + + foo = ewl_menu_item_new(); + ewl_button_label_set(EWL_BUTTON(foo), "foo"); + ewl_container_child_append(EWL_CONTAINER(item), foo); + ewl_widget_show(foo); + + foo = ewl_menu_item_new(); + ewl_button_label_set(EWL_BUTTON(foo), "foobar"); + ewl_container_child_append(EWL_CONTAINER(item), foo); + ewl_widget_show(foo); + + if (i != 0 && (i % 2) == 0) + { + Ewl_Widget *sep; + + sep = ewl_hseparator_new(); + ewl_container_child_append(EWL_CONTAINER(v_menubar), sep); + ewl_widget_show(sep); + } + } + } + ewl_container_child_append(EWL_CONTAINER(box), v_menubar); + ewl_widget_show(v_menubar); return 1; } ------------------------------------------------------------------------- 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 enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs