Qt: Disable game properties for playlist entries

This commit is contained in:
Connor McLaughlin 2020-12-02 00:56:15 +10:00
parent 2a61620dae
commit 0ea2ced46d

View file

@ -521,7 +521,9 @@ void MainWindow::onGameListContextMenuRequested(const QPoint& point, const GameL
// Hopefully this pointer doesn't disappear... it shouldn't. // Hopefully this pointer doesn't disappear... it shouldn't.
if (entry) if (entry)
{ {
connect(menu.addAction(tr("Properties...")), &QAction::triggered, QAction* action = menu.addAction(tr("Properties..."));
action->setEnabled(entry->type == GameListEntryType::Disc);
connect(action, &QAction::triggered,
[this, entry]() { GamePropertiesDialog::showForEntry(m_host_interface, entry, this); }); [this, entry]() { GamePropertiesDialog::showForEntry(m_host_interface, entry, this); });
connect(menu.addAction(tr("Open Containing Directory...")), &QAction::triggered, [this, entry]() { connect(menu.addAction(tr("Open Containing Directory...")), &QAction::triggered, [this, entry]() {