Enlightenment CVS committal Author : ningerso Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_image.c Log Message: Reset image preferred size when removing a constrain size. Fix warning on pointer type passed to ewl_callback_call. =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_image.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -3 -r1.48 -r1.49 --- ewl_image.c 8 Oct 2006 17:26:22 -0000 1.48 +++ ewl_image.c 9 Oct 2006 06:21:17 -0000 1.49 @@ -234,10 +234,13 @@ void ewl_image_constrain_set(Ewl_Image *i, unsigned int size) { + unsigned int osize; + DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("i", i); DCHECK_TYPE("i", i, EWL_IMAGE_TYPE); + osize = i->cs; i->cs = size; if (size) { ewl_object_preferred_inner_w_set(EWL_OBJECT(i), size); @@ -249,6 +252,12 @@ else if (i->aw != i->ow || i->ah != i->oh) { ewl_image_size_set(i, i->aw, i->ah); } + else { + if (ewl_object_preferred_inner_w_get(EWL_OBJECT(i)) == osize) + ewl_object_preferred_inner_w_set(EWL_OBJECT(i), i->ow); + if (ewl_object_preferred_inner_h_get(EWL_OBJECT(i)) == osize) + ewl_object_preferred_inner_h_set(EWL_OBJECT(i), i->oh); + } DLEAVE_FUNCTION(DLEVEL_STABLE); } @@ -611,7 +620,8 @@ if (ev->dest) { ewl_image_file_path_set(EWL_IMAGE(thumb), ev->dest); - ewl_callback_call(thumb, EWL_CALLBACK_VALUE_CHANGED); + ewl_callback_call(EWL_WIDGET(thumb), + EWL_CALLBACK_VALUE_CHANGED); } thumb->thumb = NULL; ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs