Index: Page3.ui
===================================================================
--- Page3.ui (revision 0)
+++ Page3.ui (revision 0)
@@ -0,0 +1,106 @@
+
+ Page3
+
+
+
+ 0
+ 0
+ 405
+ 290
+
+
+
+ KGpg Wizard
+
+
+ -
+
+
+ Start KGpg automatically at KDE startup.
+
+
+ true
+
+
+
+ -
+
+
-
+
+
+ Your default key:
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+ -
+
+
+ KGpg will now launch the key generation dialog to create your own key pair for encryption and decryption.
+
+
+ Qt::AlignTop
+
+
+ true
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Expanding
+
+
+
+ 20
+ 30
+
+
+
+
+
+ page
+ page
+ page
+
+ checkBox2
+ checkBox2
+
+ textGenerate
+
+
+
+
+
+ KComboBox
+ QComboBox
+
+
+
+ KAssistantDialog
+ QWidget
+
+
+
+
+ k3activelabel.h
+ kpushbutton.h
+
+
+
+
Index: kgpg.h
===================================================================
--- kgpg.h (revision 783679)
+++ kgpg.h (working copy)
@@ -20,12 +20,15 @@
#include
+#include
#include
#include
#include
#include
-#include "ui_kgpgwizard.h"
+#include "ui_Page1.h"
+#include "ui_Page2.h"
+#include "ui_Page3.h"
class QDragEnterEvent;
class QDropEvent;
@@ -41,13 +44,34 @@
class KGpgTextInterface;
class KeysManager;
-class KgpgWizard : public Q3Wizard, public Ui::KgpgWizard
+class KgpgWizard : public KAssistantDialog
{
public:
- KgpgWizard(QWidget *parent = 0) : Q3Wizard(parent)
+ KgpgWizard(QWidget *parent = 0) : KAssistantDialog(parent)
{
- setupUi(this);
+ mPage1 = new Ui::Page1;
+ mPage1Widget = new QWidget(this);
+ mPage1->setupUi(mPage1Widget);
+ addPage(mPage1Widget, i18n("Welcome"));
+
+ mPage2 = new Ui::Page2;
+ mPage2Widget = new QWidget(this);
+ mPage2->setupUi(mPage2Widget);
+ addPage(mPage2Widget, i18n("Path"));
+
+ mPage3 = new Ui::Page3;
+ mPage3Widget = new QWidget(this);
+ mPage3->setupUi(mPage3Widget);
+ addPage(mPage3Widget, i18n("Step Three: Select your Default Private Key"));
}
+
+ private:
+ QWidget * mPage1Widget;
+ Ui::Page1 * mPage1;
+ QWidget * mPage2Widget;
+ Ui::Page2 * mPage2;
+ QWidget * mPage3Widget;
+ Ui::Page3 * mPage3;
};
class MyView : public QObject
Index: Page2.ui
===================================================================
--- Page2.ui (revision 0)
+++ Page2.ui (revision 0)
@@ -0,0 +1,85 @@
+
+ Page2
+
+
+
+ 0
+ 0
+ 429
+ 257
+
+
+
+ Form
+
+
+ -
+
+
+ KGpg needs to know where your GnuPG configuration file is stored.
+
+
+ Qt::AlignTop
+
+
+ true
+
+
+
+ -
+
+
+ Unless you want to try some unusual settings, just click on the "next" button.
+
+
+ Qt::AlignTop
+
+
+ true
+
+
+
+ -
+
+
+ <br>Path to your GnuPG options file:
+
+
+ Qt::AlignVCenter
+
+
+ true
+
+
+
+ -
+
+
+ -
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Expanding
+
+
+
+ 20
+ 60
+
+
+
+
+
+
+
+
+ KUrlRequester
+ QFrame
+
+
+
+
+
+
Index: Page1.ui
===================================================================
--- Page1.ui (revision 0)
+++ Page1.ui (revision 0)
@@ -0,0 +1,60 @@
+
+ Page1
+
+
+
+ 0
+ 0
+ 451
+ 365
+
+
+
+ Form
+
+
+ -
+
+
+ <h1>Welcome to the KGpg Wizard</h1>
+This wizard will first setup some basic configuration options required for KGpg to work properly. Next, it will allow you to create your own key pair, enabling you to encrypt your files and emails.
+
+
+ Qt::AlignTop
+
+
+ true
+
+
+
+ -
+
+
+ You have GnuPG version:
+
+
+ true
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+ QSizePolicy::Expanding
+
+
+
+ 20
+ 241
+
+
+
+
+
+
+
+
+
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 783679)
+++ CMakeLists.txt (working copy)
@@ -62,7 +62,9 @@
conf_encryption.ui
kgpgrevokewidget.ui
keyserver.ui
- kgpgwizard.ui
+ Page1.ui
+ Page2.ui
+ Page3.ui
conf_decryption.ui
sourceselect.ui
)
Index: kgpgwizard.ui
===================================================================
--- kgpgwizard.ui (revision 783679)
+++ kgpgwizard.ui (working copy)
@@ -1,6 +1,6 @@
KgpgWizard
-
+
0
Index: kgpg.cpp
===================================================================
--- kgpg.cpp (revision 783679)
+++ kgpg.cpp (working copy)
@@ -259,12 +259,12 @@
QString extension;
switch (compressionScheme) {
- case 0: extension = ".zip"; break;
- case 1: extension = ".tar.gz"; break;
- case 2: extension = ".tar.bz2"; break;
- case 3: extension = ".tar"; break;
- default: Q_ASSERT(compressionScheme);
- return;
+ case 0: extension = ".zip"; break;
+ case 1: extension = ".tar.gz"; break;
+ case 2: extension = ".tar.bz2"; break;
+ case 3: extension = ".tar"; break;
+ default: Q_ASSERT(compressionScheme);
+ return;
}
if (dialog->getArmor())
@@ -276,13 +276,13 @@
extension += ".gpg";
if (dialog->getArmor())
- encryptOptions << "--armor";
+ encryptOptions << "--armor";
if (dialog->getHideId())
- encryptOptions << "--throw-keyids";
+ encryptOptions << "--throw-keyids";
QString fname = droppedUrls.first().path();
if (fname.endsWith('/'))
- fname.remove(fname.length() - 1, 1);
+ fname.remove(fname.length() - 1, 1);
KUrl encryptedFile = KUrl::fromPath(fname + extension);
QFile encryptedFolder(encryptedFile.path());
if (encryptedFolder.exists())
@@ -291,7 +291,7 @@
KIO::RenameDialog over(0, i18n("File Already Exists"), KUrl(), encryptedFile, KIO::M_OVERWRITE);
if (over.exec() == QDialog::Rejected)
{
- dialog = NULL;
+ dialog = NULL;
return;
}
encryptedFile = over.newDestUrl();
@@ -308,17 +308,17 @@
KArchive *arch;
switch (compressionScheme) {
- case 0: arch = new KZip(kgpgfoldertmp->fileName()); break;
- case 1: arch = new KTar(kgpgfoldertmp->fileName(), "application/x-gzip"); break;
- case 2: arch = new KTar(kgpgfoldertmp->fileName(), "application/x-bzip"); break;
- case 3: arch = new KTar(kgpgfoldertmp->fileName(), "application/x-tar"); break;
- default: Q_ASSERT(1);
+ case 0: arch = new KZip(kgpgfoldertmp->fileName()); break;
+ case 1: arch = new KTar(kgpgfoldertmp->fileName(), "application/x-gzip"); break;
+ case 2: arch = new KTar(kgpgfoldertmp->fileName(), "application/x-bzip"); break;
+ case 3: arch = new KTar(kgpgfoldertmp->fileName(), "application/x-tar"); break;
+ default: Q_ASSERT(1);
}
if (!arch->open(QIODevice::WriteOnly))
{
KMessageBox::sorry(0,i18n("Unable to create temporary file"));
- delete arch;
+ delete arch;
return;
}
@@ -712,7 +712,7 @@
}
else
{
- wiz->text_optionsfound->setText(i18n("The GnuPG configuration file was not found. Please make sure you have GnuPG installed and give the path to the config file."));
+// FIXMEEE: wiz->text_optionsfound->setText(i18n("The GnuPG configuration file was not found. Please make sure you have GnuPG installed and give the path to the config file."));
confPath.clear();
}
}
@@ -723,12 +723,12 @@
// TODO: allow selection of binary if it is outside the path
KMessageBox::error(0, i18n("GnuPG was not found on your system. Please make sure to have the "gpg" binary in your application search path."));
return -1;
- } else if (gpgVersion < 120)
- wiz->txtGpgVersion->setText(i18n("Your GnuPG version seems to be older than 1.2.0. Photo Id's and Key Groups will not work properly. Please consider upgrading GnuPG (http://gnupg.org)."));
- else
- wiz->txtGpgVersion->setText(QString());
+ } // FIXMEEE:else if (gpgVersion < 120)
+// FIXMEEE: wiz->txtGpgVersion->setText(i18n("Your GnuPG version seems to be older than 1.2.0. Photo Id's and Key Groups will not work properly. Please consider upgrading GnuPG (http://gnupg.org)."));
+// FIXMEEE: else
+// FIXMEEE: wiz->txtGpgVersion->setText(QString());
- wiz->kURLRequester1->setUrl(confPath);
+// FIXMEEE: wiz->kURLRequester1->setUrl(confPath);
/*
wiz->kURLRequester2->setURL(KGlobalSettings::desktopPath());
wiz->kURLRequester2->setMode(2);*/
@@ -746,53 +746,52 @@
QString s = k.id() + ": " + k.name() + " <" + k.email() + '>';
- wiz->CBdefault->addItem(s);
+// FIXMEEE: wiz->CBdefault->addItem(s);
if (firstKey.isEmpty())
firstKey = s;
}
- wiz->CBdefault->setCurrentItem(firstKey);
+// FIXMEEE: wiz->CBdefault->setCurrentItem(firstKey);
//connect(wiz->pushButton4,SIGNAL(clicked()),this,SLOT(slotGenKey()));
if (!firstKey.isEmpty())
- connect(wiz->finishButton(),SIGNAL(clicked()),this,SLOT(slotGenKey()));
+ connect(wiz,SIGNAL(finished()),this,SLOT(slotGenKey()));
else
{
- wiz->textGenerate->hide();
- wiz->setTitle(wiz->page2, i18n("Step Three: Select your Default Private Key"));
- connect(wiz->finishButton(), SIGNAL(clicked()), this, SLOT(slotSaveOptionsPath()));
+// FIXMEEE: wiz->textGenerate->hide();
+ connect(wiz, SIGNAL(finished()), this, SLOT(slotSaveOptionsPath()));
}
- connect(wiz->nextButton(), SIGNAL(clicked()), this, SLOT(slotWizardChange()));
+ //connect(wiz->nextButton(), SIGNAL(clicked()), this, SLOT(slotWizardChange()));
connect(wiz, SIGNAL(destroyed()), this, SLOT(slotWizardClose()));
connect(wiz, SIGNAL(helpClicked()), this, SLOT(help()));
- wiz->setFinishEnabled(wiz->page2, true);
+ //wiz->setFinishEnabled(wiz->page2, true);
wiz->show();
return 0;
}
void MyView::slotWizardChange()
{
- if (wiz->indexOf(wiz->currentPage()) == 2)
+ //if (wiz->indexOf(wiz->currentPage()) == 2)
{
QString tst,name;
KgpgInterface *iface = new KgpgInterface();
- QString defaultID = iface->getGpgSetting("default-key", wiz->kURLRequester1->url().path());
+// FIXMEEE: //QString defaultID = iface->getGpgSetting("default-key", wiz->kURLRequester1->url().path());
- if (defaultID.isEmpty()) {
- delete iface;
- return;
- }
- KgpgKeyList secl = iface->readSecretKeys(QStringList(defaultID));
- delete iface;
+ //if (defaultID.isEmpty()) {
+ // delete iface;
+ // return;
+ //}
+// FIXMEEE: KgpgKeyList secl = iface->readSecretKeys(QStringList(defaultID));
+ //delete iface;
- if (secl.isEmpty())
- return;
+ //if (secl.isEmpty())
+ // return;
- KgpgKey k = secl.at(0);
+ //KgpgKey k = secl.at(0);
- wiz->CBdefault->setCurrentItem(k.id() + ": " + k.name() + " <" + k.email() + '>');
+ //wiz->CBdefault->setCurrentItem(k.id() + ": " + k.name() + " <" + k.email() + '>');
}
}
@@ -800,18 +799,18 @@
{
qWarning("Save wizard settings...");
- KGpgSettings::setAutoStart(wiz->checkBox2->isChecked());
- KGpgSettings::setGpgConfigPath(wiz->kURLRequester1->url().path());
+// FIXMEEE: KGpgSettings::setAutoStart(wiz->checkBox2->isChecked());
+// FIXMEEE: KGpgSettings::setGpgConfigPath(wiz->kURLRequester1->url().path());
KGpgSettings::setFirstRun(false);
- QString defaultID = wiz->CBdefault->currentText().section(':', 0, 0);
+// FIXMEEE: QString defaultID = wiz->CBdefault->currentText().section(':', 0, 0);
/* if (!defaultID.isEmpty())
{
KGpgSettings::setDefaultKey(defaultID);
}*/
KGpgSettings::self()->writeConfig();
- emit updateDefault(defaultID);
+// FIXMEEE: emit updateDefault(defaultID);
delete wiz;
}