修改下载信息的接口
This commit is contained in:
parent
6992a1950c
commit
6c2b4b2589
|
@ -420,9 +420,10 @@ class UpdateManagerDbusController(dbus.service.Object):
|
|||
success,upgrade_group, error_string,error_desc)
|
||||
|
||||
#发送下载包信息 fix bug 字节大小改成u 无符号32位
|
||||
@dbus.service.signal(UPDATER_DBUS_INTERFACE, signature='iiuui')
|
||||
def UpdateDownloadInfo(self, current_items, total_items, currenty_bytes, total_bytes, current_cps):
|
||||
logging.info(COLORLOG_PREFIX + "emit" + COLORLOG_SUFFIX +" UpdateDownloadInfo current_items = %d, total_items = %d, currenty_bytes = %s, total_bytes = %s, current_cps = %s/s",\
|
||||
@dbus.service.signal(UPDATER_DBUS_INTERFACE, signature='asiiuui')
|
||||
def UpdateDownloadInfo(self,upgrade_group,current_items, total_items, currenty_bytes, total_bytes, current_cps):
|
||||
logging.info(COLORLOG_PREFIX + "emit" + COLORLOG_SUFFIX +" UpdateDownloadInfo upgrade_group = %a,current_items = %d, total_items = %d, currenty_bytes = %s, total_bytes = %s, current_cps = %s/s",\
|
||||
upgrade_group,\
|
||||
current_items, total_items, \
|
||||
humanize_size(currenty_bytes), humanize_size(total_bytes),\
|
||||
humanize_size(current_cps))
|
||||
|
|
|
@ -284,6 +284,7 @@ class InstallBackendAptdaemon(InstallBackend):
|
|||
def _on_progress_download_changed(self,trans,current_items, total_items, currenty_bytes, total_bytes, current_cps, eta):
|
||||
if self.action == self.ACTION_INSTALL:
|
||||
self.window_main.dbusController.UpdateDownloadInfo(\
|
||||
self.now_upgrade.upgrade_groups+self.now_upgrade.single_pkgs,\
|
||||
current_items, total_items, \
|
||||
currenty_bytes, total_bytes, \
|
||||
current_cps)
|
||||
|
|
Loading…
Reference in New Issue