group radio buttons for create/restore #159
This commit is contained in:
@@ -32,6 +32,7 @@ FirstTimeWizard::FirstTimeWizard(bool dangerous, QString server)
|
|||||||
this->dangerous = dangerous;
|
this->dangerous = dangerous;
|
||||||
this->server = server;
|
this->server = server;
|
||||||
|
|
||||||
|
|
||||||
////backup addresslabels.dat if there is one, to restore it later
|
////backup addresslabels.dat if there is one, to restore it later
|
||||||
|
|
||||||
auto dir = QDir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation));
|
auto dir = QDir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation));
|
||||||
@@ -115,6 +116,9 @@ NewOrRestorePage::NewOrRestorePage(FirstTimeWizard *parent) : QWizardPage(parent
|
|||||||
form.txtPassword->setEnabled(true);
|
form.txtPassword->setEnabled(true);
|
||||||
form.txtConfirmPassword->setEnabled(true);
|
form.txtConfirmPassword->setEnabled(true);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
parent->button(QWizard::CommitButton)->setEnabled(false);
|
||||||
|
parent->button(QWizard::NextButton)->setEnabled(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -135,7 +139,7 @@ NewOrRestorePage::NewOrRestorePage(FirstTimeWizard *parent) : QWizardPage(parent
|
|||||||
form.radioRestoreWallet->setEnabled(true);
|
form.radioRestoreWallet->setEnabled(true);
|
||||||
form.radioNewWallet->setEnabled(true);
|
form.radioNewWallet->setEnabled(true);
|
||||||
form.radioNewWallet->setChecked(true);
|
form.radioNewWallet->setChecked(true);
|
||||||
parent->button(QWizard::CommitButton)->setEnabled(true);
|
|
||||||
|
|
||||||
int length = passphrase.length();
|
int length = passphrase.length();
|
||||||
|
|
||||||
@@ -172,6 +176,7 @@ NewOrRestorePage::NewOrRestorePage(FirstTimeWizard *parent) : QWizardPage(parent
|
|||||||
QObject::connect(form.radioNewWallet, &QRadioButton::clicked, [=](bool checked) {
|
QObject::connect(form.radioNewWallet, &QRadioButton::clicked, [=](bool checked) {
|
||||||
if (checked) {
|
if (checked) {
|
||||||
form.radioRestoreWallet->setChecked(false);
|
form.radioRestoreWallet->setChecked(false);
|
||||||
|
parent->button(QWizard::CommitButton)->setEnabled(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -179,6 +184,7 @@ NewOrRestorePage::NewOrRestorePage(FirstTimeWizard *parent) : QWizardPage(parent
|
|||||||
QObject::connect(form.radioRestoreWallet, &QRadioButton::clicked, [=](bool checked) {
|
QObject::connect(form.radioRestoreWallet, &QRadioButton::clicked, [=](bool checked) {
|
||||||
if (checked) {
|
if (checked) {
|
||||||
form.radioNewWallet->setChecked(false);
|
form.radioNewWallet->setChecked(false);
|
||||||
|
parent->button(QWizard::CommitButton)->setEnabled(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -244,6 +244,12 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Restore wallet from seed</string>
|
<string>Restore wallet from seed</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">buttonGroup</string>
|
||||||
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@@ -278,6 +284,15 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Create a new wallet</string>
|
<string>Create a new wallet</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="autoExclusive">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">buttonGroup</string>
|
||||||
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@@ -289,4 +304,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
<buttongroups>
|
||||||
|
<buttongroup name="buttonGroup"/>
|
||||||
|
</buttongroups>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
Reference in New Issue
Block a user