Commit 00ec956d authored by Anthony Léonard's avatar Anthony Léonard

User is informed that registration can be long

On Windows, daemon can take some time to create an account and it
is even worse when a user want to register its name. A label is
now displayed to advise the user about that. Moreover, this label is
modified during the process to show which step is currently
running.

Change-Id: Ia32099f9f46f430293be9e0c03828ea12728e5ce
parent 5107a691
......@@ -98,6 +98,7 @@ WizardDialog::accept()
ui->pinEdit->setStyleSheet("border-color: rgb(0, 192, 212);");
}
ui->progressLabel->setText(tr("Generating your Ring account..."));
ui->stackedWidget->setCurrentIndex(2);
auto profile = ProfileModel::instance().selectedProfile();
......@@ -144,9 +145,12 @@ WizardDialog::endSetup(Account::RegistrationState state)
if (ui->signUpCheckbox->isChecked()) { // If the user wants to register its name on the blockchain
bool regSuccess = account_->registerName(ui->passwordEdit->text(), ui->usernameEdit->text());
if (!regSuccess) usernameFailedRegistration();
else
else {
connect(account_, SIGNAL(nameRegistrationEnded(NameDirectory::RegisterNameStatus,QString)),
this, SLOT(handle_nameRegistrationEnded(NameDirectory::RegisterNameStatus,QString)));
ui->progressLabel->setText(tr("Registering your public username, it may take a few minutes..."));
}
} else {
account_->performAction(Account::EditAction::RELOAD);
QDialog::accept();
......
......@@ -478,6 +478,18 @@
</property>
</widget>
</item>
<item alignment="Qt::AlignHCenter">
<widget class="QLabel" name="progressLabel">
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string>Generating your Ring account...</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment