Enlightenment CVS committal Author : rbdpngn Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_row.c ewl_filedialog.c ewl_fileselector.c ewl_tree.c Log Message: Use labels for text rows in the tree. Reduce callbacks on row header. Use labels instead of text widgets in the fileselector. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_row.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- ewl_row.c 25 Oct 2005 02:41:52 -0000 1.10 +++ ewl_row.c 13 Nov 2005 06:38:27 -0000 1.11 @@ -79,6 +79,7 @@ if (row->header == header) DRETURN(DLEVEL_STABLE); + /* if (row->header) { ewl_callback_del_with_data(EWL_WIDGET(row->header), EWL_CALLBACK_CONFIGURE, @@ -87,13 +88,16 @@ EWL_CALLBACK_DESTROY, ewl_row_header_destroy_cb, row); } + */ row->header = header; if (header) { + /* ewl_callback_append(EWL_WIDGET(header), EWL_CALLBACK_CONFIGURE, ewl_row_header_configure_cb, row); ewl_callback_prepend(EWL_WIDGET(header), EWL_CALLBACK_DESTROY, ewl_row_header_destroy_cb, row); + */ ewl_object_fill_policy_set(EWL_OBJECT(row), EWL_FLAG_FILL_HFILL); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_filedialog.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- ewl_filedialog.c 23 Oct 2005 23:22:23 -0000 1.9 +++ ewl_filedialog.c 13 Nov 2005 06:38:27 -0000 1.10 @@ -274,5 +274,3 @@ DLEAVE_FUNCTION(DLEVEL_STABLE); } - - =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_fileselector.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -3 -r1.29 -r1.30 --- ewl_fileselector.c 23 Oct 2005 23:46:47 -0000 1.29 +++ ewl_fileselector.c 13 Nov 2005 06:38:27 -0000 1.30 @@ -844,20 +844,15 @@ ecore_list_goto_first(dirs); while ((d = ecore_list_current(dirs))) { - Ewl_Widget *hbox; Ewl_Widget *label; - hbox = ewl_hbox_new(); - ewl_box_spacing_set(EWL_BOX(hbox), 5); - label = ewl_text_new(); - ewl_text_text_set(EWL_TEXT(label), d->name); + label = ewl_label_new(); + ewl_label_text_set(EWL_LABEL(label), d->name); ewl_object_fill_policy_set(EWL_OBJECT(label), EWL_FLAG_FILL_SHRINK); - ewl_container_child_append(EWL_CONTAINER(hbox), label); ewl_widget_show(label); - ewl_widget_show(hbox); - prow = ewl_tree_row_add(EWL_TREE(fs->list_dirs), NULL, &hbox); + prow = ewl_tree_row_add(EWL_TREE(fs->list_dirs), NULL, &label); ewl_widget_data_set(prow, "FILESELECTOR_DIR", strdup(d->name)); ewl_fileselector_tooltip_add(prow, ecore_list_current(dirs)); ewl_fileselector_data_free(d); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_tree.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -3 -r1.16 -r1.17 --- ewl_tree.c 26 Oct 2005 00:58:08 -0000 1.16 +++ ewl_tree.c 13 Nov 2005 06:38:27 -0000 1.17 @@ -102,6 +102,8 @@ ewl_container_redirect_set(EWL_CONTAINER(tree), EWL_CONTAINER(tree->scrollarea)); + ewl_callback_append(EWL_WIDGET(tree->header), EWL_CALLBACK_CONFIGURE, + ewl_tree_header_configure_cb, tree->scrollarea); ewl_tree_headers_visible_set(tree, 1); DRETURN_INT(TRUE, DLEVEL_STABLE); @@ -314,15 +316,17 @@ DRETURN_PTR(NULL, DLEVEL_STABLE); for (i = 0; i < tree->ncols; i++) { + texts[i] = ewl_label_new(); + ewl_object_fill_policy_set(EWL_OBJECT(texts[i]), + EWL_FLAG_FILL_NONE); + ewl_widget_show(texts[i]); + if (text) { - texts[i] = ewl_text_new(); - ewl_text_text_set(EWL_TEXT(texts[i]), text[i]); + ewl_label_text_set(EWL_LABEL(texts[i]), text[i]); } else { - texts[i] = ewl_text_new(); - ewl_text_text_set(EWL_TEXT(texts[i]), NULL); + ewl_label_text_set(EWL_LABEL(texts[i]), NULL); } - ewl_widget_show(texts[i]); } row = ewl_tree_row_add(tree, prow, texts); @@ -649,6 +653,21 @@ } void +ewl_tree_header_configure_cb(Ewl_Widget *w, void *ev_data __UNUSED__, + void *user_data __UNUSED__) +{ + Ewl_Widget *scrollarea = user_data; + + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR("w", w); + DCHECK_TYPE("w", w, "widget"); + + ewl_widget_configure(scrollarea); + + DLEAVE_FUNCTION(DLEVEL_STABLE); +} + +void ewl_tree_destroy_cb(Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) { ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs