Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_colorpicker.c ewl_colorpicker.h Log Message: - keep the colorpicker from looping infinitly. Seems to be working =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_colorpicker.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -3 -r1.25 -r1.26 --- ewl_colorpicker.c 11 Aug 2006 04:00:57 -0000 1.25 +++ ewl_colorpicker.c 11 Aug 2006 07:50:23 -0000 1.26 @@ -386,7 +386,7 @@ ewl_spectrum_rgb_set(EWL_SPECTRUM(cp->picker.vertical), r, g, b); ewl_spectrum_hsv_get(EWL_SPECTRUM(cp->picker.square), &h, &s, &v); - ewl_colorpicker_display_update(cp, r, g, b, h, s * 100, v * 100); + ewl_colorpicker_display_update(cp, r, g, b, h, s, v); DLEAVE_FUNCTION(DLEVEL_STABLE); } @@ -734,6 +734,11 @@ DCHECK_PARAM_PTR("cp", cp); DCHECK_TYPE("cp", cp, EWL_COLORPICKER_TYPE); + if (cp->updating) + DRETURN(DLEVEL_STABLE); + + cp->updating = TRUE; + ewl_range_value_set(EWL_RANGE(cp->spinners.rgb.r), r); ewl_range_value_set(EWL_RANGE(cp->spinners.rgb.g), g); ewl_range_value_set(EWL_RANGE(cp->spinners.rgb.b), b); @@ -743,8 +748,9 @@ ewl_range_value_set(EWL_RANGE(cp->spinners.hsv.v), v * 100); ewl_widget_color_set(cp->preview.current, r, g, b, 255); - ewl_callback_call(EWL_WIDGET(cp), EWL_CALLBACK_VALUE_CHANGED); + + cp->updating = FALSE; DLEAVE_FUNCTION(DLEVEL_STABLE); } =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_colorpicker.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -3 -r1.18 -r1.19 --- ewl_colorpicker.h 19 May 2006 16:26:52 -0000 1.18 +++ ewl_colorpicker.h 11 Aug 2006 07:50:23 -0000 1.19 @@ -65,6 +65,7 @@ Ewl_Color_Mode mode; /**< The current mode */ unsigned int has_alpha:1; /**< Does the picker deal with alpha values */ + unsigned int updating:1; /**< Are we currently updating the widget */ }; Ewl_Widget *ewl_colorpicker_new(void); ------------------------------------------------------------------------- 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