aboutsummaryrefslogtreecommitdiffstats
path: root/verifynotification.cpp
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-08-08 20:01:02 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-08-08 20:01:02 +0000
commit188282cd21fccce9f67a180d499e2cb875a5f938 (patch)
treea8f976006e0a15e749e63607c79e154c4b350ea8 /verifynotification.cpp
parentchanged removeNoteByClassname to hideNoteByClassname since remove doesn't work (diff)
downloadgpg4usb-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.cpp26
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;
+}