Do not fail while displaying activity icon for bundles in Journal #1175
This commit is contained in:
parent
40e9bd3ce5
commit
a8ecc1729f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user