示例#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()
 def update_(self):
     if self.timeout > 0:
         self.timeout -= 1
         self.setInformativeText("{} {}".format(_("Shutting in"), self.timeout))
     else:
         shutdown = Shutdown()
         if shutdown.start_shutting():
             events.quit.emit()
         self.timer.stop()
示例#3
0
 def update_(self):
     if self.timeout > 0:
         self.timeout -= 1
         self.setInformativeText("{} {}".format(_("Shutting in"),
                                                self.timeout))
     else:
         shutdown = Shutdown()
         if shutdown.start_shutting():
             events.quit.emit()
         self.timer.stop()
示例#4
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
示例#5
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