Enlightenment CVS committal

Author  : ningerso
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/bin/tests/list


Modified Files:
        ewl_list.c 


Log Message:
Next step in the MVC API transition. This will break all existing users of tree2
and other MVC based widgets. Following this there will be one more significant
break in the API for tree2 users.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/list/ewl_list.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ewl_list.c  21 Mar 2007 03:22:55 -0000      1.8
+++ ewl_list.c  23 Mar 2007 22:06:30 -0000      1.9
@@ -25,7 +25,7 @@
 static void list_cb_value_changed(Ewl_Widget *w, void *ev, void *data);
 static void list_cb_multi_value_changed(Ewl_Widget *w, void *ev, void *data);
 
-static void list_test_assign_set(Ewl_Widget *w, void *data);
+static Ewl_Widget *list_test_cb_widget_fetch(void *data, int row, int col);
 static void *list_test_data_fetch(void *data, unsigned int row, 
                                                unsigned int column);
 static int list_test_data_count_get(void *data);
@@ -107,8 +107,8 @@
        ewl_model_data_count_set(model, list_test_data_count_get);
 
        view = ewl_view_new();
-       ewl_view_constructor_set(view, ewl_button_new);
-       ewl_view_assign_set(view, EWL_VIEW_ASSIGN(list_test_assign_set));
+       ewl_view_widget_fetch_set(view, list_test_cb_widget_fetch);
+       ewl_view_header_fetch_set(view, NULL);
 
        data = list_test_data_setup();
 
@@ -174,14 +174,20 @@
        return data;
 }
 
-static void
-list_test_assign_set(Ewl_Widget *w, void *data)
+static Ewl_Widget *
+list_test_cb_widget_fetch(void *data, int row, int col)
 {
+       Ewl_Widget *w;
        List_Test_Row_Data *d;
 
        d = data;
+
+       w = ewl_button_new();
        ewl_button_label_set(EWL_BUTTON(w), d->text);
        ewl_button_image_set(EWL_BUTTON(w), d->image, NULL);
+       ewl_widget_show(w);
+
+       return w;
 }
 
 static void *



-------------------------------------------------------------------------
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

Reply via email to