From 3bf70d642c0015ff50655d106026169893aaffbd Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Mon, 8 Mar 2010 10:55:07 +0000 Subject: [PATCH] Override canvas property in Activity class #1795 --- src/sugar/activity/activity.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sugar/activity/activity.py b/src/sugar/activity/activity.py index d4892d04..ec12dca6 100644 --- a/src/sugar/activity/activity.py +++ b/src/sugar/activity/activity.py @@ -393,6 +393,9 @@ class Activity(Window, gtk.Container): """Returns the bundle_id from the activity.info file""" return os.environ['SUGAR_BUNDLE_ID'] + def get_canvas(self): + return Window.get_canvas(self) + def set_canvas(self, canvas): """Sets the 'work area' of your activity with the canvas of your choice. @@ -403,6 +406,8 @@ class Activity(Window, gtk.Container): if not self._read_file_called: canvas.connect('map', self.__canvas_map_cb) + canvas = property(get_canvas, set_canvas) + def __screen_size_changed_cb(self, screen): self._adapt_window_to_screen()