diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-08-09 16:29:33 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-08-09 16:29:33 (GMT) |
commit | 0dcaf314f7933a6852bd45ea1d6705bfb5659443 (patch) | |
tree | 96cf6753b900524c06146bfede49005206edb76e /shell/ActivityHost.py | |
parent | 95d9b7fe8e7cbde413ef5f937cc1dda2b7fa8813 (diff) |
Several fixes and cleanups
Diffstat (limited to 'shell/ActivityHost.py')
-rw-r--r-- | shell/ActivityHost.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/shell/ActivityHost.py b/shell/ActivityHost.py index f2287c4..c5c0335 100644 --- a/shell/ActivityHost.py +++ b/shell/ActivityHost.py @@ -5,18 +5,19 @@ from sugar.activity import Activity from PeopleWindow import PeopleWindow class ActivityHost: - def __init__(self, shell, xid): + def __init__(self, shell, window): self._shell = shell - self._xid = xid - + + xid = window.get_xid() + bus = dbus.SessionBus() - path = Activity.ACTIVITY_SERVICE_PATH + "/%s" % xid - proxy_obj = bus.get_object(Activity.ACTIVITY_SERVICE_NAME, path) + proxy_obj = bus.get_object(Activity.get_service_name(xid), + Activity.get_object_path(xid)) self._activity = dbus.Interface(proxy_obj, Activity.ACTIVITY_INTERFACE) self._id = self._activity.get_id() self._default_type = self._activity.get_default_type() - self._window = gtk.gdk.window_foreign_new(xid) + self._window = gtk.gdk.window_foreign_new(window.get_xid()) self._people_window = PeopleWindow(shell, self) def get_id(self): |