Ejemplo n.º 1
0
 def update(self):
     if self.timeout > 0:
         self.timeout -= 1
         self.setInformativeText(_("Shutting in") + " {0}".format(self.timeout))
     else:
         shutdown = Shutdown()
         if shutdown.start_shutting():
             events.trigger_quit()
Ejemplo n.º 2
0
 def check_timeout(self):
     if self.cancel:
         return False
     elif self.timeout > 0:
         self.timeout -= 1
         self.label.set_text(_("Shutting in") + " {0}".format(self.timeout))
         return True
     else:
         shutdown = Shutdown()
         if shutdown.start_shutting():
             #self.quit()
             events.trigger_quit()
         return False
Ejemplo n.º 3
0
 def check_timeout(self):
     if self.cancel:
         return False
     elif self.timeout > 0:
         self.timeout -= 1
         self.label.set_text(_("Shutting in") + " {0}".format(self.timeout))
         return True
     else:
         shutdown = Shutdown()
         if shutdown.start_shutting():
             #self.quit()
             events.trigger_quit()
         return False