In the File manager - make buttons like "Encrypt", "Decrypt"
etc. insensitive when they can't be used anyway. Like when no file is hightlighted. Same thing for the menus of course.
You're already doing this in the Keyring editor, with the
"Edit" option which is only available for secret keys.