diff options
author | Saturn&Eric <[email protected]> | 2021-12-16 21:20:56 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-12-16 21:20:56 +0000 |
commit | 52ac9979bd8c4820a0034d619cb7d1d3e4105d8b (patch) | |
tree | c7524432467825603d83a17f398249d431c28b18 /src/ui/main_window/MainWindowUI.cpp | |
parent | Merge pull request #32 from saturneric/develop (diff) | |
parent | Fixed bugs & Improve Speed. (diff) | |
download | GpgFrontend-52ac9979bd8c4820a0034d619cb7d1d3e4105d8b.tar.gz GpgFrontend-52ac9979bd8c4820a0034d619cb7d1d3e4105d8b.zip |
Merge pull request #34 from saturneric/develop
v2.0.3
Diffstat (limited to 'src/ui/main_window/MainWindowUI.cpp')
-rw-r--r-- | src/ui/main_window/MainWindowUI.cpp | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/ui/main_window/MainWindowUI.cpp b/src/ui/main_window/MainWindowUI.cpp index a629057e..0c557d16 100644 --- a/src/ui/main_window/MainWindowUI.cpp +++ b/src/ui/main_window/MainWindowUI.cpp @@ -24,6 +24,7 @@ #include "MainWindow.h" #include "ui/UserInterfaceUtils.h" +#include "ui/smtp/SendMailDialog.h" namespace GpgFrontend::UI { @@ -276,19 +277,6 @@ void MainWindow::createActions() { connect(showKeyDetailsAct, SIGNAL(triggered()), this, SLOT(slotShowKeyDetails())); - refreshKeysFromKeyserverAct = - new QAction(_("Refresh Key From Key Server"), this); - refreshKeysFromKeyserverAct->setToolTip( - _("Refresh key from default key server")); - connect(refreshKeysFromKeyserverAct, SIGNAL(triggered()), this, - SLOT(refreshKeysFromKeyserver())); - - uploadKeyToServerAct = new QAction(_("Upload Public Key(s) To Server"), this); - uploadKeyToServerAct->setToolTip( - _("Upload The Selected Public Keys To Server")); - connect(uploadKeyToServerAct, SIGNAL(triggered()), this, - SLOT(uploadKeyToServer())); - /* Key-Shortcuts for Tab-Switchung-Action */ switchTabUpAct = new QAction(this); @@ -307,6 +295,15 @@ void MainWindow::createActions() { addPgpHeaderAct = new QAction(_("Add PGP Header"), this); connect(addPgpHeaderAct, SIGNAL(triggered()), this, SLOT(slotAddPgpHeader())); + +#ifdef SMTP_SUPPORT + sendMailAct = new QAction(_("Send An Email"), this); + sendMailAct->setIcon(QIcon(":email.png")); + connect(sendMailAct, &QAction::triggered, this, [=]() { + auto* dialog = new SendMailDialog({}, this); + dialog->show(); + }); +#endif } void MainWindow::createMenus() { @@ -363,6 +360,10 @@ void MainWindow::createMenus() { steganoMenu = menuBar()->addMenu(_("Steganography")); steganoMenu->addAction(cutPgpHeaderAct); steganoMenu->addAction(addPgpHeaderAct); +#ifdef SMTP_SUPPORT + emailMenu = menuBar()->addMenu(_("Email")); + emailMenu->addAction(sendMailAct); +#endif #ifdef ADVANCED_SUPPORT // Hide menu, when steganography menu is disabled in settings @@ -482,6 +483,8 @@ void MainWindow::createDockWindows() { !(key.revoked() || key.disabled() || key.expired()); }); + mKeyList->slotRefresh(); + keyListDock->setWidget(mKeyList); viewMenu->addAction(keyListDock->toggleViewAction()); |