Enlightenment CVS committal Author : ningerso Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_window.c Log Message: Use NULL instead of duplicating "" for window properties. Update window unit tests to reflect this change. =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_window.c,v retrieving revision 1.87 retrieving revision 1.88 diff -u -3 -r1.87 -r1.88 --- ewl_window.c 19 Dec 2007 16:15:31 -0000 1.87 +++ ewl_window.c 19 Dec 2007 21:53:57 -0000 1.88 @@ -53,11 +53,6 @@ ewl_widget_appearance_set(EWL_WIDGET(w), EWL_WINDOW_TYPE); ewl_widget_inherit(EWL_WIDGET(w), EWL_WINDOW_TYPE); ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_FILL); - /* - w->title = strdup("EWL"); - w->name = strdup("EWL"); - w->classname = strdup("EWL"); - */ ewl_callback_prepend(EWL_WIDGET(w), EWL_CALLBACK_REALIZE, ewl_window_cb_realize, NULL); @@ -124,7 +119,7 @@ if ((!title) || (!win->title) || (strcmp(win->title, title))) { IF_FREE(win->title); - win->title = (title ? strdup(title) : strdup("")); + win->title = ((title && *title) ? strdup(title) : NULL); } ewl_engine_window_title_set(win); @@ -168,7 +163,7 @@ if ((!name) || (!win->name) || (strcmp(win->name, name))) { IF_FREE(win->name); - win->name = (name ? strdup(name) : strdup("")); + win->name = ((name && *name) ? strdup(name) : NULL); } ewl_engine_window_name_class_set(win); @@ -214,7 +209,8 @@ || (strcmp(win->classname, classname))) { IF_FREE(win->classname); - win->classname = (classname ? strdup(classname) : strdup("")); + win->classname = ((classname && *classname) ? + strdup(classname) : NULL); } ewl_engine_window_name_class_set(win); ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs