Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/activity
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-02-27 14:05:44 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-02-27 14:05:44 (GMT)
commite478de42247d41d4439af9d7fd4fac0321f063da (patch)
tree30552c49829481247dd519ca15eb464758c1dba4 /sugar/activity
parent2e2db562c5faa21e623707ebe84e5e504df540d0 (diff)
Use Window, add a compatibility hack to not break API
Diffstat (limited to 'sugar/activity')
-rw-r--r--sugar/activity/activity.py14
1 files changed, 11 insertions, 3 deletions
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']