diff options
author | saturneric <[email protected]> | 2024-01-25 18:04:53 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-01-25 18:04:53 +0000 |
commit | 7a7dededba9384ac9af85775bdd6b64c890006fa (patch) | |
tree | 585350dcbf0061c06425167e99c82e2be461a902 | |
parent | feat: enhance keys searching functions (diff) | |
download | GpgFrontend-7a7dededba9384ac9af85775bdd6b64c890006fa.tar.gz GpgFrontend-7a7dededba9384ac9af85775bdd6b64c890006fa.zip |
feat: enhance gnupg control board
-rw-r--r-- | src/core/GpgCoreInit.cpp | 12 | ||||
-rw-r--r-- | src/init.cpp | 2 | ||||
-rw-r--r-- | src/ui/dialog/gnupg/GnuPGControllerDialog.cpp | 175 | ||||
-rw-r--r-- | src/ui/dialog/gnupg/GnuPGControllerDialog.h | 2 | ||||
-rw-r--r-- | src/ui/dialog/key_generate/KeygenDialog.cpp | 2 | ||||
-rw-r--r-- | src/ui/main_window/MainWindow.cpp | 4 | ||||
-rw-r--r-- | src/ui/main_window/MainWindowFileSlotFunction.cpp | 56 |
7 files changed, 137 insertions, 116 deletions
diff --git a/src/core/GpgCoreInit.cpp b/src/core/GpgCoreInit.cpp index 38b8f33a..2042120a 100644 --- a/src/core/GpgCoreInit.cpp +++ b/src/core/GpgCoreInit.cpp @@ -223,7 +223,7 @@ auto GetGnuPGPathByGpgConf(const QString& gnupg_install_fs_path) -> QString { auto DetectGpgConfPath() -> QString { auto settings = GlobalSettingStation::GetInstance().GetSettings(); auto use_custom_gnupg_install_path = - settings.value("basic/use_custom_gnupg_install_path", false).toBool(); + settings.value("gnupg/use_custom_gnupg_install_path", false).toBool(); auto custom_gnupg_install_path = settings.value("basic/custom_gnupg_install_path", QString{}).toString(); @@ -307,11 +307,11 @@ void InitGpgFrontendCore(CoreInitArgs args) { settings.value("network/auto_import_missing_key", false).toBool(); auto use_custom_key_database_path = - settings.value("basic/use_custom_key_database_path", false) + settings.value("gnupg/use_custom_key_database_path", false) .toBool(); auto custom_key_database_path = - settings.value("basic/custom_key_database_path", QString{}) + settings.value("gnupg/custom_key_database_path", QString{}) .toString(); auto custom_gnupg_install_path = @@ -319,7 +319,7 @@ void InitGpgFrontendCore(CoreInitArgs args) { .toString(); auto use_pinentry_as_password_input_dialog = - settings.value("basic/use_pinentry_as_password_input_dialog", false) + settings.value("gnupg/use_pinentry_as_password_input_dialog", false) .toBool(); GF_CORE_LOG_DEBUG("core loaded if use custom key databse path: {}", @@ -441,9 +441,7 @@ void InitGpgFrontendCore(CoreInitArgs args) { auto settings = GlobalSettingStation::GetInstance().GetSettings(); auto restart_all_gnupg_components_on_start = - settings - .value("gnupg/restart_all_gnupg_components_on_start", - false) + settings.value("gnupg/restart_gpg_agent_on_start", false) .toBool(); if (restart_all_gnupg_components_on_start) { diff --git a/src/init.cpp b/src/init.cpp index 2d7760fe..313097a8 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -75,7 +75,7 @@ void InitGlobalPathEnv() { bool use_custom_gnupg_install_path = GlobalSettingStation::GetInstance() .GetSettings() - .value("basic/use_custom_gnupg_install_path", false) + .value("gnupg/use_custom_gnupg_install_path", false) .toBool(); QString custom_gnupg_install_path = diff --git a/src/ui/dialog/gnupg/GnuPGControllerDialog.cpp b/src/ui/dialog/gnupg/GnuPGControllerDialog.cpp index 9c108674..8a4db995 100644 --- a/src/ui/dialog/gnupg/GnuPGControllerDialog.cpp +++ b/src/ui/dialog/gnupg/GnuPGControllerDialog.cpp @@ -46,7 +46,7 @@ GnuPGControllerDialog::GnuPGControllerDialog(QWidget* parent) ui_->keyDatabaseGroupBox->setTitle(tr("Key Database")); ui_->advanceGroupBox->setTitle(tr("Advanced")); - ui_->asciiModeCheckBox->setText(tr("No ASCII Mode")); + ui_->asciiModeCheckBox->setText(tr("Use Binary Mode for File Operations")); ui_->usePinentryAsPasswordInputDialogCheckBox->setText( tr("Use Pinentry as Password Input Dialog")); ui_->gpgmeDebugLogCheckBox->setText(tr("Enable GpgME Debug Log")); @@ -56,6 +56,8 @@ GnuPGControllerDialog::GnuPGControllerDialog(QWidget* parent) tr("Use Custom GnuPG Key Database Path")); ui_->customKeyDatabasePathSelectButton->setText( tr("Select Key Database Path")); + ui_->restartGpgAgentOnStartCheckBox->setText( + tr("Restart Gpg Agent on start")); // tips ui_->customGnuPGPathTipsLabel->setText( @@ -99,10 +101,7 @@ GnuPGControllerDialog::GnuPGControllerDialog(QWidget* parent) GF_UI_LOG_DEBUG("key databse path selected: {}", selected_custom_key_database_path); - if (!check_custom_gnupg_key_database_path( - selected_custom_key_database_path)) { - return; - } + custom_key_database_path_ = selected_custom_key_database_path; // announce the restart this->slot_set_restart_needed(kDeepRestartCode); @@ -122,10 +121,7 @@ GnuPGControllerDialog::GnuPGControllerDialog(QWidget* parent) GF_UI_LOG_DEBUG("gnupg install path selected: {}", selected_custom_gnupg_install_path); - // notify the user and precheck - if (!check_custom_gnupg_path(selected_custom_gnupg_install_path)) { - return; - } + custom_gnupg_path_ = selected_custom_gnupg_install_path; // announce the restart this->slot_set_restart_needed(kDeepRestartCode); @@ -151,6 +147,12 @@ GnuPGControllerDialog::GnuPGControllerDialog(QWidget* parent) this->slot_set_restart_needed(kDeepRestartCode); }); + connect(ui_->restartGpgAgentOnStartCheckBox, &QCheckBox::stateChanged, this, + [=](int) { + // announce the restart + this->slot_set_restart_needed(kDeepRestartCode); + }); + #ifndef MACOS connect(ui_->buttonBox, &QDialogButtonBox::accepted, this, &GnuPGControllerDialog::SlotAccept); @@ -186,37 +188,39 @@ void GnuPGControllerDialog::slot_update_custom_key_database_path_label( // announce the restart this->slot_set_restart_needed(kDeepRestartCode); - const auto database_path = Module::RetrieveRTValueTypedOrDefault<>( - "core", "gpgme.ctx.database_path", QString{}); - GF_UI_LOG_DEBUG("got gpgme.ctx.database_path from rt: {}", database_path); - - if (state != Qt::CheckState::Checked) { - ui_->currentKeyDatabasePathLabel->setText(database_path); - - // hide label (not necessary to show the default path) - this->ui_->currentKeyDatabasePathLabel->setHidden(true); - } else { - // read from settings file - QString custom_key_database_path = - GlobalSettingStation::GetInstance() - .GetSettings() - .value("basic/custom_key_database_path") - .toString(); - - GF_UI_LOG_DEBUG("selected_custom_key_database_path from settings: {}", - custom_key_database_path); + // hide label (not necessary to show the default path) + this->ui_->currentKeyDatabasePathLabel->setHidden(state != + Qt::CheckState::Checked); + if (state == Qt::CheckState::Checked) { + if (custom_key_database_path_.isEmpty()) { + // read from settings file + QString custom_key_database_path = + GlobalSettingStation::GetInstance() + .GetSettings() + .value("gnupg/custom_key_database_path") + .toString(); + GF_UI_LOG_DEBUG("selected_custom_key_database_path from settings: {}", + custom_key_database_path); + custom_key_database_path_ = custom_key_database_path; + } // notify the user - check_custom_gnupg_key_database_path(custom_key_database_path); + if (!check_custom_gnupg_key_database_path(custom_key_database_path_)) { + return; + }; // set label value - if (!custom_key_database_path.isEmpty()) { - ui_->currentKeyDatabasePathLabel->setText(custom_key_database_path); - this->ui_->currentKeyDatabasePathLabel->setHidden(false); - } else { - this->ui_->currentKeyDatabasePathLabel->setHidden(true); + if (!custom_key_database_path_.isEmpty()) { + ui_->currentKeyDatabasePathLabel->setText(custom_key_database_path_); } } + + if (ui_->currentKeyDatabasePathLabel->text().isEmpty()) { + const auto database_path = Module::RetrieveRTValueTypedOrDefault<>( + "core", "gpgme.ctx.database_path", QString{}); + GF_UI_LOG_DEBUG("got gpgme.ctx.database_path from rt: {}", database_path); + ui_->currentKeyDatabasePathLabel->setText(database_path); + } } void GnuPGControllerDialog::slot_update_custom_gnupg_install_path_label( @@ -224,50 +228,54 @@ void GnuPGControllerDialog::slot_update_custom_gnupg_install_path_label( // announce the restart this->slot_set_restart_needed(kDeepRestartCode); - const auto home_path = Module::RetrieveRTValueTypedOrDefault<>( - "com.bktus.gpgfrontend.module.integrated.gnupg-info-gathering", - "gnupg.home_path", QString{}); - GF_UI_LOG_DEBUG("got gnupg home path from rt: {}", home_path); - - if (state != Qt::CheckState::Checked) { - ui_->currentCustomGnuPGInstallPathLabel->setText(home_path); - - // hide label (not necessary to show the default path) - this->ui_->currentCustomGnuPGInstallPathLabel->setHidden(true); - } else { - // read from settings file - QString custom_gnupg_install_path = - GlobalSettingStation::GetInstance() - .GetSettings() - .value("basic/custom_gnupg_install_path") - .toString(); - - GF_UI_LOG_DEBUG("custom_gnupg_install_path from settings: {}", - custom_gnupg_install_path); - - // notify the user - check_custom_gnupg_path(custom_gnupg_install_path); - - // set label value - if (!custom_gnupg_install_path.isEmpty()) { - ui_->currentCustomGnuPGInstallPathLabel->setText( - custom_gnupg_install_path); - this->ui_->currentCustomGnuPGInstallPathLabel->setHidden(false); - } else { - this->ui_->currentCustomGnuPGInstallPathLabel->setHidden(true); + // hide label (not necessary to show the default path) + this->ui_->currentCustomGnuPGInstallPathLabel->setHidden( + state != Qt::CheckState::Checked); + do { + if (state == Qt::CheckState::Checked) { + if (custom_gnupg_path_.isEmpty()) { + // read from settings file + QString custom_gnupg_install_path = + GlobalSettingStation::GetInstance() + .GetSettings() + .value("basic/custom_gnupg_install_path") + .toString(); + GF_UI_LOG_DEBUG("custom_gnupg_install_path from settings: {}", + custom_gnupg_install_path); + custom_gnupg_path_ = custom_gnupg_install_path; + } + + // notify the user + if (!check_custom_gnupg_path(custom_gnupg_path_)) { + break; + } + + // set label value + if (!custom_gnupg_path_.isEmpty()) { + ui_->currentCustomGnuPGInstallPathLabel->setText(custom_gnupg_path_); + } } + } while (false); + + if (ui_->currentCustomGnuPGInstallPathLabel->text().isEmpty()) { + const auto gnupg_path = Module::RetrieveRTValueTypedOrDefault<>( + "core", "gpgme.ctx.app_path", QString{}); + GF_UI_LOG_DEBUG("got gnupg home path from rt: {}", gnupg_path); + auto dir = QFileInfo(gnupg_path).path(); + ui_->currentCustomGnuPGInstallPathLabel->setText(dir); } } void GnuPGControllerDialog::set_settings() { auto settings = GlobalSettingStation::GetInstance().GetSettings(); - bool non_ascii_when_export = - settings.value("basic/non_ascii_when_export", true).toBool(); - if (non_ascii_when_export) ui_->asciiModeCheckBox->setCheckState(Qt::Checked); + bool non_ascii_at_file_operation = + settings.value("gnupg/non_ascii_at_file_operation", true).toBool(); + if (non_ascii_at_file_operation) + ui_->asciiModeCheckBox->setCheckState(Qt::Checked); bool const use_custom_key_database_path = - settings.value("basic/use_custom_key_database_path", false).toBool(); + settings.value("gnupg/use_custom_key_database_path", false).toBool(); if (use_custom_key_database_path) { ui_->keyDatabseUseCustomCheckBox->setCheckState(Qt::Checked); } @@ -282,42 +290,53 @@ void GnuPGControllerDialog::set_settings() { ui_->keyDatabseUseCustomCheckBox->checkState()); bool const use_custom_gnupg_install_path = - settings.value("basic/use_custom_gnupg_install_path", false).toBool(); + settings.value("gnupg/use_custom_gnupg_install_path", false).toBool(); if (use_custom_gnupg_install_path) { ui_->useCustomGnuPGInstallPathCheckBox->setCheckState(Qt::Checked); } bool const use_pinentry_as_password_input_dialog = - settings.value("basic/use_pinentry_as_password_input_dialog", false) + settings.value("gnupg/use_pinentry_as_password_input_dialog", false) .toBool(); if (use_pinentry_as_password_input_dialog) { ui_->usePinentryAsPasswordInputDialogCheckBox->setCheckState(Qt::Checked); } - this->slot_update_custom_gnupg_install_path_label( - ui_->useCustomGnuPGInstallPathCheckBox->checkState()); + bool const restart_gpg_agent_on_start = + settings.value("gnupg/restart_gpg_agent_on_start", false).toBool(); + if (restart_gpg_agent_on_start) { + ui_->restartGpgAgentOnStartCheckBox->setCheckState(Qt::Checked); + } this->slot_set_restart_needed(false); + + this->slot_update_custom_key_database_path_label( + use_custom_key_database_path ? Qt::Checked : Qt::Unchecked); + + this->slot_update_custom_gnupg_install_path_label( + use_custom_gnupg_install_path ? Qt::Checked : Qt::Unchecked); } void GnuPGControllerDialog::apply_settings() { auto settings = GpgFrontend::GlobalSettingStation::GetInstance().GetSettings(); - settings.setValue("basic/non_ascii_when_export", + settings.setValue("gnupg/non_ascii_at_file_operation", ui_->asciiModeCheckBox->isChecked()); - settings.setValue("basic/use_custom_key_database_path", + settings.setValue("gnupg/use_custom_key_database_path", ui_->keyDatabseUseCustomCheckBox->isChecked()); - settings.setValue("basic/use_custom_gnupg_install_path", + settings.setValue("gnupg/use_custom_gnupg_install_path", ui_->useCustomGnuPGInstallPathCheckBox->isChecked()); - settings.setValue("basic/use_pinentry_as_password_input_dialog", + settings.setValue("gnupg/use_pinentry_as_password_input_dialog", ui_->usePinentryAsPasswordInputDialogCheckBox->isChecked()); settings.setValue("gnupg/enable_gpgme_debug_log", ui_->gpgmeDebugLogCheckBox->isChecked()); - settings.setValue("basic/custom_key_database_path", + settings.setValue("gnupg/custom_key_database_path", ui_->currentKeyDatabasePathLabel->text()); settings.setValue("basic/custom_gnupg_install_path", ui_->currentCustomGnuPGInstallPathLabel->text()); + settings.setValue("gnupg/restart_gpg_agent_on_start", + ui_->restartGpgAgentOnStartCheckBox->text()); } int GnuPGControllerDialog::get_restart_needed() const { diff --git a/src/ui/dialog/gnupg/GnuPGControllerDialog.h b/src/ui/dialog/gnupg/GnuPGControllerDialog.h index 201801dc..6e8ef797 100644 --- a/src/ui/dialog/gnupg/GnuPGControllerDialog.h +++ b/src/ui/dialog/gnupg/GnuPGControllerDialog.h @@ -84,6 +84,8 @@ class GnuPGControllerDialog : public GeneralDialog { private: std::shared_ptr<Ui_GnuPGControllerDialog> ui_; ///< int restart_needed_{0}; ///< + QString custom_key_database_path_; + QString custom_gnupg_path_; /** * @brief Get the Restart Needed object diff --git a/src/ui/dialog/key_generate/KeygenDialog.cpp b/src/ui/dialog/key_generate/KeygenDialog.cpp index 08816f98..50e28adf 100644 --- a/src/ui/dialog/key_generate/KeygenDialog.cpp +++ b/src/ui/dialog/key_generate/KeygenDialog.cpp @@ -141,7 +141,7 @@ void KeyGenDialog::slot_key_gen_accept() { if (!GlobalSettingStation::GetInstance() .GetSettings() - .value("basic/use_pinentry_as_password_input_dialog", false) + .value("gnupg/use_pinentry_as_password_input_dialog", false) .toBool() && !no_pass_phrase_check_box_->isChecked()) { SetCacheValue("PinentryContext", "NEW_PASSPHRASE"); diff --git a/src/ui/main_window/MainWindow.cpp b/src/ui/main_window/MainWindow.cpp index 3d930d4d..27634570 100644 --- a/src/ui/main_window/MainWindow.cpp +++ b/src/ui/main_window/MainWindow.cpp @@ -169,8 +169,8 @@ void MainWindow::restore_settings() { if (key_server.default_server < 0) key_server.default_server = 0; auto settings = GlobalSettingStation::GetInstance().GetSettings(); - if (!settings.contains("basic/non_ascii_when_export")) { - settings.setValue("basic/non_ascii_when_export", true); + if (!settings.contains("gnupg/non_ascii_at_file_operation")) { + settings.setValue("gnupg/non_ascii_at_file_operation", true); } // set appearance diff --git a/src/ui/main_window/MainWindowFileSlotFunction.cpp b/src/ui/main_window/MainWindowFileSlotFunction.cpp index c1b1bba1..6f550c09 100644 --- a/src/ui/main_window/MainWindowFileSlotFunction.cpp +++ b/src/ui/main_window/MainWindowFileSlotFunction.cpp @@ -51,13 +51,13 @@ void MainWindow::SlotFileEncrypt(const QString& path) { return; } - bool const non_ascii_when_export = + bool const non_ascii_at_file_operation = GlobalSettingStation::GetInstance() .GetSettings() - .value("basic/non_ascii_when_export", true) + .value("gnupg/non_ascii_at_file_operation", true) .toBool(); auto out_path = - SetExtensionOfOutputFile(path, kENCRYPT, !non_ascii_when_export); + SetExtensionOfOutputFile(path, kENCRYPT, !non_ascii_at_file_operation); if (QFile::exists(out_path)) { auto out_file_name = tr("The target file %1 already exists, " @@ -90,7 +90,7 @@ void MainWindow::SlotFileEncrypt(const QString& path) { CommonUtils::WaitForOpera( this, tr("Symmetrically Encrypting"), [=](const OperaWaitingHd& op_hd) { GpgFileOpera::GetInstance().EncryptFileSymmetric( - path, !non_ascii_when_export, out_path, + path, !non_ascii_at_file_operation, out_path, [=](GpgError err, const DataObjectPtr& data_obj) { // stop waiting op_hd(); @@ -134,8 +134,9 @@ void MainWindow::SlotFileEncrypt(const QString& path) { CommonUtils::WaitForOpera( this, tr("Encrypting"), [=](const OperaWaitingHd& op_hd) { GpgFileOpera::GetInstance().EncryptFile( - {p_keys->begin(), p_keys->end()}, path, !non_ascii_when_export, - out_path, [=](GpgError err, const DataObjectPtr& data_obj) { + {p_keys->begin(), p_keys->end()}, path, + !non_ascii_at_file_operation, out_path, + [=](GpgError err, const DataObjectPtr& data_obj) { // stop waiting op_hd(); @@ -165,13 +166,13 @@ void MainWindow::SlotDirectoryEncrypt(const QString& path) { return; } - bool const non_ascii_when_export = + bool const non_ascii_at_file_operation = GlobalSettingStation::GetInstance() .GetSettings() - .value("basic/non_ascii_when_export", true) + .value("gnupg/non_ascii_at_file_operation", true) .toBool(); - auto out_path = SetExtensionOfOutputFileForArchive(path, kENCRYPT, - !non_ascii_when_export); + auto out_path = SetExtensionOfOutputFileForArchive( + path, kENCRYPT, !non_ascii_at_file_operation); if (QFile::exists(out_path)) { auto out_file_name = tr("The target file %1 already exists, " @@ -205,7 +206,7 @@ void MainWindow::SlotDirectoryEncrypt(const QString& path) { this, tr("Archiving & Symmetrically Encrypting"), [=](const OperaWaitingHd& op_hd) { GpgFileOpera::GetInstance().EncryptDerectorySymmetric( - path, !non_ascii_when_export, out_path, + path, !non_ascii_at_file_operation, out_path, [=](GpgError err, const DataObjectPtr& data_obj) { // stop waiting op_hd(); @@ -248,8 +249,9 @@ void MainWindow::SlotDirectoryEncrypt(const QString& path) { CommonUtils::WaitForOpera( this, tr("Archiving & Encrypting"), [=](const OperaWaitingHd& op_hd) { GpgFileOpera::GetInstance().EncryptDirectory( - {p_keys->begin(), p_keys->end()}, path, !non_ascii_when_export, - out_path, [=](GpgError err, const DataObjectPtr& data_obj) { + {p_keys->begin(), p_keys->end()}, path, + !non_ascii_at_file_operation, out_path, + [=](GpgError err, const DataObjectPtr& data_obj) { // stop waiting op_hd(); @@ -402,13 +404,13 @@ void MainWindow::SlotFileSign(const QString& path) { } } - bool const non_ascii_when_export = + bool const non_ascii_at_file_operation = GlobalSettingStation::GetInstance() .GetSettings() - .value("basic/non_ascii_when_export", true) + .value("gnupg/non_ascii_at_file_operation", true) .toBool(); auto sig_file_path = - SetExtensionOfOutputFile(path, kSIGN, !non_ascii_when_export); + SetExtensionOfOutputFile(path, kSIGN, !non_ascii_at_file_operation); if (QFileInfo(sig_file_path).exists()) { auto ret = QMessageBox::warning(this, tr("Warning"), @@ -423,7 +425,7 @@ void MainWindow::SlotFileSign(const QString& path) { CommonUtils::WaitForOpera( this, tr("Signing"), [=](const OperaWaitingHd& op_hd) { GpgFileOpera::GetInstance().SignFile( - {keys->begin(), keys->end()}, path, !non_ascii_when_export, + {keys->begin(), keys->end()}, path, !non_ascii_at_file_operation, sig_file_path, [=](GpgError err, const DataObjectPtr& data_obj) { // stop waiting op_hd(); @@ -561,13 +563,13 @@ void MainWindow::SlotFileEncryptSign(const QString& path) { } } - bool const non_ascii_when_export = + bool const non_ascii_at_file_operation = GlobalSettingStation::GetInstance() .GetSettings() - .value("basic/non_ascii_when_export", true) + .value("gnupg/non_ascii_at_file_operation", true) .toBool(); - auto out_path = - SetExtensionOfOutputFile(path, kENCRYPT_SIGN, !non_ascii_when_export); + auto out_path = SetExtensionOfOutputFile(path, kENCRYPT_SIGN, + !non_ascii_at_file_operation); check_result = TargetFilePreCheck(out_path, false); if (!std::get<0>(check_result)) { @@ -601,7 +603,7 @@ void MainWindow::SlotFileEncryptSign(const QString& path) { GpgFileOpera::GetInstance().EncryptSignFile( {p_keys->begin(), p_keys->end()}, {p_signer_keys->begin(), p_signer_keys->end()}, path, - !non_ascii_when_export, out_path, + !non_ascii_at_file_operation, out_path, [=](GpgError err, const DataObjectPtr& data_obj) { // stop waiting op_hd(); @@ -664,13 +666,13 @@ void MainWindow::SlotDirectoryEncryptSign(const QString& path) { } } - bool const non_ascii_when_export = + bool const non_ascii_at_file_operation = GlobalSettingStation::GetInstance() .GetSettings() - .value("basic/non_ascii_when_export", true) + .value("gnupg/non_ascii_at_file_operation", true) .toBool(); - auto out_path = SetExtensionOfOutputFileForArchive(path, kENCRYPT_SIGN, - !non_ascii_when_export); + auto out_path = SetExtensionOfOutputFileForArchive( + path, kENCRYPT_SIGN, !non_ascii_at_file_operation); check_result = TargetFilePreCheck(out_path, false); if (!std::get<0>(check_result)) { @@ -705,7 +707,7 @@ void MainWindow::SlotDirectoryEncryptSign(const QString& path) { GpgFileOpera::GetInstance().EncryptSignDirectory( {p_keys->begin(), p_keys->end()}, {p_signer_keys->begin(), p_signer_keys->end()}, path, - !non_ascii_when_export, out_path, + !non_ascii_at_file_operation, out_path, [=](GpgError err, const DataObjectPtr& data_obj) { // stop waiting op_hd(); |