Enlightenment CVS committal Author : ningerso Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_widget.c Log Message: Fix the segv in unit test tab. Fix display of text parts when NULL passed for the text value. =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_widget.c,v retrieving revision 1.146 retrieving revision 1.147 diff -u -3 -r1.146 -r1.147 --- ewl_widget.c 10 Nov 2007 06:03:18 -0000 1.146 +++ ewl_widget.c 10 Nov 2007 21:41:59 -0000 1.147 @@ -886,7 +886,11 @@ if (!part || !*part) part = ewl_theme_data_str_get(w, "textpart"); - edje_object_part_text_set(w->theme_object, part, text); + /* + * Set the text to empty if text is NULL. Edje defaults to using the + * default value specified in the theme. + */ + edje_object_part_text_set(w->theme_object, part, (text ? text : "")); edje_object_size_min_calc(w->theme_object, &nw, &nh); ewl_object_preferred_inner_size_set(EWL_OBJECT(w), (int)nw, (int)nh); @@ -946,7 +950,7 @@ * Part key exists and the value is the same as the current value. */ if (match) { - if (text && !strcmp(text, match->value)) + if (text && match->value && !strcmp(text, match->value)) DRETURN(DLEVEL_STABLE); IF_FREE(match->value); ------------------------------------------------------------------------- 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