diff options
author | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-10-15 20:24:52 +0000 |
---|---|---|
committer | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-10-15 20:24:52 +0000 |
commit | 814e9c33ecdc558af6fb9b7ff6e37d38772a5b10 (patch) | |
tree | 83da0d93e437eab70c421158afbb58a0a63e08d4 /verifynotification.cpp | |
parent | fix 'objectname not set' warning (diff) | |
download | gpg4usb-814e9c33ecdc558af6fb9b7ff6e37d38772a5b10.tar.gz gpg4usb-814e9c33ecdc558af6fb9b7ff6e37d38772a5b10.zip |
verifydetaildialog and verifynotification are refreshed, when keydb changed
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@551 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to '')
-rw-r--r-- | verifynotification.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/verifynotification.cpp b/verifynotification.cpp index 1c4b55d..40d5604 100644 --- a/verifynotification.cpp +++ b/verifynotification.cpp @@ -63,19 +63,24 @@ void VerifyNotification::importFromKeyserver() void VerifyNotification::setVerifyLabel(QString text, verify_label_status verifyLabelStatus) { + QString color; verifyLabel->setText(text); switch (verifyLabelStatus) { - case VERIFY_ERROR_OK: verifyLabel->setObjectName("ok"); + case VERIFY_ERROR_OK: color="#ccffcc"; break; - case VERIFY_ERROR_WARN: verifyLabel->setObjectName("warning"); + case VERIFY_ERROR_WARN: color="#ececba"; break; - case VERIFY_ERROR_CRITICAL: verifyLabel->setObjectName("critical"); + case VERIFY_ERROR_CRITICAL: color="#ff8080"; break; default: break; } - return; -} + + verifyLabel->setAutoFillBackground(true); + QPalette status = verifyLabel->palette(); + status.setColor(QPalette::Background, color); + verifyLabel->setPalette(status); +} void VerifyNotification::showImportAction(bool visible) { @@ -158,6 +163,6 @@ bool VerifyNotification::refresh() verifyLabelText.remove(verifyLabelText.length()-1,1); this->setVerifyLabel(verifyLabelText,verifyStatus); - + qDebug() << verifyStatus; return true; } |