mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-30 08:01:12 +02:00
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.
This commit is contained in:
@@ -113,9 +113,9 @@ AddressBookPage::AddressBookPage(const PlatformStyle *platformStyle, Mode _mode,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Context menu actions
|
// Context menu actions
|
||||||
QAction *copyAddressAction = new QAction(tr("&Copy Address"), this);
|
QAction* copyAddressAction = new QAction(tr("Copy Address"), this);
|
||||||
QAction *copyLabelAction = new QAction(tr("Copy &Label"), this);
|
QAction* copyLabelAction = new QAction(tr("Copy Label"), this);
|
||||||
QAction *editAction = new QAction(tr("&Edit"), this);
|
QAction* editAction = new QAction(tr("Edit"), this);
|
||||||
|
|
||||||
// Build context menu
|
// Build context menu
|
||||||
contextMenu = new QMenu(this);
|
contextMenu = new QMenu(this);
|
||||||
@@ -123,7 +123,7 @@ AddressBookPage::AddressBookPage(const PlatformStyle *platformStyle, Mode _mode,
|
|||||||
contextMenu->addAction(copyLabelAction);
|
contextMenu->addAction(copyLabelAction);
|
||||||
contextMenu->addAction(editAction);
|
contextMenu->addAction(editAction);
|
||||||
if (tab == SendingTab) {
|
if (tab == SendingTab) {
|
||||||
QAction* deleteAction = new QAction(ui->deleteAddress->text(), this);
|
QAction* deleteAction = new QAction(tr("Delete"), this);
|
||||||
contextMenu->addAction(deleteAction);
|
contextMenu->addAction(deleteAction);
|
||||||
connect(deleteAction, &QAction::triggered, this, &AddressBookPage::on_deleteAddress_clicked);
|
connect(deleteAction, &QAction::triggered, this, &AddressBookPage::on_deleteAddress_clicked);
|
||||||
}
|
}
|
||||||
|
@@ -27,10 +27,10 @@ QRImageWidget::QRImageWidget(QWidget *parent):
|
|||||||
QLabel(parent), contextMenu(nullptr)
|
QLabel(parent), contextMenu(nullptr)
|
||||||
{
|
{
|
||||||
contextMenu = new QMenu(this);
|
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);
|
connect(saveImageAction, &QAction::triggered, this, &QRImageWidget::saveImage);
|
||||||
contextMenu->addAction(saveImageAction);
|
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);
|
connect(copyImageAction, &QAction::triggered, this, &QRImageWidget::copyImage);
|
||||||
contextMenu->addAction(copyImageAction);
|
contextMenu->addAction(copyImageAction);
|
||||||
}
|
}
|
||||||
|
@@ -617,11 +617,11 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_
|
|||||||
ui->peerWidget->horizontalHeader()->setStretchLastSection(true);
|
ui->peerWidget->horizontalHeader()->setStretchLastSection(true);
|
||||||
|
|
||||||
// create peer table context menu actions
|
// create peer table context menu actions
|
||||||
QAction* disconnectAction = new QAction(tr("&Disconnect"), this);
|
QAction* disconnectAction = new QAction(tr("Disconnect"), this);
|
||||||
QAction* banAction1h = new QAction(ts.ban_for + " " + tr("1 &hour"), this);
|
QAction* banAction1h = new QAction(ts.ban_for + " " + tr("1 hour"), this);
|
||||||
QAction* banAction24h = new QAction(ts.ban_for + " " + tr("1 &day"), this);
|
QAction* banAction24h = new QAction(ts.ban_for + " " + tr("1 day"), this);
|
||||||
QAction* banAction7d = new QAction(ts.ban_for + " " + tr("1 &week"), this);
|
QAction* banAction7d = new QAction(ts.ban_for + " " + tr("1 week"), this);
|
||||||
QAction* banAction365d = new QAction(ts.ban_for + " " + tr("1 &year"), this);
|
QAction* banAction365d = new QAction(ts.ban_for + " " + tr("1 year"), this);
|
||||||
|
|
||||||
// create peer table context menu
|
// create peer table context menu
|
||||||
peersTableContextMenu = new QMenu(this);
|
peersTableContextMenu = new QMenu(this);
|
||||||
@@ -658,7 +658,7 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_
|
|||||||
ui->banlistWidget->horizontalHeader()->setStretchLastSection(true);
|
ui->banlistWidget->horizontalHeader()->setStretchLastSection(true);
|
||||||
|
|
||||||
// create ban table context menu action
|
// 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
|
// create ban table context menu
|
||||||
banTableContextMenu = new QMenu(this);
|
banTableContextMenu = new QMenu(this);
|
||||||
|
Reference in New Issue
Block a user