Enlightenment CVS committal

Author  : ningerso
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_widget.c 


Log Message:
Allow NULL to be set for text parts.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_widget.c,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -3 -r1.144 -r1.145
--- ewl_widget.c        23 Aug 2007 05:26:52 -0000      1.144
+++ ewl_widget.c        8 Nov 2007 07:02:39 -0000       1.145
@@ -875,7 +875,6 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
-       DCHECK_PARAM_PTR("text", text);
        DCHECK_TYPE("w", w, EWL_WIDGET_TYPE);
 
        if (!w->theme_object)
@@ -947,7 +946,7 @@
         * Part key exists and the value is the same as the current value.
         */
        if (match) {
-               if (!strcmp(text, match->value))
+               if (text && !strcmp(text, match->value))
                        DRETURN(DLEVEL_STABLE);
 
                IF_FREE(match->value);
@@ -983,7 +982,7 @@
         * What should be the default if you enter NULL? A blank string?
         * Revert to the text specified in the Edje? Use blank for now.
         */
-       match->value = strdup(text ? text : "");
+       match->value = (text ? strdup(text) : NULL);
        ewl_widget_appearance_part_text_apply(w, match->key, match->value);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);



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