pylint icon, a few false positive left

This commit is contained in:
Marco Pesenti Gritti 2008-04-19 00:37:19 +02:00
parent 03e515b463
commit 97d9d21311

View File

@ -15,10 +15,8 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
import os
import re
import math
import time
import logging
import gobject
@ -26,9 +24,7 @@ import gtk
import hippo
import cairo
from sugar.graphics.style import Color
from sugar.graphics.xocolor import XoColor
from sugar.graphics import style
from sugar.graphics.palette import Palette, CanvasInvoker
from sugar.util import LRU
@ -79,6 +75,7 @@ class _IconBuffer(object):
def __init__(self):
self.icon_name = None
self.icon_size = None
self.file_name = None
self.fill_color = None
self.stroke_color = None
@ -362,10 +359,11 @@ class Icon(gtk.Image):
if self.get_direction() != gtk.TEXT_DIR_LTR:
xalign = 1.0 - xalign
x = math.floor(self.allocation.x + xpad +
(self.allocation.width - requisition[0]) * xalign)
y = math.floor(self.allocation.y + ypad +
(self.allocation.height - requisition[1]) * yalign)
allocation = self.get_allocation()
x = math.floor(allocation.x + xpad +
(allocation.width - requisition[0]) * xalign)
y = math.floor(allocation.y + ypad +
(allocation.height - requisition[1]) * yalign)
cr = self.window.cairo_create()
cr.set_source_surface(surface, x, y)
@ -464,7 +462,8 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem):
self._buffer.height = value
self.emit_request_changed()
elif pspec.name == 'scale':
logging.warning('CanvasIcon: the scale parameter is currently unsupported')
logging.warning(
'CanvasIcon: the scale parameter is currently unsupported')
if self._buffer.scale != value:
self._buffer.scale = value
self.emit_request_changed()