Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_combo.c 


Log Message:
- bug fixes

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_combo.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- ewl_combo.c 15 Mar 2006 05:14:50 -0000      1.20
+++ ewl_combo.c 8 Apr 2006 21:06:29 -0000       1.21
@@ -96,8 +96,9 @@
        DCHECK_PARAM_PTR("combo", combo);
        DCHECK_TYPE("combo", combo, EWL_COMBO_TYPE);
 
-       if (combo->selected_idx == idx)
-               DRETURN(DLEVEL_STABLE);
+       /* we don't bail out early as the user could have prepended widgets
+        * to their data, so the selected_idx will be the same but the
+        * widget is actually different */
 
        combo->selected_idx = idx;
 
@@ -117,13 +118,16 @@
                combo->view->assign(combo->selected, 
                                combo->model->fetch(combo->data, idx, 0));
        }
-       else
+       else if (combo->view && combo->view->header_fetch)
                combo->selected = combo->view->header_fetch(combo->data, 
                                                        combo->selected_idx);   
 
-       ewl_container_child_prepend(EWL_CONTAINER(combo), combo->selected);
-       ewl_widget_show(combo->selected);
-                                               
+       if (combo->selected)
+       {
+               ewl_container_child_prepend(EWL_CONTAINER(combo), 
combo->selected);
+               ewl_widget_show(combo->selected);
+       }
+
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
 




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to