Ejemplo n.º 1
0
 def pulse(self, owner):
     BaseAcquireProgress.pulse(self, owner)
     statusMessage(
         "PULSE items:%d/%d bytes:%.1f/%.1f rate:%.1f elapsed:%d" %
         (self.current_items, self.total_items, self.current_bytes,
          self.total_bytes, self.current_cps, self.elapsed_time))
     return True  # False to cancel the job
Ejemplo n.º 2
0
 def pulse(self, owner):
     BaseAcquireProgress.pulse(self, owner)
     statusMessage("PULSE items:%d/%d bytes:%.1f/%.1f rate:%.1f elapsed:%d" % (
           self.current_items, self.total_items, 
           self.current_bytes, self.total_bytes,
           self.current_cps, self.elapsed_time))
     return True # False to cancel the job
Ejemplo n.º 3
0
 def pulse(self, owner):
     """Periodically invoked while the Acquire process is underway."""
     BaseAcquireProgress.stop(self, owner)
     statusMessage("PULSE  items:%d/%d  bytes:%.1f/%.1f  rate:%.1f  elapsed:%d" % (
           self.current_items, self.total_items, 
           self.current_bytes, self.total_bytes,
           self.current_cps, self.elapsed_time))
     return True # False to cancel the job
Ejemplo n.º 4
0
 def pulse(self, owner):
     """Periodically invoked while the Acquire process is underway."""
     BaseAcquireProgress.stop(self, owner)
     statusMessage(
         "PULSE  items:%d/%d  bytes:%.1f/%.1f  rate:%.1f  elapsed:%d" %
         (self.current_items, self.total_items, self.current_bytes,
          self.total_bytes, self.current_cps, self.elapsed_time))
     return True  # False to cancel the job
Ejemplo n.º 5
0
    def pulse(self, owner):
        AcquireProgress.pulse(self, owner)
        current_item = self.current_items + 1
        if current_item > self.total_items:
            current_item = self.total_items
        if self.current_cps > 0:
            text = (_("Downloading file %(current)li of %(total)li with "
                      "%(speed)s/s") % {
                          "current": current_item,
                          "total": self.total_items,
                          "speed": apt_pkg.size_to_str(self.current_cps)
                      })
        else:
            text = (_("Downloading file %(current)li of %(total)li") % {
                "current": current_item,
                "total": self.total_items
            })

        percent = (((self.current_bytes + self.current_items) * 100.0) /
                   float(self.total_bytes + self.total_items))
        self.emit("status-changed", text, percent)
        while self._context.pending():
            self._context.iteration()
        return self._continue
Ejemplo n.º 6
0
 def stop(self):
     """Invoked when the Acquire process stops running."""
     BaseAcquireProgress.stop(self)
     statusMessage("### DOWNLOAD DONE ###")
Ejemplo n.º 7
0
 def start(self):
     AcquireProgress.start(self)
     self.emit("status-started")
Ejemplo n.º 8
0
 def stop(self):
     AcquireProgress.stop(self)
     self.emit("status-finished")
Ejemplo n.º 9
0
 def __init__(self):
     BaseAcquireProgress.__init__(self)
Ejemplo n.º 10
0
 def __init__(self):
     AcquireProgress.__init__(self)
     self._continue = True
     self._context = GLib.main_context_default()
     super(GAcquireProgress, self).__init__()
Ejemplo n.º 11
0
 def stop(self):
     """Invoked when the Acquire process stops running."""
     BaseAcquireProgress.stop(self)
     statusMessage("### DOWNLOAD DONE ###")
Ejemplo n.º 12
0
 def stop(self):
     BaseAcquireProgress.stop(self)
     statusMessage("### UPDATE DONE ###")
Ejemplo n.º 13
0
 def __init__(self, cb=None):
     AcquireProgress.__init__(self)
     self._id = long(1)
     self.cb = cb
 def __init__(self, pbar, status_label):
     AcquireProgress.__init__(self)
     self.pbar = pbar
     self.status_label = status_label
     self.percent = 0.0
Ejemplo n.º 15
0
 def __init__(self, other):
     AcquireProgress.__init__(self)
     QtCore.QObject.__init__(self)
     self.other = other
Ejemplo n.º 16
0
 def start(self):
     """Invoked when the Acquire process starts running."""
     BaseAcquireProgress.start(self)
     statusMessage("### START DOWNLOAD ###")
Ejemplo n.º 17
0
 def __init__(self, sig):
     AcquireProgress.__init__(self)
     self.percent = 0.0
     self.a = ProgressBar()
     self.other = False
     self.sig = sig
Ejemplo n.º 18
0
 def start(self):
     BaseAcquireProgress.start(self)
     statusMessage("### START UPDATE ###")
Ejemplo n.º 19
0
 def stop(self):
     BaseAcquireProgress.stop(self)
     statusMessage("### UPDATE DONE ###")
 def __init__(self, pbar, status_label):
     AcquireProgress.__init__(self)
     self.pbar = pbar
     self.status_label = status_label
     self.percent = 0.0
Ejemplo n.º 21
0
 def __init__(self):
     BaseAcquireProgress.__init__(self)
Ejemplo n.º 22
0
 def __init__(self, cb=None):
     AcquireProgress.__init__(self)
     self._id = long(1)
     self.cb = cb
Ejemplo n.º 23
0
 def start(self):
     BaseAcquireProgress.start(self)
     statusMessage("### START UPDATE ###")
Ejemplo n.º 24
0
 def __init__(self, other):
     AcquireProgress.__init__(self)
     QtCore.QObject.__init__(self)
     self.other = other
Ejemplo n.º 25
0
 def start(self):
     """Invoked when the Acquire process starts running."""
     BaseAcquireProgress.start(self)
     statusMessage("### START DOWNLOAD ###")