diff options
author | Saturn&Eric <[email protected]> | 2023-07-13 16:51:19 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2023-07-13 16:51:19 +0000 |
commit | 40bcaec6c8c0c363bf793745131a2e6d0274fd6d (patch) | |
tree | 8dc11045bee7caf8a1b936ee2203dd39bec59e07 /src/ui/main_window/KeyMgmt.cpp | |
parent | Merge pull request #102 from CDmking/main (diff) | |
parent | Merge branch 'main' into dev/2.1.0/main (diff) | |
download | GpgFrontend-40bcaec6c8c0c363bf793745131a2e6d0274fd6d.tar.gz GpgFrontend-40bcaec6c8c0c363bf793745131a2e6d0274fd6d.zip |
Merge pull request #106 from saturneric/dev/2.1.0/main
Develop 2.1.1.4
Diffstat (limited to 'src/ui/main_window/KeyMgmt.cpp')
-rw-r--r-- | src/ui/main_window/KeyMgmt.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/ui/main_window/KeyMgmt.cpp b/src/ui/main_window/KeyMgmt.cpp index 758a7af1..47b0dcb0 100644 --- a/src/ui/main_window/KeyMgmt.cpp +++ b/src/ui/main_window/KeyMgmt.cpp @@ -48,46 +48,50 @@ KeyMgmt::KeyMgmt(QWidget* parent) /* the list of Keys available*/ key_list_ = new KeyList(KeyMenuAbility::ALL, this); - key_list_->AddListGroupTab(_("All"), KeyListRow::SECRET_OR_PUBLIC_KEY); + key_list_->AddListGroupTab(_("All"), "all", KeyListRow::SECRET_OR_PUBLIC_KEY); key_list_->AddListGroupTab( - _("Only Public Key"), KeyListRow::SECRET_OR_PUBLIC_KEY, + _("Only Public Key"), "only_public_key", KeyListRow::SECRET_OR_PUBLIC_KEY, KeyListColumn::TYPE | KeyListColumn::NAME | KeyListColumn::EmailAddress | KeyListColumn::Usage | KeyListColumn::Validity, - [](const GpgKey& key) -> bool { + [](const GpgKey& key, const KeyTable&) -> bool { return !key.IsPrivateKey() && !(key.IsRevoked() || key.IsDisabled() || key.IsExpired()); }); key_list_->AddListGroupTab( - _("Has Private Key"), KeyListRow::SECRET_OR_PUBLIC_KEY, + _("Has Private Key"), "has_private_key", KeyListRow::SECRET_OR_PUBLIC_KEY, KeyListColumn::TYPE | KeyListColumn::NAME | KeyListColumn::EmailAddress | KeyListColumn::Usage | KeyListColumn::Validity, - [](const GpgKey& key) -> bool { + [](const GpgKey& key, const KeyTable&) -> bool { return key.IsPrivateKey() && !(key.IsRevoked() || key.IsDisabled() || key.IsExpired()); }); key_list_->AddListGroupTab( - _("No Primary Key"), KeyListRow::SECRET_OR_PUBLIC_KEY, + _("No Primary Key"), "no_primary_key", KeyListRow::SECRET_OR_PUBLIC_KEY, KeyListColumn::TYPE | KeyListColumn::NAME | KeyListColumn::EmailAddress | KeyListColumn::Usage | KeyListColumn::Validity, - [](const GpgKey& key) -> bool { + [](const GpgKey& key, const KeyTable&) -> bool { return !key.IsHasMasterKey() && !(key.IsRevoked() || key.IsDisabled() || key.IsExpired()); }); key_list_->AddListGroupTab( - _("Revoked"), KeyListRow::SECRET_OR_PUBLIC_KEY, + _("Revoked"), "revoked", KeyListRow::SECRET_OR_PUBLIC_KEY, KeyListColumn::TYPE | KeyListColumn::NAME | KeyListColumn::EmailAddress | KeyListColumn::Usage | KeyListColumn::Validity, - [](const GpgKey& key) -> bool { return key.IsRevoked(); }); + [](const GpgKey& key, const KeyTable&) -> bool { + return key.IsRevoked(); + }); key_list_->AddListGroupTab( - _("Expired"), KeyListRow::SECRET_OR_PUBLIC_KEY, + _("Expired"), "expired", KeyListRow::SECRET_OR_PUBLIC_KEY, KeyListColumn::TYPE | KeyListColumn::NAME | KeyListColumn::EmailAddress | KeyListColumn::Usage | KeyListColumn::Validity, - [](const GpgKey& key) -> bool { return key.IsExpired(); }); + [](const GpgKey& key, const KeyTable&) -> bool { + return key.IsExpired(); + }); setCentralWidget(key_list_); key_list_->SetDoubleClickedAction([this](const GpgKey& key, QWidget* parent) { |