Override canvas property in Activity class #1795

This commit is contained in:
Aleksey Lim 2010-03-08 10:55:07 +00:00
parent 67af1cb77d
commit 3bf70d642c

View File

@ -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()