diff options
author | saturneric <[email protected]> | 2025-02-03 15:03:32 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2025-02-03 15:04:09 +0000 |
commit | dd8bca46a64dc01ed5a914632b1176cfb4a4ef86 (patch) | |
tree | 9096b7c68533e77b824c9929d775ce60493eb4f7 /src/ui/main_window/MainWindowGpgOperaFunction.cpp | |
parent | refactor: make some function names shorter (diff) | |
download | GpgFrontend-dd8bca46a64dc01ed5a914632b1176cfb4a4ef86.tar.gz GpgFrontend-dd8bca46a64dc01ed5a914632b1176cfb4a4ef86.zip |
feat: allow switch ascii mode at file page options
Diffstat (limited to '')
-rw-r--r-- | src/ui/main_window/MainWindowGpgOperaFunction.cpp | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/src/ui/main_window/MainWindowGpgOperaFunction.cpp b/src/ui/main_window/MainWindowGpgOperaFunction.cpp index 984acb2f..7632fdd6 100644 --- a/src/ui/main_window/MainWindowGpgOperaFunction.cpp +++ b/src/ui/main_window/MainWindowGpgOperaFunction.cpp @@ -289,13 +289,9 @@ void MainWindow::SlotDecryptVerify() { } } -void MainWindow::SlotFileEncrypt(const QStringList& paths) { +void MainWindow::SlotFileEncrypt(const QStringList& paths, bool ascii) { auto contexts = QSharedPointer<GpgOperaContextBasement>::create(); - - bool const non_ascii_at_file_operation = - GetSettings().value("gnupg/non_ascii_at_file_operation", true).toBool(); - - contexts->ascii = !non_ascii_at_file_operation; + contexts->ascii = ascii; if (!encrypt_operation_key_validate(contexts)) return; @@ -362,13 +358,10 @@ void MainWindow::SlotFileDecrypt(const QStringList& paths) { exec_operas_helper(tr("Decrypting"), contexts); } -void MainWindow::SlotFileSign(const QStringList& paths) { +void MainWindow::SlotFileSign(const QStringList& paths, bool ascii) { auto contexts = QSharedPointer<GpgOperaContextBasement>::create(); - bool const non_ascii_at_file_operation = - GetSettings().value("gnupg/non_ascii_at_file_operation", true).toBool(); - - contexts->ascii = !non_ascii_at_file_operation; + contexts->ascii = ascii; auto key_ids = m_key_list_->GetChecked(); contexts->keys = check_keys_helper( @@ -445,13 +438,9 @@ void MainWindow::SlotFileVerify(const QStringList& paths) { } } -void MainWindow::SlotFileEncryptSign(const QStringList& paths) { +void MainWindow::SlotFileEncryptSign(const QStringList& paths, bool ascii) { auto contexts = QSharedPointer<GpgOperaContextBasement>::create(); - - bool const non_ascii_at_file_operation = - GetSettings().value("gnupg/non_ascii_at_file_operation", true).toBool(); - - contexts->ascii = !non_ascii_at_file_operation; + contexts->ascii = ascii; auto key_ids = m_key_list_->GetChecked(); contexts->keys = check_keys_helper( @@ -491,7 +480,6 @@ void MainWindow::SlotFileEncryptSign(const QStringList& paths) { void MainWindow::SlotFileDecryptVerify(const QStringList& paths) { auto contexts = QSharedPointer<GpgOperaContextBasement>::create(); - contexts->ascii = true; if (!check_read_file_paths_helper(paths)) return; |