aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/main_window/MainWindowSlotFunction.cpp
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2021-07-16 10:44:24 +0000
committerGitHub <[email protected]>2021-07-16 10:44:24 +0000
commit9601cb5a96bbd59c7e4dd9ba9e74d26e8e50e8ee (patch)
tree8a90600e52122cc9d45e231fc562ae1e4d380e04 /src/ui/main_window/MainWindowSlotFunction.cpp
parentMerge branch 'develop' into main (diff)
parentImprove the function of sending mail; (diff)
downloadGpgFrontend-9601cb5a96bbd59c7e4dd9ba9e74d26e8e50e8ee.tar.gz
GpgFrontend-9601cb5a96bbd59c7e4dd9ba9e74d26e8e50e8ee.zip
Merge pull request #13 from saturneric/developv1.2.1
Version 1.2.1
Diffstat (limited to 'src/ui/main_window/MainWindowSlotFunction.cpp')
-rw-r--r--src/ui/main_window/MainWindowSlotFunction.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/ui/main_window/MainWindowSlotFunction.cpp b/src/ui/main_window/MainWindowSlotFunction.cpp
index 0bddb9b2..8a4b786e 100644
--- a/src/ui/main_window/MainWindowSlotFunction.cpp
+++ b/src/ui/main_window/MainWindowSlotFunction.cpp
@@ -23,6 +23,7 @@
*/
#include "MainWindow.h"
+#include "ui/SendMailDialog.h"
void MainWindow::slotEncrypt() {
@@ -83,6 +84,19 @@ void MainWindow::slotEncrypt() {
else
infoBoard->slotRefresh(reportText, INFO_ERROR_WARN);
+ if (resultAnalyse->getStatus() >= 0) {
+ infoBoard->resetOptionActionsMenu();
+ infoBoard->addOptionalAction("Send Mail", [this]() {
+ if(settings.value("sendMail/enable", false).toBool())
+ new SendMailDialog(edit->curTextPage()->toPlainText(), this);
+ else {
+ QMessageBox::warning(nullptr,
+ tr("Function Disabled"),
+ tr("Please go to the settings interface to enable and configure this function."));
+ }
+ });
+ }
+
delete resultAnalyse;
} else if (edit->slotCurPageFileTreeView() != nullptr) {
this->slotFileEncrypt();
@@ -344,6 +358,19 @@ void MainWindow::slotEncryptSign() {
else
infoBoard->slotRefresh(reportText, INFO_ERROR_WARN);
+ if (status >= 0) {
+ infoBoard->resetOptionActionsMenu();
+ infoBoard->addOptionalAction("Send Mail", [this]() {
+ if(settings.value("sendMail/enable", false).toBool())
+ new SendMailDialog(edit->curTextPage()->toPlainText(), this);
+ else {
+ QMessageBox::warning(nullptr,
+ tr("Function Disabled"),
+ tr("Please go to the settings interface to enable and configure this function."));
+ }
+ });
+ }
+
delete resultAnalyseEncr;
delete resultAnalyseSign;
} else if (edit->slotCurPageFileTreeView() != nullptr) {