aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-08-18 23:37:41 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-08-18 23:37:41 +0000
commit1c20e7187fa2022da66559a498dd643cd7381c16 (patch)
treece0835996a26fb3e8baedc538ea3fe22154f5764
parentadd almost unconfigured doxygen conf-file, which outputs qch for qtcreator (diff)
downloadgpg4usb-1c20e7187fa2022da66559a498dd643cd7381c16.tar.gz
gpg4usb-1c20e7187fa2022da66559a498dd643cd7381c16.zip
changed verifylabellist back to one verifylabel and updated TODO
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@516 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r--TODO59
-rw-r--r--context.cpp3
-rw-r--r--gpgwin.cpp9
-rw-r--r--keyserverimportdialog.cpp8
-rw-r--r--release/css/default.css6
-rw-r--r--verifynotification.cpp46
-rw-r--r--verifynotification.h35
7 files changed, 70 insertions, 96 deletions
diff --git a/TODO b/TODO
index e608723..e6e9597 100644
--- a/TODO
+++ b/TODO
@@ -1,7 +1,40 @@
TODO:
-----
Release 0.3.1
+- export key: default filename to <keyowner-name>.asc
+- make email adress from keylist copyable
+- show keydetails-dialog in keylist on mainwindow [DONE]
+- key should blink short in keylist after import
+- show keys which verified message in different colour
+- css
+- save the last used directory in open file dialog
+- set gpgme error language to chosen language (context.cpp:49)
+- in verifycation dialog import multiple keys
+- inform user about verification errors
+- enum for verify status
+- put sign/verify to toolbar and add shortcuts
+
+BUGS:
+- Sometimes two or more stars are shown at modified documents
+- enter "satan" keyserverimport and it crashes [DONE]
+- what should be shown in verify message?
+- show, if message is partially verified(how)?
+
+Release 0.3.2
+- check and add missing statusbar messages
+- set mainwindow-statusbar text via signal
- more doku on building gpg4usb (especially on windows)
+- check class / includes
+- check pointer usage (const/references)
+- add posibility to change password of key
+- make keylist browsable with keyboard
+- update gpgme-library
+- Change Keytable sorting: private keys should always be on top (partially solving "encrypt to self")
+- clean header if quoted printable decoded
+- PGP-MIME, find and show inline encrypted files
+ - attachments-widget should be inlined in editor-tabs
+- Settings-Dialog:
+ - add tab for editor options, like font-size, line-break, tab-width, line-numbers,..
- remember Password:
- checkbox in password dialog to remember password
- Timer to remember password for x minutes?
@@ -15,32 +48,6 @@ attachments:
- decrypting
- encrypting
- status-tip "saved file" when saving file for "open with" [DONE]
-- Settings-Dialog:
- - add tab for editor options, like font-size, line-break, tab-width, line-numbers,..
-- update gpgme-library
-- clean header if quoted printable decoded
-- add posibility to change password of key
-- check and add missing statusbar messages
-- make keylist browsabel with keyboard
-- check class / includes
-- check pointer usage (const/references)
-- Change Keytable sorting: private keys should always be on top (partially solving "encrypt to self")
-- PGP-MIME, find and show inline encrypted files
- - attachments-widget should be inlined in editor-tabs
-- export key: default filename to <keyowner-name>.asc
-- show keydetails-dialog in keylist on mainwindow [DONE]
-- make email adress from keylist copyable
-- key should blink short in keylist after import
-- show keys which verified message in different colour
-- css
-- save the last used directory in open file dialog
-- move attachmentswidget to editorpage
-BUGS:
-- Sometimes two or more stars are shown at modified documents
-- enter "satann keyserverimport and it crashes
-- what should be shown in verify message?
-- show, if message is partially verified(how)?
-
Release 0.4
- adding signing and verifying
- nice for verify: import key from keyserver
diff --git a/context.cpp b/context.cpp
index 903ddd0..c6f2dd4 100644
--- a/context.cpp
+++ b/context.cpp
@@ -497,9 +497,10 @@ void Context::executeGpgCommand(QStringList arguments, QByteArray *stdOut, QByte
/***
- * return type should contain:
+ * TODO: return type should contain:
* -> list of sigs
* -> valid
+ * -> errors
*/
gpgme_signature_t Context::verify(QByteArray inBuffer) {
diff --git a/gpgwin.cpp b/gpgwin.cpp
index 529184b..923d2ab 100644
--- a/gpgwin.cpp
+++ b/gpgwin.cpp
@@ -726,6 +726,7 @@ int GpgWin::isSigned(const QByteArray &text) {
void GpgWin::verify()
{
+ QString status="ok";
QByteArray text = edit->curTextPage()->toPlainText().toAscii(); // TODO: toUtf8() here?
preventNoDataErr(&text);
@@ -756,6 +757,7 @@ void GpgWin::verify()
while (sign) {
verifyDetailText->append(tr("Fingerprint: ")+QString(sign->fpr)+"\n");
if (gpg_err_code(sign->status) == 9) {
+ status="warning";
verifyLabelText.append(tr("Key not present with Fingerprint: ")+QString(sign->fpr));
*vn->keysNotInList << sign->fpr;
@@ -784,7 +786,7 @@ void GpgWin::verify()
qDebug() << "sig validity reason: " << sign->validity_reason << " - " << gpg_err_code(sign->validity_reason) << " - " << gpgme_strerror(sign->validity_reason);
sign = sign->next;
}
- //vn->setVerifyDetailText(*verifyDetailText);
+ vn->setVerifyDetailText(*verifyDetailText);
// If an unknown key is found, enable the importfromkeyserveraction
if (unknownKeyFound) {
@@ -795,11 +797,8 @@ void GpgWin::verify()
// Remove the last linebreak
verifyLabelText.remove(verifyLabelText.length()-1,1);
- vn->addVerifyLabel(verifyLabelText,"ok");
- vn->addVerifyLabel(verifyLabelText,"warning");
- vn->addVerifyLabel(verifyLabelText,"critical");
-// vn->setVerifyLabel(verifyLabelText);
+ vn->setVerifyLabel(verifyLabelText,status);
edit->curPage()->showNotificationWidget(vn, "verifyNotification");
}
diff --git a/keyserverimportdialog.cpp b/keyserverimportdialog.cpp
index 3917817..9639965 100644
--- a/keyserverimportdialog.cpp
+++ b/keyserverimportdialog.cpp
@@ -176,8 +176,10 @@ void KeyServerImportDialog::searchFinished()
if (line[0] == "pub") {
keysTable->setRowCount(row+1);
QStringList line2 = QString(searchreply->readLine()).split(":");
- QTableWidgetItem *uid = new QTableWidgetItem(line2[1]);
- keysTable->setItem(row, 0, uid);
+ if (line2.size() > 1) {
+ QTableWidgetItem *uid = new QTableWidgetItem(line2[1]);
+ keysTable->setItem(row, 0, uid);
+ }
QTableWidgetItem *creationdate = new QTableWidgetItem(QDateTime::fromTime_t(line[4].toInt()).toString("dd. MMM. yyyy"));
keysTable->setItem(row, 1, creationdate);
QTableWidgetItem *keyid = new QTableWidgetItem(line[1]);
@@ -220,7 +222,6 @@ void KeyServerImportDialog::import()
void KeyServerImportDialog::import(QString keyId)
{
- qDebug() << keyId;
QUrl url = "http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x"+keyId+"&options=mr";
importreply = qnam.get(QNetworkRequest(url));
connect(importreply, SIGNAL(finished()),
@@ -232,7 +233,6 @@ void KeyServerImportDialog::importFinished()
QByteArray *key = new QByteArray();
key->append(importreply->readAll());
- // TODO: die liste erstmal leeren, bevor sie neu betankt wird
QVariant redirectionTarget = importreply->attribute(QNetworkRequest::RedirectionTargetAttribute);
if (importreply->error()) {
setMessage(tr("Error while contacting keyserver!"),true);
diff --git a/release/css/default.css b/release/css/default.css
index 2709ac2..31533f4 100644
--- a/release/css/default.css
+++ b/release/css/default.css
@@ -8,8 +8,10 @@
font: bold;
}
*/
+
+*[keyNotFound="true"] { background-color: yellow }
+*[keyFound="true"] { background-color: green }
QLabel#warning { background-color: #ececba }
QLabel#ok { background-color: #ccffcc }
QLabel#critical { background-color: #ff8080 }
-*[keyNotFound="true"] { background-color: yellow }
-*[keyFound="true"] { background-color: green }
+
diff --git a/verifynotification.cpp b/verifynotification.cpp
index 25cbc4e..67efe89 100644
--- a/verifynotification.cpp
+++ b/verifynotification.cpp
@@ -5,64 +5,37 @@ VerifyNotification::VerifyNotification(GpgME::Context *ctx, QWidget *parent ) :
QWidget(parent)
{
mCtx = ctx;
-
- //text shown in verify notification
verifyLabel = new QLabel(this);
- // QLabel *verifyLabel2 = new QLabel(this);
- // verifyLabel2->setText("hallo");
-
- // Text contained in detilsdialog
verifyDetailText = new QString();
- // List kontaining the signature keys not contained in keylist
- keysNotInList = new QStringList();
-
importFromKeyserverAct = new QAction(tr("Import missing key from Keyserver"), this);
connect(importFromKeyserverAct, SIGNAL(triggered()), this, SLOT(importFromKeyserver()));
showVerifyDetailsAct = new QAction(tr("Show detailed verify information"), this);
connect(showVerifyDetailsAct, SIGNAL(triggered()), this, SLOT(showVerifyDetails()));
- // Menu for the details button
detailMenu = new QMenu(this);
detailMenu->addAction(showVerifyDetailsAct);
detailMenu->addAction(importFromKeyserverAct);
importFromKeyserverAct->setVisible(false);
- // the details button
+ keysNotInList = new QStringList();
+
detailsButton = new QPushButton("Details",this);
detailsButton->setMenu(detailMenu);
- verifyLabelList = new QWidget(this);
- verifyLabelListLayout = new QVBoxLayout(this);
- verifyLabelList->setLayout(verifyLabelListLayout);
- //addVerifyLabel(verifyLabel->text(),QString("ok"));
- verifyLabel->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
-// verifyLabelListLayout->addWidget(verifyLabel2);
- //verifyLabel2->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
notificationWidgetLayout = new QHBoxLayout(this);
- verifyLabelListLayout->setContentsMargins(0,0,0,0);
notificationWidgetLayout->setContentsMargins(0,0,0,0);
- notificationWidgetLayout->addWidget(verifyLabelList);
+ notificationWidgetLayout->addWidget(verifyLabel,2);
notificationWidgetLayout->addWidget(detailsButton);
- detailsButton->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
this->setLayout(notificationWidgetLayout);
-}
-
-void VerifyNotification::addVerifyLabel(QString text, QString status)
-{
- QLabel *label = new QLabel(text);
- label->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
-// label->setContentsMargins(0,0,0,0);
-
- verifyLabelListLayout->addWidget(label);
- label->setObjectName(status);
}
-void VerifyNotification::setVerifyLabel(QString text)
+void VerifyNotification::setVerifyDetailText (QString text)
{
- verifyLabel->setText(text);
+ verifyDetailText->clear();
+ verifyDetailText->append(text);
return;
}
@@ -74,6 +47,13 @@ void VerifyNotification::importFromKeyserver()
}
}
+void VerifyNotification::setVerifyLabel(QString text, QString status)
+{
+ verifyLabel->setText(text);
+ verifyLabel->setObjectName(status);
+ return;
+}
+
void VerifyNotification::showImportAction()
{
importFromKeyserverAct->setVisible(true);
diff --git a/verifynotification.h b/verifynotification.h
index 2da80bd..289ccbb 100644
--- a/verifynotification.h
+++ b/verifynotification.h
@@ -26,7 +26,7 @@ public:
* Return Values: none
* Change on members: none
*/
- void setVerifyLabel(QString text);
+ void setVerifyLabel(QString text, QString status);
/****************************************************************************************
* Name: showImportAction
* Description: show the action in detailsmenu
@@ -35,7 +35,6 @@ public:
* Change on members: none
*/
void showImportAction();
-
/****************************************************************************************
* Name: hideImportAction
* Description: hide the action in detailsmenu
@@ -46,41 +45,27 @@ public:
void hideImportAction();
/****************************************************************************************
- * Name: addVerifyLabel
- * Description: add the Label labeled "text" to verifylabellist
- * Parameters: QString containing the text and
- * status string (should be "ok","warning", or "critical")
+ * Name: setVerifyDetailText
+ * Description: set the text of verify-detail dialog
+ * Parameters: QString containing the text
* Return Values: none
- * Change on members: Label is added to verifyList
+ * Change on members: verifyDetailText changes to text
*/
- void addVerifyLabel(QString text, QString status);
+ void setVerifyDetailText(QString text);
/****************************************************************************************
* Name: keysNotInList
* Description: List holding the keys in signature, which are not in the keylist
*/
QStringList *keysNotInList;
- QWidget *verifyLabelList;
- QVBoxLayout *verifyLabelListLayout;
+ // set text shown in verifydetails dialog
+
signals:
public slots:
- /****************************************************************************************
- * Name: importFromKeyserver
- * Description: import signaturekey missing in keylist from keyserver
- * Parameters: none
- * Return Values: none
- * Change on members: none
- */
+ // import missing key from keyserver
void importFromKeyserver();
-
- /****************************************************************************************
- * Name: showVerifyDetails
- * Description: show verify details dialog
- * Parameters: none
- * Return Values: none
- * Change on members: none
- */
+ // show verify details
void showVerifyDetails();
private: