Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2010-03-08 10:55:07 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2010-03-08 19:01:53 (GMT)
commit3bf70d642c0015ff50655d106026169893aaffbd (patch)
tree7a9ceaa78ff9ab672e9f320055e9a15e020ba560
parent67af1cb77d56bd327b1710f3751fd3da115fe6d4 (diff)
Override canvas property in Activity class #1795
-rw-r--r--src/sugar/activity/activity.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sugar/activity/activity.py b/src/sugar/activity/activity.py
index d4892d0..ec12dca 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()