Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_object.c 


Log Message:
Now that the fill policy size notification changes are working correctly,
these bounds checks are unecessary and don't help the situation.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_object.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- ewl_object.c        25 Oct 2005 00:36:57 -0000      1.9
+++ ewl_object.c        23 Nov 2005 05:56:58 -0000      1.10
@@ -214,7 +214,7 @@
 void
 ewl_object_preferred_inner_w_set(Ewl_Object *o, int w)
 {
-       int old_size, new_size;
+       int old_size;
        unsigned int resize, fill;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
@@ -226,12 +226,6 @@
        old_size = PREFERRED_W(o);
 
        PREFERRED_W(o) = w;
-       if (w < MINIMUM_W(o))
-               new_size = MINIMUM_W(o);
-       else if (w > MAXIMUM_W(o))
-               new_size = MAXIMUM_W(o);
-       else
-               new_size = w;
 
        if (CURRENT_W(o) < PREFERRED_W(o))
                fill = EWL_FLAG_FILL_HSHRINK;
@@ -246,7 +240,8 @@
         * Now update the widgets parent of the change in size if necessary.
         */
        if (!(resize & fill))
-               ewl_container_child_resize(EWL_WIDGET(o), new_size - old_size,
+               ewl_container_child_resize(EWL_WIDGET(o),
+                               PREFERRED_W(o) - old_size,
                                EWL_ORIENTATION_HORIZONTAL);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -264,7 +259,7 @@
 void
 ewl_object_preferred_inner_h_set(Ewl_Object *o, int h)
 {
-       int old_size, new_size;
+       int old_size;
        unsigned int resize, fill;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
@@ -276,12 +271,6 @@
        old_size = PREFERRED_H(o);
 
        PREFERRED_H(o) = h;
-       if (h < MINIMUM_H(o))
-               new_size = MINIMUM_H(o);
-       else if (h > MAXIMUM_H(o))
-               new_size = MAXIMUM_H(o);
-       else
-               new_size = h;
 
        if (CURRENT_H(o) < PREFERRED_H(o))
                fill = EWL_FLAG_FILL_VSHRINK;
@@ -296,7 +285,8 @@
         * Now update the widgets parent of the change in size if necessary.
         */
        if (!(resize & fill))
-               ewl_container_child_resize(EWL_WIDGET(o), new_size - old_size,
+               ewl_container_child_resize(EWL_WIDGET(o),
+                               PREFERRED_H(o) - old_size,
                                EWL_ORIENTATION_VERTICAL);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to