Allow certification trust level to be editable for any key.
Imported primary keys also have unknown trust level, when they have been generated in other keyrings. Later, we should decide whether to exclude any primary key with ultimate trust level from any further change.
This commit is contained in:
@@ -260,12 +260,12 @@ void K7Main::DisplayKeys(const vector<GpgME::Key>& kList, const WString& grpLabe
|
|||||||
keyNode->setColumnWidget(1, unique_ptr<WAnchor> (anc));
|
keyNode->setColumnWidget(1, unique_ptr<WAnchor> (anc));
|
||||||
WText * lblOwnerTrust = new WText(OwnerTrustLevel[k.ownerTrust()]);
|
WText * lblOwnerTrust = new WText(OwnerTrustLevel[k.ownerTrust()]);
|
||||||
if (m_config->CanEditOwnerTrust()) {
|
if (m_config->CanEditOwnerTrust()) {
|
||||||
if (!m_keyEdit->IsOurKey(k.primaryFingerprint())) {
|
/*
|
||||||
|
* Here we allow the owner trust level of primary keys to be changed anytime.
|
||||||
|
* Kleopatra doesn't do that for primary keys having ultimate trust level.
|
||||||
|
*/
|
||||||
lblOwnerTrust->doubleClicked().connect(std::bind(&KeyEdit::OnOwnerTrustDoubleClicked, m_keyEdit, keyNode));
|
lblOwnerTrust->doubleClicked().connect(std::bind(&KeyEdit::OnOwnerTrustDoubleClicked, m_keyEdit, keyNode));
|
||||||
lblOwnerTrust->setToolTip(TR("TTTDoubleCLick"));
|
lblOwnerTrust->setToolTip(TR("TTTDoubleCLick"));
|
||||||
} else {
|
|
||||||
lblOwnerTrust->setToolTip(TR("TTTYourKey"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
keyNode->setColumnWidget(2, unique_ptr<WText> (lblOwnerTrust));
|
keyNode->setColumnWidget(2, unique_ptr<WText> (lblOwnerTrust));
|
||||||
TreeTableNodeText * ttntFpr = new TreeTableNodeText(k.primaryFingerprint(), keyNode, 3);
|
TreeTableNodeText * ttntFpr = new TreeTableNodeText(k.primaryFingerprint(), keyNode, 3);
|
||||||
|
|||||||
@@ -30,10 +30,10 @@ KeyEdit::~KeyEdit()
|
|||||||
|
|
||||||
void KeyEdit::OnOwnerTrustDoubleClicked(WTreeTableNode * keyNode)
|
void KeyEdit::OnOwnerTrustDoubleClicked(WTreeTableNode * keyNode)
|
||||||
{
|
{
|
||||||
// We ought to trust our own keys
|
/*
|
||||||
const WText * lblFpr = static_cast<WText*> (keyNode->columnWidget(3));
|
* TODO : decide if we should exclude any primary key with ultimate trust
|
||||||
if (IsOurKey(lblFpr->text()))
|
* level for any further change.
|
||||||
return;
|
*/
|
||||||
WComboBox * cmbOwnerTrust = new WComboBox();
|
WComboBox * cmbOwnerTrust = new WComboBox();
|
||||||
FillOwnerTrustCombo(cmbOwnerTrust);
|
FillOwnerTrustCombo(cmbOwnerTrust);
|
||||||
cmbOwnerTrust->blurred().connect(std::bind(&KeyEdit::OnOwnerTrustBlurred, this, keyNode));
|
cmbOwnerTrust->blurred().connect(std::bind(&KeyEdit::OnOwnerTrustBlurred, this, keyNode));
|
||||||
|
|||||||
Reference in New Issue
Block a user