[Sugar-devel] [PATCH] fix two trivial shell.log warnings

Sascha Silbe sascha-ml-ui-sugar-devel at silbe.org
Thu May 13 15:07:53 EDT 2010


On Mon, May 10, 2010 at 03:06:14PM +1000, James Cameron wrote:

>      def _get_size(self, icon_width, icon_height, padding):
>          if self.width is not None and self.height is not None:
> -            width = self.width + padding
> -            height = self.height + padding
> +            width = int(self.width) + padding
> +            height = int(self.height) + padding
I meant to dig into this myself, but don't have time to do it anymore, 
so I'll just ask you: AFAICT these are all supposed to be on-screen 
coordinates, which are by definition integers. So how come they are 
actually floats (sometimes)? What fills them in (the class itself 
doesn't)?
Doing the conversion here feels like patching over the symptom instead 
of fixing the root cause.

CU Sascha

-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
Url : http://lists.sugarlabs.org/archive/sugar-devel/attachments/20100513/47216038/attachment.pgp 


More information about the Sugar-devel mailing list