Enlightenment CVS committal

Author  : pfritz
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_tree2.c 


Log Message:
add proper warning, this doesn't remove the warnings that sometimes occure but 
make them more descriptive

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_tree2.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -3 -r1.86 -r1.87
--- ewl_tree2.c 12 Nov 2007 22:42:22 -0000      1.86
+++ ewl_tree2.c 30 Nov 2007 23:33:33 -0000      1.87
@@ -930,21 +930,30 @@
 }
 
 static Ewl_Widget *
-ewl_tree2_widget_at(Ewl_MVC *mvc, void *data __UNUSED__, unsigned int row,
+ewl_tree2_widget_at(Ewl_MVC *mvc, void *data, unsigned int row,
                        unsigned int column)
 {
        Ewl_Widget *r, *w;
        Ewl_Tree2 *tree;
+       Ewl_Container *c;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET(mvc, NULL);
        DCHECK_TYPE_RET(mvc, EWL_TREE2_TYPE, NULL);
 
        tree = EWL_TREE2(mvc);
-       r = ewl_container_child_get(EWL_CONTAINER(tree->rows), row);
+       
+       if (data != ewl_mvc_data_get(mvc))
+       {
+               DWARNING("This function doesn't handle tree branches yet");
+               DRETURN_PTR(NULL, DLEVEL_STABLE);
+       }
+       else
+               c = EWL_CONTAINER(tree->rows);
 
+       r = ewl_container_child_get(c, row);
        if (tree->type == EWL_TREE_SELECTION_TYPE_ROW)
-               w = r;
+               w = EWL_WIDGET(c);
        else
                w = ewl_container_child_get(EWL_CONTAINER(r), column);
 



-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to