Skip to content

Commit 7931175

Browse files
committed
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.
1 parent 963e120 commit 7931175

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/qt/addressbookpage.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,17 @@ AddressBookPage::AddressBookPage(const PlatformStyle *platformStyle, Mode _mode,
113113
}
114114

115115
// Context menu actions
116-
QAction *copyAddressAction = new QAction(tr("&Copy Address"), this);
117-
QAction *copyLabelAction = new QAction(tr("Copy &Label"), this);
118-
QAction *editAction = new QAction(tr("&Edit"), this);
116+
QAction* copyAddressAction = new QAction(tr("Copy Address"), this);
117+
QAction* copyLabelAction = new QAction(tr("Copy Label"), this);
118+
QAction* editAction = new QAction(tr("Edit"), this);
119119

120120
// Build context menu
121121
contextMenu = new QMenu(this);
122122
contextMenu->addAction(copyAddressAction);
123123
contextMenu->addAction(copyLabelAction);
124124
contextMenu->addAction(editAction);
125125
if (tab == SendingTab) {
126-
QAction* deleteAction = new QAction(ui->deleteAddress->text(), this);
126+
QAction* deleteAction = new QAction(tr("Delete"), this);
127127
contextMenu->addAction(deleteAction);
128128
connect(deleteAction, &QAction::triggered, this, &AddressBookPage::on_deleteAddress_clicked);
129129
}

src/qt/qrimagewidget.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ QRImageWidget::QRImageWidget(QWidget *parent):
2727
QLabel(parent), contextMenu(nullptr)
2828
{
2929
contextMenu = new QMenu(this);
30-
QAction *saveImageAction = new QAction(tr("&Save Image..."), this);
30+
QAction* saveImageAction = new QAction(tr("Save Image..."), this);
3131
connect(saveImageAction, &QAction::triggered, this, &QRImageWidget::saveImage);
3232
contextMenu->addAction(saveImageAction);
33-
QAction *copyImageAction = new QAction(tr("&Copy Image"), this);
33+
QAction* copyImageAction = new QAction(tr("Copy Image"), this);
3434
connect(copyImageAction, &QAction::triggered, this, &QRImageWidget::copyImage);
3535
contextMenu->addAction(copyImageAction);
3636
}

src/qt/rpcconsole.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -617,11 +617,11 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_
617617
ui->peerWidget->horizontalHeader()->setStretchLastSection(true);
618618

619619
// create peer table context menu actions
620-
QAction* disconnectAction = new QAction(tr("&Disconnect"), this);
621-
QAction* banAction1h = new QAction(ts.ban_for + " " + tr("1 &hour"), this);
622-
QAction* banAction24h = new QAction(ts.ban_for + " " + tr("1 &day"), this);
623-
QAction* banAction7d = new QAction(ts.ban_for + " " + tr("1 &week"), this);
624-
QAction* banAction365d = new QAction(ts.ban_for + " " + tr("1 &year"), this);
620+
QAction* disconnectAction = new QAction(tr("Disconnect"), this);
621+
QAction* banAction1h = new QAction(ts.ban_for + " " + tr("1 hour"), this);
622+
QAction* banAction24h = new QAction(ts.ban_for + " " + tr("1 day"), this);
623+
QAction* banAction7d = new QAction(ts.ban_for + " " + tr("1 week"), this);
624+
QAction* banAction365d = new QAction(ts.ban_for + " " + tr("1 year"), this);
625625

626626
// create peer table context menu
627627
peersTableContextMenu = new QMenu(this);
@@ -658,7 +658,7 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_
658658
ui->banlistWidget->horizontalHeader()->setStretchLastSection(true);
659659

660660
// create ban table context menu action
661-
QAction* unbanAction = new QAction(tr("&Unban"), this);
661+
QAction* unbanAction = new QAction(tr("Unban"), this);
662662

663663
// create ban table context menu
664664
banTableContextMenu = new QMenu(this);

0 commit comments

Comments
 (0)