packagekitd.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:x-mario-center 作者: fossasia 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号