def blink(self, event):
'''
@summary: Blinks the subheader text
'''
# Update the time remaining
time_remaining = self.get_time_remaining()
# Set message to blank
if self.set_message_to_null and time_remaining:
self.FlashingMessageText.SetLabelText("")
self.HeaderPanel.Layout() # Recenters the child widgets after text update (this works!)
self.set_message_to_null = False
# Set message to text
elif time_remaining:
self.FlashingMessageText.SetLabelText(self.GUI_LABEL_TEXT_FLASHING_ENCRYPTED[self.LANG])
self.HeaderPanel.Layout() # Recenters the child widgets after text update (this works!)
self.set_message_to_null = True
# If the key has been destroyed, update the menu text
if not time_remaining:
# Cleanup decrypter and change dialog message
self.decrypter.cleanup()
# Update main window
self.key_destruction_timer.Stop()
self.TimeRemainingTime.SetLabelText(self.GUI_LABEL_TEXT_TIME_BLANK[self.LANG])
self.FlashingMessageText.SetLabelText(self.GUI_LABEL_TEXT_FLASHING_DESTROYED[self.LANG])
self.FlashingMessageText.SetForegroundColour( wx.Colour(0, 0, 0) )
# Disable decryption button
self.EnterDecryptionKeyButton.Disable()
self.ViewEncryptedFilesButton.Disable()
self.HeaderPanel.Layout() # Recenters the child widgets after text update (this works!)
else:
self.TimeRemainingTime.SetLabelText(time_remaining)
评论列表
文章目录