Exemple #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()
Exemple #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
Exemple #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