From e478de42247d41d4439af9d7fd4fac0321f063da Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 27 Feb 2007 14:05:44 +0000 Subject: Use Window, add a compatibility hack to not break API --- (limited to 'sugar/activity') diff --git a/sugar/activity/activity.py b/sugar/activity/activity.py index ca2d12f..e170df6 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'] -- cgit v0.9.1