qt: Do not assign Alt+<KEY> shortcuts to context menu actions

Such shortcuts are useless as pressing the Alt key closes a context menu
widget immediately.
pull/826/head
Hennadii Stepanov 4 years ago
parent 963e12058f
commit 79311750b5
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F

@ -113,9 +113,9 @@ AddressBookPage::AddressBookPage(const PlatformStyle *platformStyle, Mode _mode,
}
// Context menu actions
QAction *copyAddressAction = new QAction(tr("&Copy Address"), this);
QAction *copyLabelAction = new QAction(tr("Copy &Label"), this);
QAction *editAction = new QAction(tr("&Edit"), this);
QAction* copyAddressAction = new QAction(tr("Copy Address"), this);
QAction* copyLabelAction = new QAction(tr("Copy Label"), this);
QAction* editAction = new QAction(tr("Edit"), this);
// Build context menu
contextMenu = new QMenu(this);
@ -123,7 +123,7 @@ AddressBookPage::AddressBookPage(const PlatformStyle *platformStyle, Mode _mode,
contextMenu->addAction(copyLabelAction);
contextMenu->addAction(editAction);
if (tab == SendingTab) {
QAction* deleteAction = new QAction(ui->deleteAddress->text(), this);
QAction* deleteAction = new QAction(tr("Delete"), this);
contextMenu->addAction(deleteAction);
connect(deleteAction, &QAction::triggered, this, &AddressBookPage::on_deleteAddress_clicked);
}

@ -27,10 +27,10 @@ QRImageWidget::QRImageWidget(QWidget *parent):
QLabel(parent), contextMenu(nullptr)
{
contextMenu = new QMenu(this);
QAction *saveImageAction = new QAction(tr("&Save Image..."), this);
QAction* saveImageAction = new QAction(tr("Save Image..."), this);
connect(saveImageAction, &QAction::triggered, this, &QRImageWidget::saveImage);
contextMenu->addAction(saveImageAction);
QAction *copyImageAction = new QAction(tr("&Copy Image"), this);
QAction* copyImageAction = new QAction(tr("Copy Image"), this);
connect(copyImageAction, &QAction::triggered, this, &QRImageWidget::copyImage);
contextMenu->addAction(copyImageAction);
}

@ -617,11 +617,11 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_
ui->peerWidget->horizontalHeader()->setStretchLastSection(true);
// create peer table context menu actions
QAction* disconnectAction = new QAction(tr("&Disconnect"), this);
QAction* banAction1h = new QAction(ts.ban_for + " " + tr("1 &hour"), this);
QAction* banAction24h = new QAction(ts.ban_for + " " + tr("1 &day"), this);
QAction* banAction7d = new QAction(ts.ban_for + " " + tr("1 &week"), this);
QAction* banAction365d = new QAction(ts.ban_for + " " + tr("1 &year"), this);
QAction* disconnectAction = new QAction(tr("Disconnect"), this);
QAction* banAction1h = new QAction(ts.ban_for + " " + tr("1 hour"), this);
QAction* banAction24h = new QAction(ts.ban_for + " " + tr("1 day"), this);
QAction* banAction7d = new QAction(ts.ban_for + " " + tr("1 week"), this);
QAction* banAction365d = new QAction(ts.ban_for + " " + tr("1 year"), this);
// create peer table context menu
peersTableContextMenu = new QMenu(this);
@ -658,7 +658,7 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_
ui->banlistWidget->horizontalHeader()->setStretchLastSection(true);
// create ban table context menu action
QAction* unbanAction = new QAction(tr("&Unban"), this);
QAction* unbanAction = new QAction(tr("Unban"), this);
// create ban table context menu
banTableContextMenu = new QMenu(this);

Loading…
Cancel
Save