diff options
author | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-08-08 20:01:02 +0000 |
---|---|---|
committer | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-08-08 20:01:02 +0000 |
commit | 188282cd21fccce9f67a180d499e2cb875a5f938 (patch) | |
tree | a8f976006e0a15e749e63607c79e154c4b350ea8 /verifynotification.cpp | |
parent | changed removeNoteByClassname to hideNoteByClassname since remove doesn't work (diff) | |
download | gpg4usb-188282cd21fccce9f67a180d499e2cb875a5f938.tar.gz gpg4usb-188282cd21fccce9f67a180d499e2cb875a5f938.zip |
only show import key action in verificynotification-menu when theres missing key on verify
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@510 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'verifynotification.cpp')
-rw-r--r-- | verifynotification.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/verifynotification.cpp b/verifynotification.cpp index b9db071..b96615a 100644 --- a/verifynotification.cpp +++ b/verifynotification.cpp @@ -13,11 +13,16 @@ VerifyNotification::VerifyNotification(GpgME::Context *ctx, QWidget *parent ) : this->setLayout(notificationWidgetLayout); - QAction *importFromKeyserverAct = new QAction(tr("Import missing key from Keyserver"), this); + importFromKeyserverAct = new QAction(tr("Import missing key from Keyserver"), this); connect(importFromKeyserverAct, SIGNAL(triggered()), this, SLOT(importFromKeyserver())); - QMenu *detailMenu = new QMenu(this); + showVerifyDetailsAct = new QAction(tr("Show detailed verify information"), this); + connect(showVerifyDetailsAct, SIGNAL(triggered()), this, SLOT(showVerifyDetails())); + + detailMenu = new QMenu(this); + detailMenu->addAction(showVerifyDetailsAct); detailMenu->addAction(importFromKeyserverAct); + importFromKeyserverAct->setVisible(false); keysNotInList = new QStringList(); QPushButton *verifyButton = new QPushButton("Details",this); verifyButton->setMenu(detailMenu); @@ -36,3 +41,20 @@ void VerifyNotification::setVerifyLabel(QString text) verifyLabel->setText(text); return; } + +void VerifyNotification::addImportAction() +{ + importFromKeyserverAct->setVisible(true); + return; +} +void VerifyNotification::removeImportAction() +{ + importFromKeyserverAct->setVisible(false); + return; +} + +void VerifyNotification::showVerifyDetails() +{ + QMessageBox::information(this,tr("Details"),tr("key verified"),QMessageBox::Cancel | QMessageBox::Ok); + return; +} |