aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-03-30 02:29:48 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-04-14 18:47:40 +0300
commit79311750b58d650d49a3f0edd59d31dd132ab8c0 (patch)
tree57343f86003f2cdac2d812791ed8fa99fc291795
parent963e12058f3ca3cdaeefd9aa5a8305fa41afd1a0 (diff)
downloadbitcoin-79311750b58d650d49a3f0edd59d31dd132ab8c0.tar.xz
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.
-rw-r--r--src/qt/addressbookpage.cpp8
-rw-r--r--src/qt/qrimagewidget.cpp4
-rw-r--r--src/qt/rpcconsole.cpp12
3 files changed, 12 insertions, 12 deletions
diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp
index b4067deb35..858350c287 100644
--- a/src/qt/addressbookpage.cpp
+++ b/src/qt/addressbookpage.cpp
@@ -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);
}
diff --git a/src/qt/qrimagewidget.cpp b/src/qt/qrimagewidget.cpp
index a71c8831e9..ac463e0988 100644
--- a/src/qt/qrimagewidget.cpp
+++ b/src/qt/qrimagewidget.cpp
@@ -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);
}
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 34d055e5a5..87bac6f21b 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -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);