From 1cb7700136e302ec0626f3f64f43248c8fb56a06 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 22 May 2007 14:49:28 +0200 Subject: [PATCH] Rename interface name to org.laptop --- sugar/activity/activityfactory.py | 4 +++- sugar/activity/activityfactoryservice.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sugar/activity/activityfactory.py b/sugar/activity/activityfactory.py index 3368b179..a78c474b 100644 --- a/sugar/activity/activityfactory.py +++ b/sugar/activity/activityfactory.py @@ -31,6 +31,8 @@ _ACTIVITY_SERVICE_NAME = "org.laptop.Activity" _ACTIVITY_SERVICE_PATH = "/org/laptop/Activity" _ACTIVITY_INTERFACE = "org.laptop.Activity" +_ACTIVITY_FACTORY_INTERFACE = "org.laptop.ActivityFactory" + def create_activity_id(): """Generate a new, unique ID for this activity""" pservice = presenceservice.get_instance() @@ -103,7 +105,7 @@ class ActivityCreationHandler(gobject.GObject): bus = dbus.SessionBus() proxy_obj = bus.get_object(service_name, bundle.get_object_path(), follow_name_owner_changes=True) - factory = dbus.Interface(proxy_obj, "com.redhat.Sugar.ActivityFactory") + factory = dbus.Interface(proxy_obj, _ACTIVITY_FACTORY_INTERFACE) factory.create(self._activity_handle.get_dict(), reply_handler=self._reply_handler, diff --git a/sugar/activity/activityfactoryservice.py b/sugar/activity/activityfactoryservice.py index 21e7d5b6..4f614234 100644 --- a/sugar/activity/activityfactoryservice.py +++ b/sugar/activity/activityfactoryservice.py @@ -34,6 +34,8 @@ from sugar import logger gobject.threads_init() dbus.glib.threads_init() +_ACTIVITY_FACTORY_INTERFACE = "org.laptop.ActivityFactory" + class ActivityFactoryService(dbus.service.Object): """D-Bus service that creates instances of Python activities @@ -92,7 +94,7 @@ class ActivityFactoryService(dbus.service.Object): object_path = '/' + service_name.replace('.', '/') dbus.service.Object.__init__(self, bus_name, object_path) - @dbus.service.method("com.redhat.Sugar.ActivityFactory", in_signature="a{ss}") + @dbus.service.method("org.laptop.ActivityFactory", in_signature="a{ss}") def create(self, handle): """Create a new instance of this activity