summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnne Jan Brouwer <annejan@noprotocol.com>2015-05-27 05:22:43 +0200
committerAnne Jan Brouwer <annejan@noprotocol.com>2015-05-27 05:22:43 +0200
commit21649ba8f2b468c668539670ad2ca16fd2ffbfd4 (patch)
treedfadeebc848986d9b48256d12b5d30db6ea2de5c
parent8b01bceec6d80ba5d9a3ff60ad73e1f0430d9a54 (diff)
minor visual additions
-rw-r--r--dialog.cpp88
-rw-r--r--dialog.ui60
-rw-r--r--keygendialog.cpp7
-rw-r--r--keygendialog.ui3
4 files changed, 103 insertions, 55 deletions
diff --git a/dialog.cpp b/dialog.cpp
index a313d245..52be32ec 100644
--- a/dialog.cpp
+++ b/dialog.cpp
@@ -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);
+}
diff --git a/dialog.ui b/dialog.ui
index 1ae211db..b69b56e9 100644
--- a/dialog.ui
+++ b/dialog.ui
@@ -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>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;http://www.passwordstore.org/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;www.passwordstore.org&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</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>&lt;a href=&quot;http://QtPass.org/&quot;&gt;QtPass&lt;/a&gt; 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>