diff options
author | Saturn&Eric <[email protected]> | 2022-03-19 07:55:26 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2022-03-19 07:55:26 +0000 |
commit | d1e305cda3a8ddc066213f3309826caf29064423 (patch) | |
tree | fabeb080e66df2fe944011ba5690f680ebabe7b6 /src/ui/mail/SenderPicker.cpp | |
parent | <doc>(project): update README.md. (diff) | |
parent | Merge branch 'main' into develop-2.0.5 (diff) | |
download | GpgFrontend-d1e305cda3a8ddc066213f3309826caf29064423.tar.gz GpgFrontend-d1e305cda3a8ddc066213f3309826caf29064423.zip |
Merge pull request #49 from saturneric/develop-2.0.5
v2.0.5
Diffstat (limited to '')
-rw-r--r-- | src/ui/mail/SenderPicker.cpp (renamed from src/ui/smtp/SenderPicker.cpp) | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/src/ui/smtp/SenderPicker.cpp b/src/ui/mail/SenderPicker.cpp index fcd3ba61..e3563480 100644 --- a/src/ui/smtp/SenderPicker.cpp +++ b/src/ui/mail/SenderPicker.cpp @@ -1,4 +1,6 @@ /** + * Copyright (C) 2021 Saturneric + * * This file is part of GpgFrontend. * * GpgFrontend is free software: you can redistribute it and/or modify @@ -6,19 +8,21 @@ * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Foobar is distributed in the hope that it will be useful, + * GpgFrontend is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Foobar. If not, see <https://www.gnu.org/licenses/>. + * along with GpgFrontend. If not, see <https://www.gnu.org/licenses/>. + * + * The initial version of the source code is inherited from + * the gpg4usb project, which is under GPL-3.0-or-later. * - * The initial version of the source code is inherited from gpg4usb-team. - * Their source code version also complies with GNU General Public License. + * All the source code of GpgFrontend was modified and released by + * Saturneric<[email protected]> starting on May 12, 2021. * - * The source code version of this software was modified and released - * by Saturneric<[email protected]> starting on May 12, 2021. + * SPDX-License-Identifier: GPL-3.0-or-later * */ @@ -30,19 +34,20 @@ GpgFrontend::UI::SenderPicker::SenderPicker(const KeyId& current_key_id, QWidget* parent) : QDialog(parent) { auto confirm_button = new QPushButton(_("Confirm")); - connect(confirm_button, SIGNAL(clicked(bool)), this, SLOT(accept())); + connect(confirm_button, &QPushButton::clicked, this, &SenderPicker::accept); // Setup KeyList key_list_ = new KeyList(KeyMenuAbility::NONE, this); - key_list_->addListGroupTab( - _("Sender"), KeyListRow::ONLY_SECRET_KEY, - KeyListColumn::NAME | KeyListColumn::EmailAddress, - [](const GpgKey& key) -> bool { return key.CanSignActual(); }); - key_list_->slotRefresh(); + key_list_->AddListGroupTab(_("Sender"), KeyListRow::ONLY_SECRET_KEY, + KeyListColumn::NAME | KeyListColumn::EmailAddress, + [](const GpgKey& key) -> bool { + return key.IsHasActualSigningCapability(); + }); + key_list_->SlotRefresh(); auto key_ids = std::make_unique<GpgFrontend::KeyIdArgsList>(); key_ids->push_back(current_key_id); - key_list_->setChecked(std::move(key_ids)); + key_list_->SetChecked(std::move(key_ids)); auto* vbox2 = new QVBoxLayout(); vbox2->addWidget(new QLabel(QString(_("Select Sender")) + ": ")); @@ -66,10 +71,10 @@ GpgFrontend::UI::SenderPicker::SenderPicker(const KeyId& current_key_id, this->exec(); } -GpgFrontend::KeyId GpgFrontend::UI::SenderPicker::getCheckedSender() { - auto checked_keys = key_list_->getChecked(); +GpgFrontend::KeyId GpgFrontend::UI::SenderPicker::GetCheckedSender() { + auto checked_keys = key_list_->GetChecked(); if (!checked_keys->empty()) { - return key_list_->getChecked()->front(); + return key_list_->GetChecked()->front(); } else { return {}; } |