mirror of
https://git.wownero.com/wowlet/wowlet.git
synced 2024-08-15 01:03:14 +00:00
PasswordDialog: Show wallet name
This commit is contained in:
parent
49f072eea4
commit
d6c26d4159
6 changed files with 8 additions and 7 deletions
|
@ -317,7 +317,7 @@ void AppContext::onWalletOpened(Wallet *wallet) {
|
|||
emit walletOpenedError(errMsg);
|
||||
} else {
|
||||
this->walletClose(false);
|
||||
emit walletOpenPasswordNeeded(this->walletPassword.isEmpty());
|
||||
emit walletOpenPasswordNeeded(this->walletPassword.isEmpty(), wallet->path());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@ signals:
|
|||
void walletCreatedError(const QString &msg);
|
||||
void walletCreated(Wallet *wallet);
|
||||
void walletOpenedError(QString msg);
|
||||
void walletOpenPasswordNeeded(bool invalidPassword);
|
||||
void walletOpenPasswordNeeded(bool invalidPassword, QString path);
|
||||
void transactionCommitted(bool status, PendingTransaction *tx, const QStringList& txid);
|
||||
void createTransactionError(QString message);
|
||||
void createTransactionCancelled(QString address, double amount);
|
||||
|
|
|
@ -58,7 +58,7 @@ void CLI::onWalletOpenedError(const QString &err) {
|
|||
return this->finishedError(err);
|
||||
}
|
||||
|
||||
void CLI::onWalletOpenPasswordRequired(bool invalidPassword) {
|
||||
void CLI::onWalletOpenPasswordRequired(bool invalidPassword, const QString &path) {
|
||||
if(mode == CLIMode::CLIModeExportContacts ||
|
||||
mode == CLIMode::CLIModeExportTxHistory)
|
||||
return this->finishedError("invalid password");
|
||||
|
|
|
@ -26,7 +26,7 @@ public slots:
|
|||
//libwalletqt
|
||||
void onWalletOpened();
|
||||
void onWalletOpenedError(const QString& err);
|
||||
void onWalletOpenPasswordRequired(bool invalidPassword);
|
||||
void onWalletOpenPasswordRequired(bool invalidPassword, const QString &path);
|
||||
|
||||
private:
|
||||
AppContext *ctx;
|
||||
|
|
|
@ -545,12 +545,13 @@ void MainWindow::onWalletCreatedError(const QString &err) {
|
|||
this->showWizard(WalletWizard::Page_CreateWallet);
|
||||
}
|
||||
|
||||
void MainWindow::onWalletOpenPasswordRequired(bool invalidPassword) {
|
||||
void MainWindow::onWalletOpenPasswordRequired(bool invalidPassword, const QString &path) {
|
||||
QFileInfo fileInfo(path);
|
||||
QInputDialog passwordDialog(this);
|
||||
passwordDialog.setInputMode(QInputDialog::TextInput);
|
||||
passwordDialog.setTextEchoMode(QLineEdit::Password);
|
||||
passwordDialog.setWindowTitle("Password required");
|
||||
passwordDialog.setLabelText("Please enter wallet password.");
|
||||
passwordDialog.setLabelText(QString("Please enter %1 wallet password.").arg(fileInfo.fileName()));
|
||||
passwordDialog.resize(300, 100);
|
||||
if(!(bool)passwordDialog.exec())
|
||||
return this->showWizard(WalletWizard::Page_OpenWallet);
|
||||
|
|
|
@ -96,7 +96,7 @@ public slots:
|
|||
void onWalletCreated(Wallet *wallet);
|
||||
void menuWalletCloseClicked();
|
||||
void menuWalletOpenClicked();
|
||||
void onWalletOpenPasswordRequired(bool invalidPassword);
|
||||
void onWalletOpenPasswordRequired(bool invalidPassword, const QString &path);
|
||||
void onViewOnBlockExplorer(const QString &txid);
|
||||
void onAddContact(const QString &address, const QString &name);
|
||||
void showRestoreHeightDialog();
|
||||
|
|
Loading…
Reference in a new issue