Qt: Allow to add iso files from menu
This commit is contained in:
@@ -2531,6 +2531,22 @@ void main_window::CreateConnects()
|
|||||||
AddGamesFromDirs(std::move(paths));
|
AddGamesFromDirs(std::move(paths));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
connect(ui->addIsoGamesAct, &QAction::triggered, this, [this]()
|
||||||
|
{
|
||||||
|
if (!m_gui_settings->GetBootConfirmation(this))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList paths = QFileDialog::getOpenFileNames(this, tr("Select ISO files to add"), QString::fromStdString(fs::get_config_dir()), tr("ISO files (*.iso);;All files (*.*)"));
|
||||||
|
if (paths.isEmpty())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
AddGamesFromDirs(std::move(paths));
|
||||||
|
});
|
||||||
|
|
||||||
connect(ui->bootRecentMenu, &QMenu::aboutToShow, this, [this]()
|
connect(ui->bootRecentMenu, &QMenu::aboutToShow, this, [this]()
|
||||||
{
|
{
|
||||||
// Enable/Disable Recent Games List
|
// Enable/Disable Recent Games List
|
||||||
|
|||||||
@@ -218,6 +218,7 @@
|
|||||||
<addaction name="bootRecentMenu"/>
|
<addaction name="bootRecentMenu"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="addGamesAct"/>
|
<addaction name="addGamesAct"/>
|
||||||
|
<addaction name="addIsoGamesAct"/>
|
||||||
<addaction name="bootInstallPkgAct"/>
|
<addaction name="bootInstallPkgAct"/>
|
||||||
<addaction name="bootInstallPupAct"/>
|
<addaction name="bootInstallPupAct"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
@@ -1513,6 +1514,11 @@
|
|||||||
<string>Download Update</string>
|
<string>Download Update</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="addIsoGamesAct">
|
||||||
|
<property name="text">
|
||||||
|
<string>Add ISO Games</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<resources>
|
<resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user