Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar
This commit is contained in:
@@ -114,7 +114,7 @@ class ActivityCreationHandler(gobject.GObject):
|
||||
|
||||
self._factory.create(self._activity_handle.get_dict(),
|
||||
timeout=120 * 1000,
|
||||
reply_handler=self._create_reply_handler,
|
||||
reply_handler=self._no_reply_handler,
|
||||
error_handler=self._create_error_handler)
|
||||
|
||||
def get_activity_id(self):
|
||||
@@ -137,10 +137,7 @@ class ActivityCreationHandler(gobject.GObject):
|
||||
def _activate_error_handler(self, err):
|
||||
logging.debug("Activity activation request failed %s" % err)
|
||||
|
||||
def _create_reply_handler(self, xid=None):
|
||||
if xid is None:
|
||||
self._create_error_handler('D-Bus error')
|
||||
return
|
||||
def _create_reply_handler(self, xid):
|
||||
logging.debug("Activity created %s (%s)." %
|
||||
(self._activity_handle.activity_id, self._service_name))
|
||||
|
||||
|
||||
@@ -49,8 +49,14 @@ class ActivityRegistry(gobject.GObject):
|
||||
gobject.GObject.__init__(self)
|
||||
|
||||
bus = dbus.SessionBus()
|
||||
|
||||
# FIXME: Is follow_name_owner_changes what we really want?
|
||||
# It speeds up the start time by about 2 seconds
|
||||
# but is really a side effect of starting a proxy
|
||||
# in this state (i.e. we don't block in the constructor)
|
||||
bus_object = bus.get_object(_ACTIVITY_REGISTRY_SERVICE_NAME,
|
||||
_ACTIVITY_REGISTRY_PATH)
|
||||
_ACTIVITY_REGISTRY_PATH,
|
||||
follow_name_owner_changes = True)
|
||||
self._registry = dbus.Interface(bus_object, _ACTIVITY_REGISTRY_IFACE)
|
||||
self._registry.connect_to_signal('ActivityAdded', self._activity_added_cb)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user