Skip to content
GitLab
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
f7e4efff
Commit
f7e4efff
authored
Jan 18, 2022
by
Ingo Klöcker
Browse files
Disable UI elements if corresponding config entries are read-only
GnuPG-bug-id: 5791
parent
183c899a
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/conf/dirservconfigpage.cpp
View file @
f7e4efff
...
...
@@ -294,6 +294,7 @@ void DirectoryServicesConfigurationPage::load()
//qCDebug(KLEOPATRA_LOG) <<"timeout:" << mTimeoutConfigEntry->uintValue() <<" ->" << time;
mTimeout
->
setTime
(
time
);
}
mTimeout
->
setEnabled
(
mTimeoutConfigEntry
&&
!
mTimeoutConfigEntry
->
isReadOnly
());
// read max-replies config entry
// first try to read the config entry as int (GnuPG 2.3)
...
...
src/conf/smimevalidationconfigurationwidget.cpp
View file @
f7e4efff
...
...
@@ -230,30 +230,39 @@ void SMimeValidationConfigurationWidget::load()
if
(
e
.
mCheckUsingOCSPConfigEntry
)
{
d
->
ui
.
OCSPCB
->
setChecked
(
e
.
mCheckUsingOCSPConfigEntry
->
boolValue
());
}
d
->
ui
.
OCSPCB
->
setEnabled
(
e
.
mCheckUsingOCSPConfigEntry
&&
!
e
.
mCheckUsingOCSPConfigEntry
->
isReadOnly
());
d
->
ui
.
OCSPGroupBox
->
setEnabled
(
d
->
ui
.
OCSPCB
->
isChecked
());
if
(
e
.
mDoNotCheckCertPolicyConfigEntry
)
{
d
->
ui
.
doNotCheckCertPolicyCB
->
setChecked
(
e
.
mDoNotCheckCertPolicyConfigEntry
->
boolValue
());
}
d
->
ui
.
doNotCheckCertPolicyCB
->
setEnabled
(
e
.
mDoNotCheckCertPolicyConfigEntry
&&
!
e
.
mDoNotCheckCertPolicyConfigEntry
->
isReadOnly
());
if
(
e
.
mNeverConsultConfigEntry
)
{
d
->
ui
.
neverConsultCB
->
setChecked
(
e
.
mNeverConsultConfigEntry
->
boolValue
());
}
d
->
ui
.
neverConsultCB
->
setEnabled
(
e
.
mNeverConsultConfigEntry
&&
!
e
.
mNeverConsultConfigEntry
->
isReadOnly
());
if
(
e
.
mNoAllowMarkTrustedConfigEntry
)
{
d
->
ui
.
allowMarkTrustedCB
->
hide
();
// this option was only here to _enable_ allow-mark-trusted, and makes no sense if it's already default on
}
if
(
e
.
mAllowMarkTrustedConfigEntry
)
{
d
->
ui
.
allowMarkTrustedCB
->
setChecked
(
e
.
mAllowMarkTrustedConfigEntry
->
boolValue
());
}
d
->
ui
.
allowMarkTrustedCB
->
setEnabled
(
e
.
mAllowMarkTrustedConfigEntry
&&
!
e
.
mAllowMarkTrustedConfigEntry
->
isReadOnly
());
if
(
e
.
mFetchMissingConfigEntry
)
{
d
->
ui
.
fetchMissingCB
->
setChecked
(
e
.
mFetchMissingConfigEntry
->
boolValue
());
}
d
->
ui
.
fetchMissingCB
->
setEnabled
(
e
.
mFetchMissingConfigEntry
&&
!
e
.
mFetchMissingConfigEntry
->
isReadOnly
());
if
(
e
.
mOCSPResponderURLConfigEntry
)
{
d
->
ui
.
OCSPResponderURL
->
setText
(
e
.
mOCSPResponderURLConfigEntry
->
stringValue
());
}
d
->
ui
.
OCSPResponderURL
->
setEnabled
(
e
.
mOCSPResponderURLConfigEntry
&&
!
e
.
mOCSPResponderURLConfigEntry
->
isReadOnly
());
d
->
ui
.
OCSPResponderURLLabel
->
setEnabled
(
e
.
mOCSPResponderURLConfigEntry
&&
!
e
.
mOCSPResponderURLConfigEntry
->
isReadOnly
());
if
(
e
.
mOCSPResponderSignature
)
{
d
->
ui
.
OCSPResponderSignature
->
setSelectedCertificate
(
e
.
mOCSPResponderSignature
->
stringValue
());
}
d
->
ui
.
OCSPResponderSignature
->
setEnabled
(
e
.
mOCSPResponderSignature
&&
!
e
.
mOCSPResponderSignature
->
isReadOnly
());
d
->
ui
.
OCSPResponderSignatureLabel
->
setEnabled
(
e
.
mOCSPResponderSignature
&&
!
e
.
mOCSPResponderSignature
->
isReadOnly
());
// dirmngr-0.9.0 options
initializeDirmngrCheckbox
(
d
->
ui
.
ignoreServiceURLCB
,
e
.
mIgnoreServiceURLEntry
);
...
...
src/conf/smimevalidationconfigurationwidget.ui
View file @
f7e4efff
...
...
@@ -82,7 +82,7 @@
</property>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="
text
Label
1
" >
<widget class="QLabel" name="
OCSPResponderURL
Label" >
<property name="text" >
<string>OCSP responder URL:</string>
</property>
...
...
@@ -99,7 +99,7 @@
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="
text
Label
2
" >
<widget class="QLabel" name="
OCSPResponderSignature
Label" >
<property name="text" >
<string>OCSP responder signature:</string>
</property>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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