Enlightenment CVS committal
Author : dj2
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/bin/tests
Modified Files:
Makefile.am ewl_combo.c ewl_list.c ewl_text_editor.c
ewl_tree.c
Added Files:
ewl_mvc.c
Log Message:
- do some more work on the mvc selection code.
- this breaks the current api
- EWL_TREE_MODE is now EWL_SELECTION_MODE
- the selection_rm is missing the ability to remove from ranges
- still need to fill the unit tests
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/Makefile.am,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- Makefile.am 14 Sep 2006 05:35:38 -0000 1.40
+++ Makefile.am 15 Oct 2006 22:34:14 -0000 1.41
@@ -29,7 +29,7 @@
ewl_widget.la fullscreen.la modal.la ewl_layer.la \
ewl_list.la puzzle.la ewl_grid.la \
ewl_icon_theme.la ewl_container.la ewl_histogram.la \
- ewl_io_manager.la
+ ewl_io_manager.la ewl_mvc.la
ewl_border_la_SOURCES = ewl_border.c
ewl_border_la_LIBADD = $(top_builddir)/src/lib/libewl.la
@@ -381,6 +381,13 @@
-L$(top_builddir)/src/lib/.libs
ewl_io_manager_la_DEPENDENCIES =
+ewl_mvc_la_SOURCES = ewl_mvc.c
+ewl_mvc_la_LIBADD = $(top_builddir)/src/lib/libewl.la
+ewl_mvc_la_LDFLAGS = -module -avoid-version \
+ -L$(top_builddir)/src/lib \
+ -L$(top_builddir)/src/lib/.libs
+ewl_mvc_la_DEPENDENCIES =
+
FILES = $(ewl_border_la_SOURCES) $(ewl_box_la_SOURCES) \
$(ewl_button_la_SOURCES) $(ewl_colordialog_la_SOURCES) \
@@ -406,7 +413,8 @@
$(ewl_dnd_snoop_la_SOURCES) $(ewl_list_la_SOURCES) \
$(puzzle_la_SOURCES) $(ewl_grid_la_SOURCES) \
$(ewl_icon_theme_la_SOURCES) $(ewl_container_la_SOURCES) \
- $(ewl_histogram_la_SOURCES) $(ewl_io_manager_la_SOURCES)
+ $(ewl_histogram_la_SOURCES) $(ewl_io_manager_la_SOURCES) \
+ $(ewl_mvc_la_SOURCES)
EXTRA_DIST = $(FILES)
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/ewl_combo.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- ewl_combo.c 3 Oct 2006 05:17:13 -0000 1.17
+++ ewl_combo.c 15 Oct 2006 22:34:14 -0000 1.18
@@ -238,15 +238,13 @@
void *data __UNUSED__)
{
Combo_Test_Data *d;
- int idx;
+ Ewl_Selection_Idx *idx;
d = ewl_mvc_data_get(EWL_MVC(w));
idx = ewl_mvc_selected_get(EWL_MVC(w));
- if (idx > -1)
- printf("value changed to %d (%s)\n", idx, d->data[idx]);
- else
- printf("Nothing selected.\n");
+ printf("value changed to %d (%s)\n",
+ idx->row, d->data[idx->row]);
}
static void
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/ewl_list.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- ewl_list.c 3 Oct 2006 05:52:02 -0000 1.6
+++ ewl_list.c 15 Oct 2006 22:34:14 -0000 1.7
@@ -194,11 +194,13 @@
{
Ewl_List *list;
Ecore_List *el;
+ Ewl_Selection_Idx *idx;
list = EWL_LIST(w);
el = ewl_mvc_data_get(EWL_MVC(list));
+ idx = ewl_mvc_selected_get(EWL_MVC(list));
- ecore_list_goto_index(el, ewl_mvc_selected_get(EWL_MVC(list)));
+ ecore_list_goto_index(el, idx->row);
printf("Selected (%s)\n", (char *)ecore_list_current(el));
}
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/ewl_text_editor.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- ewl_text_editor.c 3 Oct 2006 05:17:13 -0000 1.19
+++ ewl_text_editor.c 15 Oct 2006 22:34:14 -0000 1.20
@@ -133,7 +133,7 @@
ewl_mvc_model_set(EWL_MVC(o), model);
ewl_mvc_view_set(EWL_MVC(o), view);
ewl_mvc_data_set(EWL_MVC(o), styles);
- ewl_mvc_selected_set(EWL_MVC(o), 0);
+ ewl_mvc_selected_set(EWL_MVC(o), 0, 0);
ewl_container_child_append(EWL_CONTAINER(hbox), o);
ewl_callback_append(o, EWL_CALLBACK_VALUE_CHANGED,
ete_cb_styles_changed, NULL);
@@ -251,12 +251,11 @@
void *data __UNUSED__)
{
Ewl_Widget *entry;
- int idx;
+ Ewl_Selection_Idx *idx;
char *str;
idx = ewl_mvc_selected_get(EWL_MVC(w));
- str = ecore_list_goto_index(ewl_mvc_data_get(EWL_MVC(w)),
- ewl_mvc_selected_get(EWL_MVC(w)));
+ str = ecore_list_goto_index(ewl_mvc_data_get(EWL_MVC(w)), idx->row);
entry = ewl_widget_name_find("entry");
if (!strcmp(str, "None"))
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/ewl_tree.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- ewl_tree.c 7 Sep 2006 02:39:46 -0000 1.6
+++ ewl_tree.c 15 Oct 2006 22:34:14 -0000 1.7
@@ -39,7 +39,7 @@
ewl_widget_show(hbox);
tree = ewl_tree_new(COLS);
- ewl_tree_mode_set(EWL_TREE(tree), EWL_TREE_MODE_SINGLE);
+ ewl_tree_mode_set(EWL_TREE(tree), EWL_SELECTION_MODE_SINGLE);
button = ewl_button_new();
ewl_button_label_set(EWL_BUTTON(button), "Number of selected rows");
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs