diff options
author | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2012-03-05 21:55:53 +0000 |
---|---|---|
committer | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2012-03-05 21:55:53 +0000 |
commit | ed50d33d6837bc6adc25d614fce6195f19027ab0 (patch) | |
tree | bcf08e22ebc44f4121a479388711b7c73e67b150 | |
parent | show password dialog in middle of app window (diff) | |
download | gpg4usb-ed50d33d6837bc6adc25d614fce6195f19027ab0.tar.gz gpg4usb-ed50d33d6837bc6adc25d614fce6195f19027ab0.zip |
added refresh keys from keyserver to keylist
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@844 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r-- | mainwindow.cpp | 17 | ||||
-rw-r--r-- | mainwindow.h | 2 |
2 files changed, 18 insertions, 1 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp index 2e067dc..6c462e2 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -56,7 +56,7 @@ MainWindow::MainWindow() mKeyList->addMenuAction(appendSelectedKeysAct); mKeyList->addMenuAction(copyMailAddressToClipboardAct); mKeyList->addMenuAction(showKeyDetailsAct); - + mKeyList->addMenuAction(refreshKeysFromKeyserverAct); restoreSettings(); // open filename if provided as first command line parameter @@ -350,6 +350,10 @@ void MainWindow::createActions() showKeyDetailsAct->setToolTip(tr("Show Details for this Key")); connect(showKeyDetailsAct, SIGNAL(triggered()), this, SLOT(showKeyDetails())); + 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); @@ -892,6 +896,17 @@ void MainWindow::showKeyDetails() } } +void MainWindow::refreshKeysFromKeyserver() +{ + if (mKeyList->getSelected()->isEmpty()) { + return; + } + + KeyServerImportDialog *ksid = new KeyServerImportDialog(mCtx,mKeyList,this); + ksid->import(*mKeyList->getSelected()); + +} + void MainWindow::fileEncryption() { QStringList *keyList; diff --git a/mainwindow.h b/mainwindow.h index 8c0bcee..3d21bb2 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -106,6 +106,7 @@ private slots: void showKeyDetails(); + void refreshKeysFromKeyserver(); void startWizard(); @@ -313,6 +314,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 */ |