예제 #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
예제 #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
예제 #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
예제 #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
예제 #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
예제 #6
0
 def stop(self):
     """Invoked when the Acquire process stops running."""
     BaseAcquireProgress.stop(self)
     statusMessage("### DOWNLOAD DONE ###")
예제 #7
0
 def start(self):
     AcquireProgress.start(self)
     self.emit("status-started")
예제 #8
0
 def stop(self):
     AcquireProgress.stop(self)
     self.emit("status-finished")
예제 #9
0
 def __init__(self):
     BaseAcquireProgress.__init__(self)
예제 #10
0
 def __init__(self):
     AcquireProgress.__init__(self)
     self._continue = True
     self._context = GLib.main_context_default()
     super(GAcquireProgress, self).__init__()
예제 #11
0
 def stop(self):
     """Invoked when the Acquire process stops running."""
     BaseAcquireProgress.stop(self)
     statusMessage("### DOWNLOAD DONE ###")
예제 #12
0
 def stop(self):
     BaseAcquireProgress.stop(self)
     statusMessage("### UPDATE DONE ###")
예제 #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
예제 #15
0
 def __init__(self, other):
     AcquireProgress.__init__(self)
     QtCore.QObject.__init__(self)
     self.other = other
예제 #16
0
 def start(self):
     """Invoked when the Acquire process starts running."""
     BaseAcquireProgress.start(self)
     statusMessage("### START DOWNLOAD ###")
예제 #17
0
 def __init__(self, sig):
     AcquireProgress.__init__(self)
     self.percent = 0.0
     self.a = ProgressBar()
     self.other = False
     self.sig = sig
예제 #18
0
 def start(self):
     BaseAcquireProgress.start(self)
     statusMessage("### START UPDATE ###")
예제 #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
예제 #21
0
 def __init__(self):
     BaseAcquireProgress.__init__(self)
예제 #22
0
 def __init__(self, cb=None):
     AcquireProgress.__init__(self)
     self._id = long(1)
     self.cb = cb
예제 #23
0
 def start(self):
     BaseAcquireProgress.start(self)
     statusMessage("### START UPDATE ###")
예제 #24
0
 def __init__(self, other):
     AcquireProgress.__init__(self)
     QtCore.QObject.__init__(self)
     self.other = other
예제 #25
0
 def start(self):
     """Invoked when the Acquire process starts running."""
     BaseAcquireProgress.start(self)
     statusMessage("### START DOWNLOAD ###")