# HG changeset patch # User Goffi # Date 1506853283 -7200 # Node ID 3865a772c360b7a42a05c3ed386f93891dbf3f6f # Parent 9878635586f3cbeed83e8b1ef445d339fcbabd8d jp (base): fixed CommandAnswering and progress bar diff -r 9878635586f3 -r 3865a772c360 frontends/src/jp/base.py --- a/frontends/src/jp/base.py Sun Oct 01 12:21:23 2017 +0200 +++ b/frontends/src/jp/base.py Sun Oct 01 12:21:23 2017 +0200 @@ -719,14 +719,14 @@ return False if self.host.pbar is None: #first answer, we must construct the bar - self.host.pbar = progressbar.ProgressBar(int(size), - [_(u"Progress: "),progressbar.Percentage(), - " ", - progressbar.Bar(), - " ", - progressbar.FileTransferSpeed(), - " ", - progressbar.ETA()]) + self.host.pbar = progressbar.ProgressBar(max_value=int(size), + widgets=[_(u"Progress: "),progressbar.Percentage(), + " ", + progressbar.Bar(), + " ", + progressbar.FileTransferSpeed(), + " ", + progressbar.ETA()]) self.host.pbar.start() self.host.pbar.update(int(data['position'])) @@ -901,7 +901,7 @@ """Auto reply to confirmations requests""" self.need_loop = True 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) for action_data, action_id, security_limit in actions: self.onActionNew(action_data, action_id, security_limit, self.profile)