mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-04-26 12:55:08 -06:00
Allow to skip optional packages installation
minor cleanup minor cleanup
This commit is contained in:
parent
6c9445ff28
commit
d4b7c31ec8
@ -984,7 +984,7 @@ bool main_window::HandlePackageInstallation(QStringList file_paths, bool from_bo
|
||||
const game_compatibility* compat = m_game_list_frame ? m_game_list_frame->GetGameCompatibility() : nullptr;
|
||||
|
||||
// Let the user choose the packages to install and select the order in which they shall be installed.
|
||||
pkg_install_dialog dlg(file_paths, compat, this);
|
||||
pkg_install_dialog dlg(file_paths, from_boot, compat, this);
|
||||
connect(&dlg, &QDialog::finished, this, [&](int result)
|
||||
{
|
||||
if (result != QDialog::Accepted)
|
||||
@ -1009,7 +1009,8 @@ bool main_window::HandlePackageInstallation(QStringList file_paths, bool from_bo
|
||||
|
||||
if (canceled)
|
||||
{
|
||||
return false;
|
||||
// return "true" if installation of optional packages (requested by some games at first boot) is skipped
|
||||
return from_boot;
|
||||
}
|
||||
|
||||
if (!from_boot)
|
||||
|
||||
@ -24,7 +24,7 @@ enum Roles
|
||||
DataSizeRole = Qt::UserRole + 5,
|
||||
};
|
||||
|
||||
pkg_install_dialog::pkg_install_dialog(const QStringList& paths, const game_compatibility* compat, QWidget* parent)
|
||||
pkg_install_dialog::pkg_install_dialog(const QStringList& paths, bool from_boot, const game_compatibility* compat, QWidget* parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
ensure(!paths.empty());
|
||||
@ -148,6 +148,11 @@ pkg_install_dialog::pkg_install_dialog(const QStringList& paths, const game_comp
|
||||
buttons->button(QDialogButtonBox::Ok)->setText(tr("Install"));
|
||||
buttons->button(QDialogButtonBox::Ok)->setDefault(true);
|
||||
|
||||
if (from_boot)
|
||||
{
|
||||
buttons->button(QDialogButtonBox::Cancel)->setText(tr("Skip"));
|
||||
}
|
||||
|
||||
m_dir_list->sortItems();
|
||||
m_dir_list->setCurrentRow(0);
|
||||
m_dir_list->setMinimumWidth((m_dir_list->sizeHintForColumn(0) * 125) / 100);
|
||||
|
||||
@ -17,7 +17,7 @@ class pkg_install_dialog : public QDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit pkg_install_dialog(const QStringList& paths, const game_compatibility* compat, QWidget* parent = nullptr);
|
||||
explicit pkg_install_dialog(const QStringList& paths, bool from_boot, const game_compatibility* compat, QWidget* parent = nullptr);
|
||||
std::vector<compat::package_info> get_paths_to_install() const;
|
||||
bool precompile_caches() const { return m_precompile_caches; }
|
||||
bool create_desktop_shortcuts() const { return m_create_desktop_shortcuts; }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user