Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Kleopatra
Commits
76543bec
Commit
76543bec
authored
Aug 16, 2021
by
Ingo Klöcker
Browse files
Enable "Encrypt with password" if keyring is empty
GnuPG-bug-id: 5545
parent
81bb8ed2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/crypto/gui/signencryptwidget.cpp
View file @
76543bec
...
...
@@ -567,10 +567,20 @@ void SignEncryptWidget::setSigningChecked(bool value)
mSigChk
->
setChecked
(
value
);
}
void
SignEncryptWidget
::
setEncryptionChecked
(
bool
value
)
void
SignEncryptWidget
::
setEncryptionChecked
(
bool
checked
)
{
mEncSelfChk
->
setChecked
(
value
);
mEncOtherChk
->
setChecked
(
value
);
if
(
checked
)
{
const
bool
haveOwnKeys
=
!
KeyCache
::
instance
()
->
secretKeys
().
empty
();
const
bool
haveOtherKeys
=
!
KeyCache
::
instance
()
->
keys
().
empty
();
const
bool
haveKeys
=
haveOwnKeys
&&
haveOtherKeys
;
mEncSelfChk
->
setChecked
(
haveKeys
);
mEncOtherChk
->
setChecked
(
haveKeys
);
mSymmetric
->
setChecked
(
!
haveKeys
);
}
else
{
mEncSelfChk
->
setChecked
(
false
);
mEncOtherChk
->
setChecked
(
false
);
mSymmetric
->
setChecked
(
false
);
}
}
void
SignEncryptWidget
::
setProtocol
(
GpgME
::
Protocol
proto
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment