Enlightenment CVS committal

Author  : pfritz
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_widget.c ewl_widget.h ewl_box.c 


Log Message:
*API BREAK*, don't return a copy

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_widget.c,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -3 -r1.167 -r1.168
--- ewl_widget.c        25 Jul 2008 10:30:04 -0000      1.167
+++ ewl_widget.c        26 Jul 2008 22:11:22 -0000      1.168
@@ -644,14 +644,14 @@
  * failure.
  * @brief Retrieve the appearance key of the widget
  */
-char *
+const char *
 ewl_widget_appearance_get(Ewl_Widget *w)
 {
         DENTER_FUNCTION(DLEVEL_STABLE);
         DCHECK_PARAM_PTR_RET(w, NULL);
         DCHECK_TYPE_RET(w, EWL_WIDGET_TYPE, NULL);
 
-        DRETURN_PTR((w->appearance ? strdup(w->appearance) : NULL), 
DLEVEL_STABLE);
+        DRETURN_PTR(w->appearance, DLEVEL_STABLE);
 }
 
 /**
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_widget.h,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -3 -r1.74 -r1.75
--- ewl_widget.h        4 Jun 2008 20:18:27 -0000       1.74
+++ ewl_widget.h        26 Jul 2008 22:11:22 -0000      1.75
@@ -190,7 +190,7 @@
                                                 Ewl_State_Type flag);
 
 void             ewl_widget_appearance_set(Ewl_Widget *w, const char 
*appearance);
-char            *ewl_widget_appearance_get(Ewl_Widget *w);
+const char      *ewl_widget_appearance_get(Ewl_Widget *w);
 char            *ewl_widget_appearance_path_get(Ewl_Widget *w);
 int              ewl_widget_appearance_path_size_get(Ewl_Widget *w);
 int              ewl_widget_appearance_path_copy(Ewl_Widget *w, char *buf,
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_box.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -3 -r1.58 -r1.59
--- ewl_box.c   11 Jun 2008 23:04:45 -0000      1.58
+++ ewl_box.c   26 Jul 2008 22:11:22 -0000      1.59
@@ -202,7 +202,7 @@
 {
         Ewl_Container *c;
         Ewl_Widget *child;
-        char *appearance;
+        const char *appearance;
 
         DENTER_FUNCTION(DLEVEL_STABLE);
         DCHECK_PARAM_PTR(b);
@@ -223,14 +223,12 @@
          * menubar */
         appearance = ewl_widget_appearance_get(EWL_WIDGET(b));
         if ((b->orientation == EWL_ORIENTATION_HORIZONTAL)
-                        && (!strcmp(appearance,        "vbox")))
+                        && (!strcmp(appearance, "vbox")))
                 ewl_widget_appearance_set(EWL_WIDGET(b), "hbox");
 
         else if ((b->orientation == EWL_ORIENTATION_VERTICAL)
                         && (!strcmp(appearance, "hbox")))
                 ewl_widget_appearance_set(EWL_WIDGET(b), "vbox");
-
-        IF_FREE(appearance);
 
         /* we need to reset the preferred size of the box after chaning the
          * orientation. We'll cheat by calling ewl_box_child_show_cb foreach



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to