Enlightenment CVS committal Author : pfritz Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/bin/tests/notebook Modified Files: ewl_notebook.c Log Message: add homogeneous tabbar test =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/notebook/ewl_notebook.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- ewl_notebook.c 4 Jun 2007 18:46:35 -0000 1.5 +++ ewl_notebook.c 1 Jul 2007 18:48:06 -0000 1.6 @@ -91,6 +91,17 @@ } static void +notebook_cb_homogeneous_toggle_clicked(Ewl_Widget *w __UNUSED__, + void *ev __UNUSED__, void *data __UNUSED__) +{ + Ewl_Widget *n; + + n = ewl_widget_name_find("notebook"); + ewl_notebook_tabbar_homogeneous_set(EWL_NOTEBOOK(n), + !ewl_notebook_tabbar_homogeneous_get(EWL_NOTEBOOK(n))); +} + +static void notebook_change_align(Ewl_Widget *w __UNUSED__, void *ev __UNUSED__, void *data) { @@ -271,11 +282,23 @@ o2 = o; } - o = ewl_button_new(); - ewl_button_label_set(EWL_BUTTON(o), "Toggle tabbar"); + o = ewl_checkbutton_new(); + ewl_checkbutton_checked_set(EWL_CHECKBUTTON(o), TRUE); + ewl_button_label_set(EWL_BUTTON(o), "Show tabbar"); + ewl_container_child_append(EWL_CONTAINER(body), o); + ewl_object_fill_policy_set(EWL_OBJECT(o), EWL_FLAG_FILL_SHRINK); + ewl_object_alignment_set(EWL_OBJECT(o), EWL_FLAG_ALIGN_LEFT); + ewl_callback_append(o, EWL_CALLBACK_CLICKED, + notebook_cb_toggle_clicked, NULL); + ewl_widget_show(o); + + o = ewl_checkbutton_new(); + ewl_button_label_set(EWL_BUTTON(o), "homogeneous tabbar"); ewl_container_child_append(EWL_CONTAINER(body), o); ewl_object_fill_policy_set(EWL_OBJECT(o), EWL_FLAG_FILL_SHRINK); - ewl_callback_append(o, EWL_CALLBACK_CLICKED, notebook_cb_toggle_clicked, NULL); + ewl_callback_append(o, EWL_CALLBACK_CLICKED, + notebook_cb_homogeneous_toggle_clicked, NULL); + ewl_object_alignment_set(EWL_OBJECT(o), EWL_FLAG_ALIGN_LEFT); ewl_widget_show(o); return body; ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs