mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-30 10:29:59 +03:00
Add optionCheckBox to ScrollMessageBox ui
Add 'Disable unavailable mods' option on check update failure Signed-off-by: Dylan Schooner <dschooner05@gmail.com>
This commit is contained in:
parent
b070ffaf72
commit
55dc9e6a84
7 changed files with 63 additions and 14 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include "ProgressDialog.h"
|
||||
#include "ScrollMessageBox.h"
|
||||
#include "StringUtils.h"
|
||||
#include "UpdateCheckFailedDialog.h"
|
||||
#include "minecraft/mod/tasks/GetModDependenciesTask.h"
|
||||
#include "modplatform/ModIndex.h"
|
||||
#include "modplatform/flame/FlameAPI.h"
|
||||
|
|
@ -175,16 +176,21 @@ void ResourceUpdateDialog::checkCandidates()
|
|||
text += "<br>";
|
||||
}
|
||||
|
||||
ScrollMessageBox message_dialog(m_parent, tr("Failed to check for updates"),
|
||||
tr("Could not check or get the following resources for updates:<br>"
|
||||
"Do you wish to proceed without those resources?"),
|
||||
text);
|
||||
UpdateCheckFailedDialog message_dialog(m_parent, text);
|
||||
message_dialog.setModal(true);
|
||||
if (message_dialog.exec() == QDialog::Rejected) {
|
||||
m_aborted = true;
|
||||
QMetaObject::invokeMethod(this, "reject", Qt::QueuedConnection);
|
||||
return;
|
||||
}
|
||||
|
||||
// Disable incompatible mods
|
||||
if (message_dialog.isOptionChecked()) {
|
||||
for (const auto& failed : m_failedCheckUpdate) {
|
||||
const auto& mod = std::get<0>(failed);
|
||||
mod->enable(EnableAction::DISABLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_includeDeps && !APPLICATION->settings()->get("ModDependenciesDisabled").toBool()) { // dependencies
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue