def _setup_signals(self):
""" Connect signals to the PkProgress from libpackagekitlib,
because PK DBus exposes only a generic Changed, without
specifying the property changed
"""
self._trans.connect('notify::role', self._emit,
'role-changed', 'role')
self._trans.connect('notify::status', self._emit,
'status-changed', 'status')
self._trans.connect('notify::percentage', self._emit,
'progress-changed', 'percentage')
# SC UI does not support subprogress:
#self._trans.connect('notify::subpercentage', self._emit,
# 'progress-changed', 'subpercentage')
self._trans.connect('notify::percentage', self._emit,
'progress-changed', 'percentage')
self._trans.connect('notify::allow-cancel', self._emit,
'cancellable-changed', 'allow-cancel')
# connect the delete:
proxy = dbus.SystemBus().get_object('org.freedesktop.PackageKit',
self.tid)
trans = dbus.Interface(proxy, 'org.freedesktop.PackageKit.Transaction')
trans.connect_to_signal("Destroy", self._remove)
评论列表
文章目录