Fix running multiple instances of Browse by adapting to API changes #2404

* sugar/presence/presenceservice.py: Specify the D-Bus interface when
  calling ActivityProperties.GetActivity
* sugar/activity/main.py: Set a default for the --invite option and
  make the create() D-Bus method accept a{sv} so we can pass the
  boolean value.
This commit is contained in:
Tomeu Vizoso
2010-10-05 16:36:13 +02:00
parent 7dedaeb7bb
commit 4fb2943ec4
2 changed files with 9 additions and 4 deletions
+4 -3
View File
@@ -56,7 +56,7 @@ class SingleProcess(dbus.service.Object):
object_path = get_single_process_path(name_service)
dbus.service.Object.__init__(self, bus_name, object_path)
@dbus.service.method("org.laptop.SingleProcess", in_signature="a{ss}")
@dbus.service.method("org.laptop.SingleProcess", in_signature="a{sv}")
def create(self, handle_dict):
handle = activityhandle.create_from_dict(handle_dict)
create_activity_instance(self.constructor, handle)
@@ -76,7 +76,7 @@ def main():
action='store_true',
help='start all the instances in the same process')
parser.add_option('-i', '--invited', dest='invited',
action='store_true',
action='store_true', default=False,
help='the activity is being launched for handling an '
'invite from the network')
(options, args) = parser.parse_args()
@@ -146,7 +146,8 @@ def main():
SingleProcess(service_name, activity_constructor)
else:
single_process = sessionbus.get_object(service_name, service_path)
single_process.create(activity_handle.get_dict())
single_process.create(activity_handle.get_dict(),
dbus_interface='org.laptop.SingleProcess')
print 'Created %s in a single process.' % service_name
sys.exit(0)