From 2874ebd5e56a7da7f7e7c96da392199b296d909a Mon Sep 17 00:00:00 2001 From: Saturneric Date: Fri, 17 Dec 2021 02:18:38 +0800 Subject: Fixed & Improve. 1. Fixed Known Issues. 2. Improve UI. --- src/ui/FileEncryptionDialog.cpp | 60 +++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 29 deletions(-) (limited to 'src/ui/FileEncryptionDialog.cpp') diff --git a/src/ui/FileEncryptionDialog.cpp b/src/ui/FileEncryptionDialog.cpp index aeba6497..6930c3c9 100755 --- a/src/ui/FileEncryptionDialog.cpp +++ b/src/ui/FileEncryptionDialog.cpp @@ -86,42 +86,44 @@ FileEncryptionDialog::FileEncryptionDialog(KeyIdArgsListPtr keyList, groupBox1->setLayout(gLayout); /*Setup KeyList*/ - + mKeyList = new KeyList(false, this); if (mAction == Verify) { - mKeyList = - new KeyList(KeyListRow::ONLY_SECRET_KEY, - KeyListColumn::NAME | KeyListColumn::EmailAddress | - KeyListColumn::Usage, - [](const GpgKey& key) -> bool { - if (key.disabled() || key.expired() || key.revoked()) - return false; - else - return true; - }); + mKeyList->addListGroupTab( + _("Default"), KeyListRow::ONLY_SECRET_KEY, + KeyListColumn::NAME | KeyListColumn::EmailAddress | + KeyListColumn::Usage, + [](const GpgKey& key) -> bool { + if (key.disabled() || key.expired() || key.revoked()) + return false; + else + return true; + }); } if (mAction == Encrypt) { - mKeyList = new KeyList(KeyListRow::ONLY_SECRET_KEY, - KeyListColumn::NAME | KeyListColumn::EmailAddress | - KeyListColumn::Usage, - [](const GpgKey& key) -> bool { - if (!key.CanEncrActual()) - return false; - else - return true; - }); + mKeyList->addListGroupTab(_("Default"), KeyListRow::ONLY_SECRET_KEY, + KeyListColumn::NAME | + KeyListColumn::EmailAddress | + KeyListColumn::Usage, + [](const GpgKey& key) -> bool { + if (!key.CanEncrActual()) + return false; + else + return true; + }); } if (mAction == Encrypt) { - mKeyList = new KeyList(KeyListRow::ONLY_SECRET_KEY, - KeyListColumn::NAME | KeyListColumn::EmailAddress | - KeyListColumn::Usage, - [](const GpgKey& key) -> bool { - if (!key.CanSignActual()) - return false; - else - return true; - }); + mKeyList->addListGroupTab(_("Default"), KeyListRow::ONLY_SECRET_KEY, + KeyListColumn::NAME | + KeyListColumn::EmailAddress | + KeyListColumn::Usage, + [](const GpgKey& key) -> bool { + if (!key.CanSignActual()) + return false; + else + return true; + }); } if (mAction == Decrypt) mKeyList->setDisabled(true); -- cgit v1.2.3