Ejemplo n.º 1
0
 def update_interface(self):
     InstallProgress.update_interface(self)
     while Gtk.events_pending():
         Gtk.main_iteration()
     if (not self.term_expander.get_expanded() and
         (self.time_last_update + GDEBI_TERMINAL_TIMEOUT) < time.time()):
       self.term_expander.set_expanded(True)
     # sleep just long enough to not create a busy loop
     time.sleep(0.01)
Ejemplo n.º 2
0
 def update_interface(self):
     InstallProgress.update_interface(self)
     while Gtk.events_pending():
         Gtk.main_iteration()
     if (not self.term_expander.get_expanded() and
         (self.time_last_update + GDEBI_TERMINAL_TIMEOUT) < time.time()):
       self.term_expander.set_expanded(True)
     # sleep just long enough to not create a busy loop
     time.sleep(0.01)
Ejemplo n.º 3
0
    def update_interface(self):
        """Called periodically to update the interface.

        Emits: status-timeout() [When a timeout happens]
        """
        InstallProgress.update_interface(self)
        while self._context.pending():
            self._context.iteration()
        if self.time_last_update + self.INSTALL_TIMEOUT < time.time():
            self.emit("status-timeout")
Ejemplo n.º 4
0
 def update_interface(self):
     # run the base class
     try:
         InstallProgress.update_interface(self)
     except ValueError as e:
         pass
     # log the output of dpkg (on the master_fd) to the DumbTerminal
     while True:
         try:
             (rlist, wlist, xlist) = select.select([self.master_fd],[],[], 0.01)
             # data available, read it
             if len(rlist) > 0:
                 line = os.read(self.master_fd, 255)
                 self.parent.konsole.insertWithTermCodes(utf8(line))
             else:
                 # nothing happend within the timeout, break
                 break
         except Exception as e:
             logging.debug("update_interface: %s" % e)
             break
     KApplication.kApplication().processEvents()
Ejemplo n.º 5
0
 def update_interface(self):
     # run the base class
     try:
         InstallProgress.update_interface(self)
     except ValueError as e:
         pass
     # log the output of dpkg (on the master_fd) to the DumbTerminal
     while True:
         try:
             (rlist, wlist, xlist) = select.select([self.master_fd], [], [],
                                                   0.01)
             # data available, read it
             if len(rlist) > 0:
                 line = os.read(self.master_fd, 255)
                 self.parent.konsole.insertWithTermCodes(utf8(line))
             else:
                 # nothing happend within the timeout, break
                 break
         except Exception as e:
             logging.debug("update_interface: %s" % e)
             break
     KApplication.kApplication().processEvents()