diff options
author | Nils Achtergarde <[email protected]> | 2017-12-30 19:36:01 +0000 |
---|---|---|
committer | Nils Achtergarde <[email protected]> | 2017-12-30 19:36:01 +0000 |
commit | d4cd516e452d730dcfc80d338814ad294f328262 (patch) | |
tree | 4353e3dca86185f33ad6daf0df3a2da287bf4d6d | |
parent | added script to build gpg4usb for 64bit linux (diff) | |
download | gpg4usb-d4cd516e452d730dcfc80d338814ad294f328262.tar.gz gpg4usb-d4cd516e452d730dcfc80d338814ad294f328262.zip |
recommitted added refresh keys from keyserver to keylist ed50d33d6837bc6adc25d614fce6195f19027ab0
-rw-r--r-- | mainwindow.cpp | 20 | ||||
-rw-r--r-- | mainwindow.h | 3 |
2 files changed, 21 insertions, 2 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp index 63861d1..efbb6a0 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -59,7 +59,8 @@ MainWindow::MainWindow() mKeyList->addMenuAction(appendSelectedKeysAct); mKeyList->addMenuAction(copyMailAddressToClipboardAct); mKeyList->addMenuAction(showKeyDetailsAct); - + mKeyList->addMenuAction(refreshKeysFromKeyserverAct); + restoreSettings(); // open filename if provided as first command line parameter @@ -358,7 +359,11 @@ void MainWindow::createActions() showKeyDetailsAct->setToolTip(tr("Show Details for this Key")); connect(showKeyDetailsAct, SIGNAL(triggered()), this, SLOT(slotShowKeyDetails())); - /* Key-Shortcuts for Tab-Switchung-Action + refreshKeysFromKeyserverAct = new QAction(tr("Refresh key from keyserver"), this); + refreshKeysFromKeyserverAct->setToolTip(tr("Refresh key from default keyserver")); + connect(refreshKeysFromKeyserverAct, SIGNAL(triggered()), this, SLOT(refreshKeysFromKeyserver())); + + /* Key-Shortcuts for Tab-Switchung-Action */ switchTabUpAct = new QAction(this); switchTabUpAct->setShortcut(QKeySequence::NextChild); @@ -916,6 +921,17 @@ void MainWindow::slotShowKeyDetails() new KeyDetailsDialog(mCtx, key, this); } } +void MainWindow::refreshKeysFromKeyserver() +{ + if (mKeyList->getSelected()->isEmpty()) { + return; + } + + KeyServerImportDialog *ksid = new KeyServerImportDialog(mCtx,mKeyList,this); + ksid->import(*mKeyList->getSelected()); + +} + void MainWindow::slotFileEncryption() { diff --git a/mainwindow.h b/mainwindow.h index 2d6f855..6feeec6 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -107,6 +107,8 @@ private slots: void slotShowKeyDetails(); + void refreshKeysFromKeyserver(); + /** * @details Open find widget. */ @@ -330,6 +332,7 @@ private: QAction *openTutorialAct; /** Action to open tutorial */ QAction *openHelpAct; /** Action to open tutorial */ QAction *showKeyDetailsAct; /** Action to open key-details dialog */ + QAction *refreshKeysFromKeyserverAct; /** Action to refresh a key from keyserver */ QAction *startWizardAct; /** Action to open the wizard */ QAction *cutPgpHeaderAct; /** Action for cutting the PGP header */ QAction *addPgpHeaderAct; /** Action for adding the PGP header */ |