Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2007-08-26 17:00:08 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2007-08-26 17:00:08 (GMT)
commit5b1db87cec9b159ffad84a465b871b27b75fad82 (patch)
tree93189858e82341c76638312a7f2225a30c149c05
parentbe99aa6dcf91aa5daedd3d7067f3b3ece02256f8 (diff)
Add some warnings to the new icon stuff.
-rw-r--r--sugar/graphics/icon.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/sugar/graphics/icon.py b/sugar/graphics/icon.py
index cee7dec..f4b466c 100644
--- a/sugar/graphics/icon.py
+++ b/sugar/graphics/icon.py
@@ -182,6 +182,8 @@ class _IconBuffer(object):
icon_info.file_name = info.get_filename()
icon_info.attach_x = attach_x
icon_info.attach_y = attach_y
+ else:
+ logging.warning('No icon with the name %s was found in the theme.' % self.icon_name)
return icon_info
@@ -413,9 +415,13 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem):
self.props.fill_color = value.get_fill_color()
self.props.stroke_color = value.get_stroke_color()
elif pspec.name == 'fill-color':
+ if not isinstance(value, str):
+ raise TypeError('fill-color must be a string')
self._buffer.fill_color = value
self.emit_paint_needed(0, 0, -1, -1)
elif pspec.name == 'stroke-color':
+ if not isinstance(value, str):
+ raise TypeError('stroke-color must be a string')
self._buffer.stroke_color = value
self.emit_paint_needed(0, 0, -1, -1)
elif pspec.name == 'size':