diff --git a/sugar/activity/activity.py b/sugar/activity/activity.py index ca2d12fd..e170df6d 100644 --- a/sugar/activity/activity.py +++ b/sugar/activity/activity.py @@ -19,15 +19,17 @@ import logging import os import gtk +import hippo from sugar.presence import PresenceService from sugar.activity.activityservice import ActivityService +from sugar.graphics.window import Window -class Activity(gtk.Window): +class Activity(Window, gtk.Container): """Base Activity class that all other Activities derive from.""" - + __gtype_name__ = 'SugarActivity' def __init__(self, handle): - gtk.Window.__init__(self) + Window.__init__(self) self.connect('destroy', self._destroy_cb) @@ -47,6 +49,12 @@ class Activity(gtk.Window): self._bus = ActivityService(self) + # DEPRECATED It will be removed after 3-6-2007 stable image + def do_add(self, widget): + if self.child: + self.remove(self.child) + gtk.Window.do_add(self, widget) + def get_service_name(self): """Gets the activity service name.""" return os.environ['SUGAR_BUNDLE_SERVICE_NAME']