From 3f9761469c4b78f5d7d2a397f2e824f89e4c1215 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Mon, 17 Aug 2009 19:21:17 +0200 Subject: [PATCH] Mention TempFilePath in the comment --- src/sugar/graphics/icon.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sugar/graphics/icon.py b/src/sugar/graphics/icon.py index 2f48717a..27907751 100644 --- a/src/sugar/graphics/icon.py +++ b/src/sugar/graphics/icon.py @@ -314,6 +314,9 @@ class Icon(gtk.Image): def __init__(self, **kwargs): self._buffer = _IconBuffer() + # HACK: need to keep a reference to the path so it doesn't get garbage + # collected while it's still used if it's a sugar.util.TempFilePath. + # See #1175 self._file = None gobject.GObject.__init__(self, **kwargs) @@ -325,8 +328,6 @@ class Icon(gtk.Image): self._file = file_name self._buffer.file_name = file_name - # XXX we need to override file property to support auto_ptr objects - # that used to represent temporaly unzipped icons from bundles, see #1175 file = gobject.property(type=object, setter=set_file, getter=get_file) def _sync_image_properties(self):