mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-17 15:21:30 +02:00
PasswordDialog: Show wallet name
This commit is contained in:
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+3
-2
@@ -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);
|
||||
|
||||
+1
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user