mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 10:18:40 +12:00
GUI: Display PKG information & installation confirmation from main menu
This commit is contained in:
parent
62beaf299f
commit
41cfa6349a
1 changed files with 7 additions and 5 deletions
|
@ -567,9 +567,9 @@ void main_window::InstallPackages(QStringList file_paths)
|
||||||
const QFileInfo file_info(file_paths[0]);
|
const QFileInfo file_info(file_paths[0]);
|
||||||
m_gui_settings->SetValue(gui::fd_install_pkg, file_info.path());
|
m_gui_settings->SetValue(gui::fd_install_pkg, file_info.path());
|
||||||
}
|
}
|
||||||
else if (file_paths.count() == 1)
|
|
||||||
|
if (file_paths.count() == 1 && file_paths.front().endsWith(".pkg", Qt::CaseInsensitive))
|
||||||
{
|
{
|
||||||
// This can currently only happen by drag and drop and cli arg.
|
|
||||||
const QString file_path = file_paths.front();
|
const QString file_path = file_paths.front();
|
||||||
const QFileInfo file_info(file_path);
|
const QFileInfo file_info(file_path);
|
||||||
|
|
||||||
|
@ -612,11 +612,13 @@ void main_window::InstallPackages(QStringList file_paths)
|
||||||
info.changelog = tr("\n\nChangelog:\n%0", "Block for Changelog").arg(info.changelog);
|
info.changelog = tr("\n\nChangelog:\n%0", "Block for Changelog").arg(info.changelog);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (QMessageBox::question(this, tr("PKG Decrypter / Installer"), tr("Do you want to install this package?\n\n%0\n\n%1%2%3%4%5")
|
const QString info_string = QStringLiteral("%0\n\n%1%2%3%4%5").arg(file_info.fileName()).arg(info.title).arg(info.local_cat)
|
||||||
.arg(file_info.fileName()).arg(info.title).arg(info.local_cat).arg(info.title_id).arg(info.version).arg(info.changelog),
|
.arg(info.title_id).arg(info.version).arg(info.changelog);
|
||||||
|
|
||||||
|
if (QMessageBox::question(this, tr("PKG Decrypter / Installer"), tr("Do you want to install this package?\n\n%0").arg(info_string),
|
||||||
QMessageBox::Yes | QMessageBox::No, QMessageBox::No) != QMessageBox::Yes)
|
QMessageBox::Yes | QMessageBox::No, QMessageBox::No) != QMessageBox::Yes)
|
||||||
{
|
{
|
||||||
gui_log.notice("PKG: Cancelled installation from drop. File: %s", sstr(file_paths.front()));
|
gui_log.notice("PKG: Cancelled installation from drop.\n%s", sstr(info_string));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue