Edit 2025-02-14:
This ticket was originally named "Kleopatra: give warning if file will only be encrypted to self".
It morphed to "Don't use Checkboxes to configure signing and encryption in SignEncryptWidget" in the corse of discussion, see below.
Original text:
It seems to be a recurring error that a message is not encrypted to the intended recipient, who then gets the error "no secret key" when trying to decrypt it.
To avoid that there should be a warning if the check box before "encrypt to others" is checked, but no recipient is given. Or encryption should not be possible and the button for it greyed out.
I'd prefer the former, as otherwise people might wonder why they can not click the button.
I suggest a dialog box with "Please add a recipient" and then after acknowledging this the cursor should blink in the appropriate field.