code: def OnSafeModeEntry(self, event):
          
  
          # Enable menu item for leaving safe mode
  
          self.main_window.main_menu.enable_file_approve(True)
  
          self.main_window.grid.Refresh()
  
          event.Skip()
docs: Safe mode entry event handler