Enlightenment CVS committal

Author  : ningerso
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/bin


Modified Files:
        main.c 


Log Message:
Handle test selection in a more intuitive way.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/bin/main.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -3 -r1.69 -r1.70
--- main.c      23 Aug 2007 05:26:42 -0000      1.69
+++ main.c      30 Aug 2007 16:56:26 -0000      1.70
@@ -1131,17 +1131,18 @@
 
        tree_data = ewl_mvc_data_get(EWL_MVC(w));
        sel = ewl_mvc_selected_get(EWL_MVC(w));
+       if (!sel)
+               goto EXIT_CALLBACK;
 
        /* don't care about the top level rows */
        if (tree_data == sel->sel.data)
-       {
-               free(sel);
-               return;
-       }
+               goto CLEAR_SELECTION;
 
        /* get the test */
        ecore_list_index_goto(sel->sel.data, sel->row);
        test = ecore_list_current(sel->sel.data);
+       if (!test)
+               goto FREE_SELECTION;
 
        /* we need to determine if this is the unit test case. if it is we
         * need to treat it specially */
@@ -1152,7 +1153,12 @@
        else
                run_test_boxed(test);
 
+CLEAR_SELECTION:
+       ewl_mvc_selected_clear(EWL_MVC(w));
+FREE_SELECTION:
        free(sel);
+EXIT_CALLBACK:
+       return;
 }
 
 static void *



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to