code: def enable_file_approve(self, enable=True):
          
  
          approve_item = self.shortcut2menuitem[_("&Approve file")]
          approve_item.Enable(enable)
docs: Enables or disables menu item (for entering/leaving save mode)