aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-08-03 07:28:53 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-08-03 07:28:53 +0000
commit2615bcb97c94f7d045d934c766d63a4aea97f03a (patch)
tree3318e85b3204e05183025602f46de875e5a47916
parentadded import from keyserver to keymgmt (diff)
downloadgpg4usb-2615bcb97c94f7d045d934c766d63a4aea97f03a.tar.gz
gpg4usb-2615bcb97c94f7d045d934c766d63a4aea97f03a.zip
css for verifynotification
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@508 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r--TODO15
-rw-r--r--editorpage.cpp20
-rw-r--r--editorpage.h3
-rw-r--r--gpgwin.cpp5
-rw-r--r--main.cpp10
-rw-r--r--release/css/default.css5
-rw-r--r--verifynotification.cpp2
7 files changed, 35 insertions, 25 deletions
diff --git a/TODO b/TODO
index d02ee4f..90f4477 100644
--- a/TODO
+++ b/TODO
@@ -1,16 +1,5 @@
TODO:
-----
-Release 0.3
-- add quote button [DONE]
-- fix overwrite file bug in file encryption [DONE]
-- add drag'n'drop features for keys [DONE]
-- list keys to delete in warning dialog [DONE]
-- undoable encrypt and decrypt [DONE]
-- updated the windows qt libraries to 4.7 [DONE]
-- added tabs, including quitdialog listing modified files [DONE]
-- list keys to delete in warning dialog [DONE]
-- decryption of empty messages is possible now [DONE]
-
Release 0.3.1
- more doku on building gpg4usb (especially on windows)
- remember Password:
@@ -41,6 +30,10 @@ attachments:
- 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
+
BUGS:
- Sometimes two or more stars are shown at modified documents
diff --git a/editorpage.cpp b/editorpage.cpp
index 7680c36..7725e02 100644
--- a/editorpage.cpp
+++ b/editorpage.cpp
@@ -41,7 +41,6 @@ EditorPage::EditorPage(const QString &filePath, QWidget *parent) : QWidget(paren
textPage->setFocus();
}
-
const QString& EditorPage::getFilePath() const
{
return fullFilePath;
@@ -53,19 +52,30 @@ QPlainTextEdit* EditorPage::getTextPage()
return textPage;
}
-
void EditorPage::setFilePath(const QString &filePath)
{
fullFilePath = filePath;
}
-void EditorPage::showNotificationWidget(QWidget *widget)
+void EditorPage::showNotificationWidget(QWidget *widget, const char *className)
{
- //notificationWidget = widget;
- //notificationWidget->show();
+ widget->setProperty(className,true);
+ qDebug() << "bla2" << widget->property(className);
+
mainLayout->addWidget(widget);
}
+void EditorPage::removeNoteByClass(const char *className) {
+ qDebug() << "length:" << this->children().length();
+
+ foreach(QObject *tmp, this->children()) {
+ qDebug() << "bla" << tmp->property(className);
+ if (tmp->property(className) == true) {
+ mainLayout->removeWidget(qobject_cast <QWidget*> (tmp));
+ }
+ }
+}
+
void EditorPage::showVerifyLabel(bool showLabel)
{
if (showLabel == true) {
diff --git a/editorpage.h b/editorpage.h
index 9f8144c..a879704 100644
--- a/editorpage.h
+++ b/editorpage.h
@@ -38,7 +38,8 @@ public:
void setFilePath(const QString &filePath);
QPlainTextEdit *getTextPage();
void showVerifyLabel(bool showLabel);
- void showNotificationWidget(QWidget *widget);
+ void showNotificationWidget(QWidget *widget, const char *className);
+ void removeNoteByClass(const char *className);
private:
QPlainTextEdit *textPage;
diff --git a/gpgwin.cpp b/gpgwin.cpp
index 8ff869c..226f71b 100644
--- a/gpgwin.cpp
+++ b/gpgwin.cpp
@@ -753,6 +753,7 @@ void GpgWin::verify()
qDebug() << "sign->fpr:" << sign->fpr;
verifyLabelText.append(" not present.");
*vn->keysNotInList << sign->fpr;
+ vn->setProperty("keyNotFound", true);
} else {
QString name = mKeyList->getKeyNameByFpr(sign->fpr);
QString email = "<"+mKeyList->getKeyEmailByFpr(sign->fpr)+">";
@@ -762,6 +763,7 @@ void GpgWin::verify()
verifyLabelText.append(name);
verifyLabelText.append(email);
verifyLabelText.append(gpg_strerror(sign->status));
+ vn->setProperty("keyFound", true);
}
verifyLabelText.append(".\n");
qDebug() << "sig summary: " << sign->summary;
@@ -775,7 +777,8 @@ void GpgWin::verify()
verifyLabelText.remove(verifyLabelText.length()-1,1);
vn->setVerifyLabel(verifyLabelText);
- edit->curPage()->showNotificationWidget(vn);
+ edit->curPage()->removeNoteByClass("verifyNotification");
+ edit->curPage()->showNotificationWidget(vn, "verifyNotification");
}
void GpgWin::importKeyDialog()
diff --git a/main.cpp b/main.cpp
index 2330e7c..5965d83 100644
--- a/main.cpp
+++ b/main.cpp
@@ -63,13 +63,13 @@ int main(int argc, char *argv[])
#endif
app.installTranslator(&translator2);
- // css
- QFile file(qApp->applicationDirPath() + "/css/default.css");
+ // css
+ QFile file(qApp->applicationDirPath() + "/css/default.css");
file.open(QFile::ReadOnly);
QString styleSheet = QLatin1String(file.readAll());
- qApp->setStyleSheet(styleSheet);
- //qDebug() << "css: " << styleSheet;
-
+ qApp->setStyleSheet(styleSheet);
+ qDebug() << "css: " << styleSheet;
+
GpgWin *window = new GpgWin();
window->show();
diff --git a/release/css/default.css b/release/css/default.css
index bdd0137..1e74d57 100644
--- a/release/css/default.css
+++ b/release/css/default.css
@@ -1,6 +1,6 @@
/* CSS for GUI, look e.g. at http://doc.qt.nokia.com/latest/stylesheet-examples.html */
-#verifyBox { background-color: #CBFDCB }
+/*#verifyBox { background-color: #CBFDCB }*/
#cryptToolBar { background-color: #CBFDCB }
/*
@@ -8,3 +8,6 @@
font: bold;
}
*/
+
+*[keyNotFound="true"] { background-color: yellow }
+*[keyFound="true"] { background-color: green }
diff --git a/verifynotification.cpp b/verifynotification.cpp
index 2c5cd56..e6b3819 100644
--- a/verifynotification.cpp
+++ b/verifynotification.cpp
@@ -13,7 +13,7 @@ VerifyNotification::VerifyNotification(GpgME::Context *ctx, QWidget *parent ) :
// notificationWidget = new QWidget(this);
- this->setStyleSheet("background-color: #CBFDCB;");
+ //this->setStyleSheet("background-color: #CBFDCB;");
this->setLayout(notificationWidgetLayout);
QAction *importFromKeyserverAct = new QAction(tr("Import missing key from Keyserver"), this);