Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_range.c Log Message: - minor changes =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_range.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- ewl_range.c 11 Aug 2006 04:02:40 -0000 1.1 +++ ewl_range.c 11 Aug 2006 05:50:55 -0000 1.2 @@ -49,13 +49,12 @@ void ewl_range_value_set(Ewl_Range *r, double v) { - double oval; - DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("r", r); DCHECK_TYPE("r", r, EWL_RANGE_TYPE); - oval = r->value; + if (r->value == v) + DRETURN(DLEVEL_STABLE); if (v < r->min_val) r->value = r->min_val; @@ -64,10 +63,8 @@ else r->value = v; - if (oval != r->value) { - ewl_callback_call(EWL_WIDGET(r), EWL_CALLBACK_VALUE_CHANGED); - ewl_widget_configure(EWL_WIDGET(r)); - } + ewl_callback_call(EWL_WIDGET(r), EWL_CALLBACK_VALUE_CHANGED); + ewl_widget_configure(EWL_WIDGET(r)); DLEAVE_FUNCTION(DLEVEL_STABLE); } @@ -104,8 +101,10 @@ DCHECK_TYPE("r", r, EWL_RANGE_TYPE); r->min_val = minv; - /* we need this to check if the value is still in the bounce */ - ewl_range_value_set(r, r->value); + + /* update to the min value if needed */ + if (r->value < r->min_val) + ewl_range_value_set(r, r->min_val); DLEAVE_FUNCTION(DLEVEL_STABLE); } @@ -141,8 +140,10 @@ DCHECK_TYPE("r", r, EWL_RANGE_TYPE); r->max_val = maxv; - /* we need this to check if the value is still in the bounce */ - ewl_range_value_set(r, r->value); + + /* update to max value if needed */ + if (r->value > r->max_val) + ewl_range_value_set(r, r->max_val); DLEAVE_FUNCTION(DLEVEL_STABLE); } @@ -214,7 +215,8 @@ DCHECK_PARAM_PTR("r", r); DCHECK_TYPE("r", r, EWL_RANGE_TYPE); - if (r->invert != invert) { + if (r->invert != invert) + { r->invert = invert; ewl_widget_configure(EWL_WIDGET(r)); } ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs