diff options
author | Anne Jan Brouwer <annejan@noprotocol.com> | 2015-05-27 05:22:43 +0200 |
---|---|---|
committer | Anne Jan Brouwer <annejan@noprotocol.com> | 2015-05-27 05:22:43 +0200 |
commit | 21649ba8f2b468c668539670ad2ca16fd2ffbfd4 (patch) | |
tree | dfadeebc848986d9b48256d12b5d30db6ea2de5c | |
parent | 8b01bceec6d80ba5d9a3ff60ad73e1f0430d9a54 (diff) |
minor visual additions
-rw-r--r-- | dialog.cpp | 88 | ||||
-rw-r--r-- | dialog.ui | 60 | ||||
-rw-r--r-- | keygendialog.cpp | 7 | ||||
-rw-r--r-- | keygendialog.ui | 3 |
4 files changed, 103 insertions, 55 deletions
@@ -18,6 +18,7 @@ Dialog::Dialog(MainWindow *parent) : ui->setupUi(this); ui->profileTable->verticalHeader()->hide(); ui->profileTable->horizontalHeader()->setStretchLastSection(true); + ui->label->setText(ui->label->text() + VERSION); } /** @@ -360,49 +361,6 @@ void Dialog::addGPGId(bool addGPGId) { ui->checkBoxAddGPGId->setChecked(addGPGId); } -/** - * @brief Dialog::wizard - */ -void Dialog::wizard() -{ - //mainWindow->checkConfig(); - - QString gpg = ui->gpgPath->text(); - //QString gpg = mainWindow->getGpgExecutable(); - if(!QFile(gpg).exists()){ - QMessageBox::critical(this, tr("GnuPG not found"), - tr("Please install GnuPG on your system.<br>Install <strong>gpg</strong> using your favorite package manager<br>or <a href=\"https://www.gnupg.org/download/#sec-1-2\">download</a> it from GnuPG.org")); - - // TODO REST ? - } - - QStringList names = mainWindow->getSecretKeys(); - //qDebug() << names; - if (QFile(gpg).exists() && names.empty()) { - KeygenDialog d(this); - d.exec(); - } - - QString passStore = ui->storePath->text(); - if(!QFile(passStore + ".gpg-id").exists()){ - QMessageBox::critical(this, tr("Password store not initialised"), - tr("The folder %1 doesn't seem to be a password store or is not yet initialised.").arg(passStore)); - while(!QFile(passStore).exists()) { - on_toolButtonStore_clicked(); - passStore = ui->storePath->text(); - } - if (!QFile(passStore + ".gpg-id").exists()) { - // apears not to be store - // init yes / no ? - mainWindow->userDialog(passStore); - } - } - - // Can you use the store? - - - //ui->gpgPath->setText(gpg); -} /** * @brief Dialog::genKey @@ -518,3 +476,47 @@ void Dialog::on_deleteButton_clicked() ui->deleteButton->setEnabled(false); } } + +/** + * @brief Dialog::wizard + */ +void Dialog::wizard() +{ + //mainWindow->checkConfig(); + + QString gpg = ui->gpgPath->text(); + //QString gpg = mainWindow->getGpgExecutable(); + if(!QFile(gpg).exists()){ + QMessageBox::critical(this, tr("GnuPG not found"), + tr("Please install GnuPG on your system.<br>Install <strong>gpg</strong> using your favorite package manager<br>or <a href=\"https://www.gnupg.org/download/#sec-1-2\">download</a> it from GnuPG.org")); + + // TODO REST ? + } + + QStringList names = mainWindow->getSecretKeys(); + //qDebug() << names; + if (QFile(gpg).exists() && names.empty()) { + KeygenDialog d(this); + d.exec(); + } + + QString passStore = ui->storePath->text(); + if(!QFile(passStore + ".gpg-id").exists()){ + QMessageBox::critical(this, tr("Password store not initialised"), + tr("The folder %1 doesn't seem to be a password store or is not yet initialised.").arg(passStore)); + while(!QFile(passStore).exists()) { + on_toolButtonStore_clicked(); + passStore = ui->storePath->text(); + } + if (!QFile(passStore + ".gpg-id").exists()) { + // apears not to be store + // init yes / no ? + mainWindow->userDialog(passStore); + } + } + + // Can you use the store? + + + //ui->gpgPath->setText(gpg); +} @@ -35,6 +35,18 @@ <item> <widget class="QWidget" name="widget" native="true"> <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> <item> <widget class="QGroupBox" name="groupBoxNative"> <property name="title"> @@ -102,10 +114,13 @@ <widget class="QLineEdit" name="passPath"/> </item> <item row="1" column="0" colspan="3"> - <widget class="QLabel" name="label"> + <widget class="QLabel" name="zx2c4"> <property name="text"> <string><html><head/><body><p><a href="http://www.passwordstore.org/"><span style=" text-decoration: underline; color:#0000ff;">www.passwordstore.org</span></a></p></body></html></string> </property> + <property name="openExternalLinks"> + <bool>true</bool> + </property> </widget> </item> </layout> @@ -260,14 +275,41 @@ </widget> </item> <item> - <widget class="QDialogButtonBox" name="buttonBox"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="standardButtons"> - <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> - </property> - </widget> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <item> + <widget class="QLabel" name="label"> + <property name="text"> + <string><a href="http://QtPass.org/">QtPass</a> version </string> + </property> + <property name="openExternalLinks"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + </item> + </layout> </item> </layout> </widget> diff --git a/keygendialog.cpp b/keygendialog.cpp index 9932ea26..4c5b2c5a 100644 --- a/keygendialog.cpp +++ b/keygendialog.cpp @@ -123,9 +123,10 @@ void KeygenDialog::done(int r) pi->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); ui->frame->hide(); - ui->label->setText(QString("We need to generate a lot of random bytes. It is a good idea to perform<br/>") + - "some other action (type on the keyboard, move the mouse, utilize the<br/>" + - "disks) during the prime generation; this gives the random number<br/>" + + ui->label->setText(QString("This operation can take some minutes.<br />") + + "We need to generate a lot of random bytes. It is a good idea to perform " + + "some other action (type on the keyboard, move the mouse, utilize the " + + "disks) during the prime generation; this gives the random number " + "generator a better chance to gain enough entropy."); this->layout()->addWidget(pi); diff --git a/keygendialog.ui b/keygendialog.ui index 740e80e2..95165cef 100644 --- a/keygendialog.ui +++ b/keygendialog.ui @@ -25,6 +25,9 @@ <property name="text"> <string>Generate a new key pair</string> </property> + <property name="wordWrap"> + <bool>true</bool> + </property> </widget> </item> <item> |