From c89de594d37e33cb484e3ced73ee1ffbb0c81851 Mon Sep 17 00:00:00 2001 From: Bert Freudenberg Date: Wed, 23 May 2007 18:38:22 +0200 Subject: [PATCH] Use proper "org.laptop.Activity" interface when talking to activities --- shell/model/homemodel.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/shell/model/homemodel.py b/shell/model/homemodel.py index 39885ed2..92afc23f 100644 --- a/shell/model/homemodel.py +++ b/shell/model/homemodel.py @@ -26,6 +26,7 @@ from sugar.activity import bundleregistry _SERVICE_NAME = "org.laptop.Activity" _SERVICE_PATH = "/org/laptop/Activity" +_SERVICE_INTERFACE = "org.laptop.Activity" class HomeModel(gobject.GObject): """Model of the "Home" view (activity management) @@ -196,8 +197,11 @@ class HomeModel(gobject.GObject): bus = dbus.SessionBus() xid = window.get_xid() try: - service = bus.get_object(_SERVICE_NAME + '%d' % xid, - _SERVICE_PATH + "/%s" % xid) + service = dbus.Interface( + bus.get_object(_SERVICE_NAME + '%d' % xid, + _SERVICE_PATH + "/%s" % xid), + _SERVICE_INTERFACE) + except dbus.DBusException: service = None