From 54fa245fa857f74980577ffbdc1c703019f3fcdb Mon Sep 17 00:00:00 2001 From: SET Date: Wed, 4 Nov 2020 21:00:03 +0100 Subject: [PATCH] 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. --- K7Main.cpp | 12 ++++++------ KeyEdit.cpp | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/K7Main.cpp b/K7Main.cpp index 53ea50e..5072ac2 100644 --- a/K7Main.cpp +++ b/K7Main.cpp @@ -260,12 +260,12 @@ void K7Main::DisplayKeys(const vector& kList, const WString& grpLabe keyNode->setColumnWidget(1, unique_ptr (anc)); WText * lblOwnerTrust = new WText(OwnerTrustLevel[k.ownerTrust()]); if (m_config->CanEditOwnerTrust()) { - if (!m_keyEdit->IsOurKey(k.primaryFingerprint())) { - lblOwnerTrust->doubleClicked().connect(std::bind(&KeyEdit::OnOwnerTrustDoubleClicked, m_keyEdit, keyNode)); - lblOwnerTrust->setToolTip(TR("TTTDoubleCLick")); - } else { - lblOwnerTrust->setToolTip(TR("TTTYourKey")); - } + /* + * 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->setToolTip(TR("TTTDoubleCLick")); } keyNode->setColumnWidget(2, unique_ptr (lblOwnerTrust)); TreeTableNodeText * ttntFpr = new TreeTableNodeText(k.primaryFingerprint(), keyNode, 3); diff --git a/KeyEdit.cpp b/KeyEdit.cpp index 38651d0..57c6d55 100644 --- a/KeyEdit.cpp +++ b/KeyEdit.cpp @@ -30,10 +30,10 @@ KeyEdit::~KeyEdit() void KeyEdit::OnOwnerTrustDoubleClicked(WTreeTableNode * keyNode) { - // We ought to trust our own keys - const WText * lblFpr = static_cast (keyNode->columnWidget(3)); - if (IsOurKey(lblFpr->text())) - return; + /* + * TODO : decide if we should exclude any primary key with ultimate trust + * level for any further change. + */ WComboBox * cmbOwnerTrust = new WComboBox(); FillOwnerTrustCombo(cmbOwnerTrust); cmbOwnerTrust->blurred().connect(std::bind(&KeyEdit::OnOwnerTrustBlurred, this, keyNode));