diff --git a/shell/view/Shell.py b/shell/view/Shell.py index 777c10c4..697dc1c8 100644 --- a/shell/view/Shell.py +++ b/shell/view/Shell.py @@ -209,8 +209,8 @@ class Shell(gobject.GObject): jobject.file_path = file_path datastore.write(jobject) finally: - datastore.destroy() - del datastore + jobject.destroy() + del jobject finally: os.remove(file_path) diff --git a/sugar/graphics/objectchooser.py b/sugar/graphics/objectchooser.py index 0d42a7af..aea83156 100644 --- a/sugar/graphics/objectchooser.py +++ b/sugar/graphics/objectchooser.py @@ -116,8 +116,11 @@ class CollapsedEntry(Frame): self.append(date) icon = CanvasIcon(icon_name=self._get_icon_name(), - xo_color=XoColor(self.jobject.metadata['icon-color']), box_width=units.grid_to_pixels(1)) + + if self.jobject.metadata.has_key('icon-color'): + icon.props.xo_color = XoColor(self.jobject.metadata['icon-color']) + self.append(icon) title = hippo.CanvasText(text=self._format_title(),