aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2012-02-04 20:08:12 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2012-02-04 20:08:12 +0000
commite37ba6a3505be31303b0a480d1f984ce90b980fc (patch)
treec9162945d3467cdf15654c9eff2bb05fdfaf0e24
parentshow message after creating new key (diff)
downloadgpg4usb-e37ba6a3505be31303b0a480d1f984ce90b980fc.tar.gz
gpg4usb-e37ba6a3505be31303b0a480d1f984ce90b980fc.zip
jump to conclusion page after key generation or import in wizard
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@792 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r--TODO2
-rw-r--r--wizard.cpp21
-rw-r--r--wizard.h4
3 files changed, 13 insertions, 14 deletions
diff --git a/TODO b/TODO
index bbc9135..d0bbbc4 100644
--- a/TODO
+++ b/TODO
@@ -36,9 +36,7 @@ Release 0.3.2
- nextid is not called when clicking finish button [DONE]
- import conf from old gpg4usb [DONE]
- only show one import detail dialog, when importing public/private keys [DONE]
- - always activate next button
- add messagebox for succesful import of settings from old gpg4usb [DONE]
- - app is not in the foreground after importing config from older gpg4usb
- before restart maybesave should be called on mainwindow
- Update Qt to 4.8 [DONE]
- add Qt language files for Qt locales
diff --git a/wizard.cpp b/wizard.cpp
index 7bc70d4..a53d1ce 100644
--- a/wizard.cpp
+++ b/wizard.cpp
@@ -235,19 +235,19 @@ ImportFromGpg4usbPage::ImportFromGpg4usbPage(GpgME::GpgContext *ctx, KeyMgmt *ke
this->setLayout(gpg4usbLayout);
}
-bool ImportFromGpg4usbPage::importFromOlderGpg4usb()
+void ImportFromGpg4usbPage::importFromOlderGpg4usb()
{
QString dir = QFileDialog::getExistingDirectory(this,tr("Other gpg4usb directory"));
// Return, if cancel was hit
if (dir.isEmpty()) {
- return false;
+ return;
}
// try to import keys, if appropriate box is checked, return, if import was unsuccessful
if (gpg4usbKeyCheckBox->isChecked()) {
if (!Wizard::importPubAndSecKeysFromDir(dir+"/keydb",mKeyMgmt)) {
- return false;
+ return;
}
}
@@ -262,7 +262,7 @@ bool ImportFromGpg4usbPage::importFromOlderGpg4usb()
// TODO: edit->maybesave?
qApp->exit(RESTART_CODE);
}
- return true;
+ wizard()->next();
}
bool ImportFromGpg4usbPage::importConfFromGpg4usb(QString dir) {
@@ -302,17 +302,18 @@ ImportFromGnupgPage::ImportFromGnupgPage(GpgME::GpgContext *ctx, KeyMgmt *keyMgm
this->setLayout(layout);
}
-bool ImportFromGnupgPage::importKeysFromGnupg()
+void ImportFromGnupgPage::importKeysFromGnupg()
{
// first get gnupghomedir and check, if it exists
QString gnuPGHome = getGnuPGHome();
if (gnuPGHome == NULL) {
QMessageBox::critical(0, tr("Import Error"), tr("Couldn't locate GnuPG home directory"));
- return false;
+ return;
}
// Try to import the keyring files and return the return value of the method
- return Wizard::importPubAndSecKeysFromDir(gnuPGHome,mKeyMgmt);;
+ Wizard::importPubAndSecKeysFromDir(gnuPGHome,mKeyMgmt);
+ wizard()->next();
}
QString ImportFromGnupgPage::getGnuPGHome()
@@ -343,12 +344,11 @@ int ImportFromGnupgPage::nextId() const
KeyGenPage::KeyGenPage(GpgME::GpgContext *ctx, QWidget *parent)
: QWizardPage(parent)
{
-
//setPixmap(QWizard::WatermarkPixmap, QPixmap(":/logo-flipped.png"));
mCtx=ctx;
setTitle(tr("Create a keypair..."));
setSubTitle(tr("...for decrypting and signing messages"));
- QLabel *topLabel = new QLabel(tr("You should create an own keypair."
+ QLabel *topLabel = new QLabel(tr("You should create a new keypair."
"The pair consists of a public and a private key.<br>"
"Other users can use the public key to encrypt messages for you "
"and verify messages signed by you."
@@ -382,7 +382,8 @@ int KeyGenPage::nextId() const
void KeyGenPage::generateKeyDialog()
{
KeyGenDialog *keyGenDialog = new KeyGenDialog(mCtx, this);
- keyGenDialog->show();
+ keyGenDialog->exec();
+ wizard()->next();
}
ConclusionPage::ConclusionPage(QWidget *parent)
diff --git a/wizard.h b/wizard.h
index 1db1c2d..6cb3308 100644
--- a/wizard.h
+++ b/wizard.h
@@ -96,7 +96,7 @@ private slots:
/**
* @details Import keys from gnupg-homedir, private or/and public depend on the checked boxes
*/
- bool importFromOlderGpg4usb();
+ void importFromOlderGpg4usb();
bool importConfFromGpg4usb(QString dir);
private:
@@ -119,7 +119,7 @@ private slots:
/**
* @details Import keys from gnupg-homedir, private or/and public depend on the checked boxes
*/
- bool importKeysFromGnupg();
+ void importKeysFromGnupg();
private:
KeyMgmt *mKeyMgmt;