diff options
author | saturneric <[email protected]> | 2023-12-28 06:32:49 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-12-28 06:32:49 +0000 |
commit | 300e55bf5bddc393de050c2ca9a0356fce9a8a9d (patch) | |
tree | 8332e6b50158718ad98c954302951668a57712a8 /src/ui/main_window/MainWindowSlotFunction.cpp | |
parent | feat: avoid reading entire file to memory (diff) | |
download | GpgFrontend-300e55bf5bddc393de050c2ca9a0356fce9a8a9d.tar.gz GpgFrontend-300e55bf5bddc393de050c2ca9a0356fce9a8a9d.zip |
feat: add simple archiving functions for encrypt and decrypt
Diffstat (limited to 'src/ui/main_window/MainWindowSlotFunction.cpp')
-rw-r--r-- | src/ui/main_window/MainWindowSlotFunction.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ui/main_window/MainWindowSlotFunction.cpp b/src/ui/main_window/MainWindowSlotFunction.cpp index 191e80cb..444fe54a 100644 --- a/src/ui/main_window/MainWindowSlotFunction.cpp +++ b/src/ui/main_window/MainWindowSlotFunction.cpp @@ -59,9 +59,9 @@ namespace GpgFrontend::UI { /** * Encrypt Entry(Text & File) */ -void MainWindow::slot_encrypt() { - if (edit_->TabCount() == 0 || edit_->SlotCurPageTextEdit() == nullptr) { - if (edit_->SlotCurPageFileTreeView() != nullptr) this->SlotFileEncrypt(); +void MainWindow::SlotEncrypt() { + if (edit_->SlotCurPageTextEdit() == nullptr) { + // ignore return; } @@ -209,9 +209,8 @@ void MainWindow::slot_sign() { }); } -void MainWindow::slot_decrypt() { - if (edit_->TabCount() == 0 || edit_->SlotCurPageTextEdit() == nullptr) { - if (edit_->SlotCurPageFileTreeView() != nullptr) this->SlotFileDecrypt(); +void MainWindow::SlotDecrypt() { + if (edit_->SlotCurPageTextEdit() == nullptr) { return; } |