aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2012-01-03 20:41:20 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2012-01-03 20:41:20 +0000
commit1ea5614e3b20a40b8764a98c10a7a0c7538035d5 (patch)
treeb8553bdaa92a94a068430f4b3173425ca1eb753d
parentfix crash on decrypt with no data (diff)
downloadgpg4usb-1ea5614e3b20a40b8764a98c10a7a0c7538035d5.tar.gz
gpg4usb-1ea5614e3b20a40b8764a98c10a7a0c7538035d5.zip
show message in statusbar of mainwindow when key is exported to file in keymanagement
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@722 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r--TODO16
-rw-r--r--gpgcontext.cpp5
-rwxr-xr-xkeymgmt.cpp4
-rwxr-xr-xkeymgmt.h5
-rw-r--r--mainwindow.cpp16
-rw-r--r--mainwindow.h3
6 files changed, 29 insertions, 20 deletions
diff --git a/TODO b/TODO
index 8435214..3ebfe0b 100644
--- a/TODO
+++ b/TODO
@@ -10,15 +10,21 @@ Release 0.3.2
- Zoom In/Out [DONE]
- keyimport from keyserver dialog should show reason for strike out [DONE]
- add file operation toolbar (open, save, new) (per default off) [DONE]
+- understandable message if no matching private key found for decryption (no data error) [DONE]
- dropdown from menubar instead of dialog for file-cryption (files->encrypt,decrypt) [DONE]
- strike out revoked keys in keylist and add warning to keydetails [DONE]
- put quote and double line break removale to "special edit" operation toolbar (icons for double linebreaks missing) [DONE]
+- emit keydbchanged from GPGcontext::importKey (for the moment not possible, because importinformation is lost after this) [DONE]
- Change "remove double line breaks" to "remove spacing" [DONE]
- icon from "line spacing icon" [DONE]
+- key import should be more verbose: [DONE]
+ - show message, which keys are imported [DONE]
+ - if import failed, because no key was found [DONE]
+ - if key is already in keyring [DONE]
+ - BUG: Also show details, when key is really new [DONE]
- Wizard on first start (Create Key, Import from keys older gpg4usb, import from gnupg) [DONE]
- import conf from old gpg4usb
- remember GNUPGHOME in main.cpp
-- emit keydbchanged from GPGcontext::importKey (for the moment not possible, because importinformation is lost after this) [DONE]
- option in settingsdialog for enabling steganographic operations [DONE]
- minimal steganography option: remove or add pgp-headers on demand [DONE]
- Add advanced tab to settings dialog [DONE]
@@ -26,15 +32,8 @@ Release 0.3.2
http://steghide.sourceforge.net/
http://www.outguess.org/
- update gpgme-library
-- understandable message if no matching private key found for decryption (no data error)
- investigate in adding a offline help system [DONE]
- have a look on the format
-- key import should be more verbose: [DONE]
- - show message, which keys are imported [DONE]
- - if import failed, because no key was found [DONE]
- - if key is already in keyring [DONE]
- - for now done just for import from file and clipboard
- - BUG: Also show details, when key is really new [DONE]
- show message, when key export is successful (statusbar)
- encrypt and sign, decrypt and verify (?)
- Add buttonto copy fingerprint to clipboard in details dialog
@@ -45,7 +44,6 @@ Release 0.3.2
BUGS:
- import key toolbar dropdown shows text, even if only icon should be shown
- investigate special characters in passphrase in windows
-- no importdetails are shown for new keys
Release 0.3.3
- create revocation file on key generation
diff --git a/gpgcontext.cpp b/gpgcontext.cpp
index cf9cd1e..c06b4b5 100644
--- a/gpgcontext.cpp
+++ b/gpgcontext.cpp
@@ -379,10 +379,7 @@ bool GpgContext::decrypt(const QByteArray &inBuffer, QByteArray *outBuffer)
result = gpgme_op_decrypt_result(mCtx);
checkErr(result->recipients->status);
errorString.append(gpgErrString(result->recipients->status)).append("<br>");
-
- errorString.append(tr("<br>No private key with id "))
- .append(result->recipients->keyid)
- .append(tr(" in keyring."));
+ errorString.append(tr("<br>No private key with id %1 present in keyring").arg(result->recipients->keyid));
} else {
errorString.append(gpgErrString(err)).append("<br>");
}
diff --git a/keymgmt.cpp b/keymgmt.cpp
index 0ec7f30..a79f083 100755
--- a/keymgmt.cpp
+++ b/keymgmt.cpp
@@ -22,7 +22,7 @@
#include "keymgmt.h"
-KeyMgmt::KeyMgmt(GpgME::GpgContext *ctx, QString iconpath)
+KeyMgmt::KeyMgmt(GpgME::GpgContext *ctx, QString iconpath, QWidget *parent ) : QMainWindow(parent)
{
mCtx = ctx;
mIconPath = iconpath;
@@ -36,6 +36,7 @@ KeyMgmt::KeyMgmt(GpgME::GpgContext *ctx, QString iconpath)
createActions();
createMenus();
createToolBars();
+ connect(this,SIGNAL(statusBarChanged(QString)),this->parent(),SLOT(setStatusBarText(QString)));
/* Restore the iconstyle */
QSettings settings;
@@ -255,6 +256,7 @@ void KeyMgmt::exportKeyToFile()
stream << *keyArray;
file.close();
delete keyArray;
+ emit statusBarChanged(QString(tr("key(s) exported")));
}
void KeyMgmt::exportKeyToClipboard()
diff --git a/keymgmt.h b/keymgmt.h
index 276f806..6b2198f 100755
--- a/keymgmt.h
+++ b/keymgmt.h
@@ -44,7 +44,7 @@ class KeyMgmt : public QMainWindow
Q_OBJECT
public:
- KeyMgmt(GpgME::GpgContext* ctx, QString iconpath);
+ KeyMgmt(GpgME::GpgContext* ctx, QString iconpath, QWidget *parent = 0);
QAction *importKeyFromClipboardAct;
QAction *importKeyFromFileAct;
QAction *importKeyFromKeyServerAct;
@@ -61,6 +61,9 @@ public slots:
void generateKeyDialog();
void showKeyDetails();
+signals:
+ void statusBarChanged(QString);
+
private:
void createMenus();
void createActions();
diff --git a/mainwindow.cpp b/mainwindow.cpp
index d8f78c4..97cab33 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -41,9 +41,8 @@ MainWindow::MainWindow()
/* List of binary Attachments */
attachmentDockCreated = false;
- keyMgmt = new KeyMgmt(mCtx, iconPath);
+ keyMgmt = new KeyMgmt(mCtx, iconPath, this);
keyMgmt->hide();
-
/* test attachmentdir for files alll 15s */
QTimer *timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(checkAttachmentFolder()));
@@ -617,18 +616,25 @@ void MainWindow::about()
dialog->exec();
}
-void MainWindow::openTranslate() {
+void MainWindow::openTranslate()
+{
QDesktopServices::openUrl(QUrl("http://gpg4usb.cpunk.de/docu_translate.html"));
}
-void MainWindow::openTutorial() {
+void MainWindow::openTutorial()
+{
QDesktopServices::openUrl(QUrl("http://gpg4usb.cpunk.de/docu.html"));
}
-void MainWindow::openHelp() {
+void MainWindow::openHelp()
+{
edit->newHelpTab("help", qApp->applicationDirPath() + "/help/docu.html");
}
+void MainWindow::setStatusBarText(QString text)
+{
+ statusBar()->showMessage(text,20000);
+}
void MainWindow::startWizard()
{
diff --git a/mainwindow.h b/mainwindow.h
index d7a7e1f..692c0e2 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -71,6 +71,8 @@ public:
*
*/
MainWindow();
+public slots:
+ void setStatusBarText(QString text);
protected:
/**
@@ -105,6 +107,7 @@ private slots:
void showKeyDetails();
+
void startWizard();
/**