Show certification trust level when listing keys.

This commit is contained in:
SET
2020-10-19 19:28:48 +02:00
parent b1ab6ba97d
commit ca2105733b
5 changed files with 17 additions and 1 deletions

View File

@@ -47,6 +47,13 @@ K7Main::K7Main(const WEnvironment& env)
UidValidities[UserID::Validity::Ultimate] = TR("UidUltimate");
UidValidities[UserID::Validity::Undefined] = TR("UidUndefined");
UidValidities[UserID::Validity::Unknown] = TR("UidUnknown");
OwnerTrustLevel[GpgME::Key::OwnerTrust::Full] = TR("UidFull");
OwnerTrustLevel[GpgME::Key::OwnerTrust::Marginal] = TR("UidMarginal");
OwnerTrustLevel[GpgME::Key::OwnerTrust::Never] = TR("UidNever");
OwnerTrustLevel[GpgME::Key::OwnerTrust::Ultimate] = TR("UidUltimate");
OwnerTrustLevel[GpgME::Key::OwnerTrust::Undefined] = TR("UidUndefined");
OwnerTrustLevel[GpgME::Key::OwnerTrust::Unknown] = TR("UidUnknown");
m_uploader = NULL; m_deleter = NULL;
}
@@ -202,6 +209,7 @@ void K7Main::Search()
if (m_ttbKeys->columnCount() == 1) {
m_ttbKeys->addColumn(TR("ID"), 120);
m_ttbKeys->addColumn(TR("OwnerTrust"), 210);
m_ttbKeys->addColumn(TR("Fpr"), 300);
}
// The previous tree root is auto deleted by the use of smart pointers !!
@@ -247,7 +255,8 @@ void K7Main::DisplayKeys(const vector<GpgME::Key>& kList, const WString& grpLabe
anc->setAttributeValue("hasSecret", k.hasSecret() ? "1" : "0");
anc->clicked().connect(std::bind(&K7Main::OnKeyAnchorClicked, this, anc));
keyNode->setColumnWidget(1, unique_ptr<WAnchor> (anc));
keyNode->setColumnWidget(2, cpp14::make_unique<WText> (k.primaryFingerprint()));
keyNode->setColumnWidget(2, cpp14::make_unique<WText> (OwnerTrustLevel[k.ownerTrust()]));
keyNode->setColumnWidget(3, cpp14::make_unique<WText> (k.primaryFingerprint()));
grpNode->addChildNode(unique_ptr<WTreeTableNode> (keyNode));
}
if (expand)

View File

@@ -41,6 +41,8 @@ private:
*/
typedef map<int, WString> UidValidityMap;
UidValidityMap UidValidities;
typedef map<int, WString> OwnerTrustMap;
OwnerTrustMap OwnerTrustLevel;
AppConfig * m_config;
WGridLayout * m_grlMain;
WContainerWidget * m_cwMain;

View File

@@ -29,6 +29,7 @@
<message id='Secret'>Secret</message>
<message id='Secrets'>Secret</message>
<message id='Fpr'>Fingerprint</message>
<message id='OwnerTrust'>Certification trust</message>
<message id='ID'>ID</message>
<message id='UID'>User ID</message>

View File

@@ -29,6 +29,7 @@
<message id='Secret'>Secrète</message>
<message id='Secrets'>Secrètes</message>
<message id='Fpr'>Empreinte</message>
<message id='OwnerTrust'>Confiance dans la certification</message>
<message id='ID'>Identifiant</message>
<message id='UID'>Identifiant utilisateur</message>

View File

@@ -7,7 +7,10 @@
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/home/user/Documents/published/K7/WTAPPROOT/K7/K7_fr.xml</file>
<file>file:/home/user/Documents/published/K7/K7Main.cpp</file>
<file>file:/home/user/Documents/published/K7/K7Main.h</file>
<file>file:/home/user/Documents/published/K7/WTAPPROOT/K7/K7.xml</file>
</group>
</open-files>
</project-private>