Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/test
Modified Files:
ewl_tree_test.c
Log Message:
Check for a NULL embed on a widgets reparent. Better layout in the rows, and a
cleaner fill policy in the cell's for displaying items in the tree.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/test/ewl_tree_test.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- ewl_tree_test.c 4 Nov 2003 07:16:45 -0000 1.6
+++ ewl_tree_test.c 14 Nov 2003 21:25:26 -0000 1.7
@@ -25,6 +25,8 @@
void *user_data)
{
int row, col;
+ char buf[PATH_MAX];
+ char *headers[COLS];
char *entries[COLS];
Ewl_Widget *tree_win;
Ewl_Widget *tree;
@@ -41,14 +43,19 @@
__destroy_tree_test_window, NULL);
ewl_widget_show(tree_win);
+ for (col = 0; col < COLS; col++) {
+ snprintf(buf, PATH_MAX, "Column %d", col);
+ headers[col] = strdup(buf);
+ }
+
tree = ewl_tree_new(COLS);
ewl_container_append_child(EWL_CONTAINER(tree_win), tree);
+ ewl_tree_set_headers(EWL_TREE(tree), headers);
ewl_widget_show(tree);
memset(entries, 0, COLS * sizeof(char *));
for (row = 0; row < ROWS; row++) {
- char buf[1024];
/*
* Build the array of entries.
@@ -66,10 +73,15 @@
prow = ewl_tree_add_text_row(EWL_TREE(tree),
EWL_ROW(prow), entries);
/* ewl_tree_set_row_expanded(EWL_ROW(prow), TRUE); */
+
+ for (col = 0; col < COLS; col++) {
+ IF_FREE(entries[col]);
+ }
}
- for (col = 0; col < COLS; col++)
- IF_FREE(entries[col]);
+ for (col = 0; col < COLS; col++) {
+ IF_FREE(headers[col]);
+ }
printf("Tree setup complete!!!\n");
-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs