[Pkg-sugar-commit] [sugar-toolkit] 36/118: Do not fail while displaying activity icon for bundles in Journal #1175

Jonas Smedegaard dr at jones.dk
Thu Apr 16 18:49:38 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag debian/0.84.10-1
in repository sugar-toolkit.

commit 326ecb245b6020d9508c17bee07761d6b9a1dc21
Author: Aleksey Lim <alsroot at member.fsf.org>
Date:   Fri Aug 14 07:17:39 2009 +0000

    Do not fail while displaying activity icon for bundles in Journal #1175
---
 src/sugar/graphics/icon.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/sugar/graphics/icon.py b/src/sugar/graphics/icon.py
index 6e88f88..57c53f5 100644
--- a/src/sugar/graphics/icon.py
+++ b/src/sugar/graphics/icon.py
@@ -314,9 +314,21 @@ class Icon(gtk.Image):
 
     def __init__(self, **kwargs):
         self._buffer = _IconBuffer()
+        self._file = None
 
         gobject.GObject.__init__(self, **kwargs)
 
+    def get_file(self):
+        return self._file
+
+    def set_file(self, file_name):
+        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):
         if self._buffer.icon_name != self.props.icon_name:
             self._buffer.icon_name = self.props.icon_name

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-sugar/sugar-toolkit.git



More information about the pkg-sugar-commit mailing list