Skip to content

Commit

Permalink
gui: fix autofocus in CreateWalletActivity::askPassphrase()
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatack committed Sep 9, 2019
1 parent 539d940 commit cad3ab5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,9 @@ void BitcoinGUI::createActions()
for (const std::pair<const std::string, bool>& i : m_wallet_controller->listWalletDir()) {
const std::string& path = i.first;
QString name = path.empty() ? QString("["+tr("default wallet")+"]") : QString::fromStdString(path);
// Menu items remove single &. Single & are shown when && is in the string, but only the first occurrence. So replace only the first & with &&
// Menu items remove single &. Single & are shown when && is in
// the string, but only the first occurrence. So replace only
// the first & with &&.
name.replace(name.indexOf(QChar('&')), 1, QString("&&"));
QAction* action = m_open_wallet_menu->addAction(name);

Expand Down
1 change: 1 addition & 0 deletions src/qt/walletcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ CreateWalletActivity::~CreateWalletActivity()
void CreateWalletActivity::askPassphrase()
{
m_passphrase_dialog = new AskPassphraseDialog(AskPassphraseDialog::Encrypt, m_parent_widget, &m_passphrase);
m_passphrase_dialog->setWindowModality(Qt::ApplicationModal);
m_passphrase_dialog->show();

connect(m_passphrase_dialog, &QObject::destroyed, [this] {
Expand Down

0 comments on commit cad3ab5

Please sign in to comment.