diff options
author | saturneric <[email protected]> | 2024-11-26 16:35:25 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-11-26 16:35:25 +0000 |
commit | 6829d8ae46443f8ec2735ea8bff6306d8242309a (patch) | |
tree | 98119ec64cce3cfdbc79b13e5a27830962033168 /src/ui/widgets/FilePage.cpp | |
parent | fix: change "Information Board" to "Status Panel" (diff) | |
download | GpgFrontend-6829d8ae46443f8ec2735ea8bff6306d8242309a.tar.gz GpgFrontend-6829d8ae46443f8ec2735ea8bff6306d8242309a.zip |
fix: add ui status control for email operations
Diffstat (limited to '')
-rw-r--r-- | src/ui/widgets/FilePage.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/ui/widgets/FilePage.cpp b/src/ui/widgets/FilePage.cpp index b08a2153..4d9ce26a 100644 --- a/src/ui/widgets/FilePage.cpp +++ b/src/ui/widgets/FilePage.cpp @@ -124,8 +124,8 @@ void FilePage::keyPressEvent(QKeyEvent* event) { } void FilePage::update_main_basical_opera_menu(const QString& selected_path) { - MainWindow::CryptoMenu::OperationType operation_type = - MainWindow::CryptoMenu::None; + MainWindow::OperationMenu::OperationType operation_type = + MainWindow::OperationMenu::kNone; // abort... if (selected_path.isEmpty()) return; @@ -135,29 +135,33 @@ void FilePage::update_main_basical_opera_menu(const QString& selected_path) { if ((info.isDir() || info.isFile()) && (info.suffix() != "gpg" && info.suffix() != "pgp" && info.suffix() != "sig" && info.suffix() != "asc")) { - operation_type |= MainWindow::CryptoMenu::Encrypt; + operation_type |= MainWindow::OperationMenu::kEncrypt; } if ((info.isDir() || info.isFile()) && (info.suffix() != "gpg" && info.suffix() != "pgp" && info.suffix() != "sig" && info.suffix() != "asc")) { - operation_type |= MainWindow::CryptoMenu::EncryptAndSign; + operation_type |= MainWindow::OperationMenu::kEncryptAndSign; } if (info.isFile() && (info.suffix() == "gpg" || info.suffix() == "pgp" || info.suffix() == "asc")) { - operation_type |= MainWindow::CryptoMenu::Decrypt; - operation_type |= MainWindow::CryptoMenu::DecryptAndVerify; + operation_type |= MainWindow::OperationMenu::kDecrypt; + operation_type |= MainWindow::OperationMenu::kDecryptAndVerify; } if (info.isFile() && (info.suffix() != "gpg" && info.suffix() != "pgp" && info.suffix() != "sig" && info.suffix() != "asc")) { - operation_type |= MainWindow::CryptoMenu::Sign; + operation_type |= MainWindow::OperationMenu::kSign; } if (info.isFile() && (info.suffix() == "sig" || info.suffix() == "gpg" || info.suffix() == "pgp" || info.suffix() == "asc")) { - operation_type |= MainWindow::CryptoMenu::Verify; + operation_type |= MainWindow::OperationMenu::kVerify; + } + + if (info.isFile() && (info.suffix() == "eml")) { + operation_type |= MainWindow::OperationMenu::kVerifyEMail; } emit SignalMainWindowlUpdateBasicalOperaMenu(operation_type); |