jp (base): fixed CommandAnswering and progress bar
This commit is contained in:
parent
fa1680a119
commit
3c79544cc4
1 changed files with 9 additions and 9 deletions
|
|
@ -719,14 +719,14 @@ class CommandBase(object):
|
||||||
return False
|
return False
|
||||||
if self.host.pbar is None:
|
if self.host.pbar is None:
|
||||||
#first answer, we must construct the bar
|
#first answer, we must construct the bar
|
||||||
self.host.pbar = progressbar.ProgressBar(int(size),
|
self.host.pbar = progressbar.ProgressBar(max_value=int(size),
|
||||||
[_(u"Progress: "),progressbar.Percentage(),
|
widgets=[_(u"Progress: "),progressbar.Percentage(),
|
||||||
" ",
|
" ",
|
||||||
progressbar.Bar(),
|
progressbar.Bar(),
|
||||||
" ",
|
" ",
|
||||||
progressbar.FileTransferSpeed(),
|
progressbar.FileTransferSpeed(),
|
||||||
" ",
|
" ",
|
||||||
progressbar.ETA()])
|
progressbar.ETA()])
|
||||||
self.host.pbar.start()
|
self.host.pbar.start()
|
||||||
|
|
||||||
self.host.pbar.update(int(data['position']))
|
self.host.pbar.update(int(data['position']))
|
||||||
|
|
@ -901,7 +901,7 @@ class CommandAnswering(CommandBase):
|
||||||
"""Auto reply to confirmations requests"""
|
"""Auto reply to confirmations requests"""
|
||||||
self.need_loop = True
|
self.need_loop = True
|
||||||
super(CommandAnswering, self).connected()
|
super(CommandAnswering, self).connected()
|
||||||
self.host.bridge.register("actionNew", self.onActionNew)
|
self.host.bridge.register_signal("actionNew", self.onActionNew)
|
||||||
actions = self.host.bridge.actionsGet(self.profile)
|
actions = self.host.bridge.actionsGet(self.profile)
|
||||||
for action_data, action_id, security_limit in actions:
|
for action_data, action_id, security_limit in actions:
|
||||||
self.onActionNew(action_data, action_id, security_limit, self.profile)
|
self.onActionNew(action_data, action_id, security_limit, self.profile)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue