diff options
-rw-r--r-- | gpgwin.cpp | 15 | ||||
-rw-r--r-- | gpgwin.h | 3 |
2 files changed, 17 insertions, 1 deletions
@@ -56,6 +56,7 @@ GpgWin::GpgWin() createDockWindows(); mKeyList->addMenuAction(appendSelectedKeysAct); + mKeyList->addMenuAction(showKeyDetailsAct); restoreSettings(); // open filename if provided as first command line parameter @@ -298,6 +299,10 @@ void GpgWin::createActions() appendSelectedKeysAct->setToolTip(tr("Append The Selected Keys To Text in Editor")); connect(appendSelectedKeysAct, SIGNAL(triggered()), this, SLOT(appendSelectedKeys())); + // TODO: find central place for shared actions, to avoid code-duplication with keymgmt.cpp + showKeyDetailsAct = new QAction(tr("Show Keydetails"), this); + showKeyDetailsAct->setToolTip(tr("Show Details for this Key")); + connect(showKeyDetailsAct, SIGNAL(triggered()), this, SLOT(showKeyDetails())); /** Key-Shortcuts for Tab-Switchung-Action */ @@ -732,11 +737,19 @@ void GpgWin::appendSelectedKeys() edit->curTextPage()->appendPlainText(*keyArray); } +void GpgWin::showKeyDetails() +{ + // TODO: first...? + gpgme_key_t key = mCtx->getKeyDetails(mKeyList->getSelected()->first()); + new KeyDetailsDialog(mCtx, key); +} + + void GpgWin::fileEncryption() { QStringList *keyList; keyList = mKeyList->getChecked(); - new FileEncryptionDialog(mCtx, iconPath, *keyList, this); + new FileEncryptionDialog(mCtx, iconPath, *keyList, this); } void GpgWin::openSettingsDialog() @@ -27,6 +27,7 @@ #include "attachments.h" #include "mime.h" #include "keymgmt.h" +#include "keydetailsdialog.h" #include "textedit.h" class QMainWindow; @@ -74,6 +75,7 @@ public slots: void importKeyDialog(); //void deleteSelectedKeys(); void appendSelectedKeys(); + void showKeyDetails(); void openKeyManagement(); void about(); void fileEncryption(); @@ -127,6 +129,7 @@ private: QAction *importKeyFromEditAct; QAction *importKeyFromClipboardAct; QAction *appendSelectedKeysAct; + QAction *showKeyDetailsAct; QAction *openKeyManagementAct; QAction *copyAct; QAction *quoteAct; |