diff options
author | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-01-30 18:12:45 +0000 |
---|---|---|
committer | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-01-30 18:12:45 +0000 |
commit | a1bb46908aae127d00e4ce4b3e9a37c00c565259 (patch) | |
tree | b941c012881372087bb7f36df8a19b48856efe2f /gpgwin.cpp | |
parent | another todo item (diff) | |
download | gpg4usb-a1bb46908aae127d00e4ce4b3e9a37c00c565259.tar.gz gpg4usb-a1bb46908aae127d00e4ce4b3e9a37c00c565259.zip |
keydetailsdialog in gpgwin
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@462 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'gpgwin.cpp')
-rw-r--r-- | gpgwin.cpp | 15 |
1 files changed, 14 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() |