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
+5 -1
View File
@@ -42,6 +42,8 @@ _logger = logging.getLogger('sugar.presence.presenceservice')
ACCOUNT_MANAGER_SERVICE = 'org.freedesktop.Telepathy.AccountManager'
ACCOUNT_MANAGER_PATH = '/org/freedesktop/Telepathy/AccountManager'
CONN_INTERFACE_ACTIVITY_PROPERTIES = 'org.laptop.Telepathy.ActivityProperties'
class PresenceService(gobject.GObject):
"""Provides simplified access to the Telepathy framework to activities"""
__gsignals__ = {
@@ -80,7 +82,9 @@ class PresenceService(gobject.GObject):
continue
logging.debug("Calling GetActivity on %s", account_path)
try:
room_handle = connection.connection.GetActivity(activity_id)
room_handle = connection.connection.GetActivity(
activity_id,
dbus_interface=CONN_INTERFACE_ACTIVITY_PROPERTIES)
except dbus.exceptions.DBusException, e:
name = 'org.freedesktop.Telepathy.Error.NotAvailable'
if e.get_dbus_name() == name: