[Sugar-devel] [PATCH Sugar-toolkit-gtk3] ActivityButton should handle the case of activities without metadata
godiard at sugarlabs.org
godiard at sugarlabs.org
Mon May 14 13:26:54 EDT 2012
From: Gonzalo Odiard <godiard at gmail.com>
Signed-off-by: Gonzalo Odiard <gonzalo at laptop.org>
---
src/sugar3/activity/widgets.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/sugar3/activity/widgets.py b/src/sugar3/activity/widgets.py
index 97450f2..e2b7728 100644
--- a/src/sugar3/activity/widgets.py
+++ b/src/sugar3/activity/widgets.py
@@ -60,7 +60,8 @@ class ActivityButton(ToolButton):
self.set_icon_widget(icon)
icon.show()
- self.props.tooltip = activity.metadata['title']
+ if activity.metadata:
+ self.props.tooltip = activity.metadata['title']
activity.metadata.connect('updated', self.__jobject_updated_cb)
def __jobject_updated_cb(self, jobject):
--
1.7.10.1
More information about the Sugar-devel
mailing list