diff options
| author | LostDragonist <lost.dragonist@gmail.com> | 2018-11-26 03:13:33 -0600 |
|---|---|---|
| committer | LostDragonist <lost.dragonist@gmail.com> | 2018-11-26 03:13:33 -0600 |
| commit | a219d034448496880f9deed48ef6905ac4ce594e (patch) | |
| tree | bd890be0dbdfc68cea771c824ed169e25f95edfb /src/organizercore.cpp | |
| parent | ad01e1d6085a97681537fe3328955dd1660dae36 (diff) | |
Add cancel button to "Start Steam?" dialog to not start binary
Diffstat (limited to 'src/organizercore.cpp')
| -rw-r--r-- | src/organizercore.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/organizercore.cpp b/src/organizercore.cpp index fe720a0c..b66895db 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -1183,8 +1183,8 @@ ModList *OrganizerCore::modList() QStringList OrganizerCore::modsSortedByProfilePriority() const
{
QStringList res;
- for (int i = currentProfile()->getPriorityMinimum();
- i < currentProfile()->getPriorityMinimum() + (int)currentProfile()->numRegularMods();
+ for (int i = currentProfile()->getPriorityMinimum();
+ i < currentProfile()->getPriorityMinimum() + (int)currentProfile()->numRegularMods();
++i) {
int modIndex = currentProfile()->modIndexByPriority(i);
res.push_back(ModInfo::getByIndex(modIndex)->name());
@@ -1289,12 +1289,16 @@ HANDLE OrganizerCore::spawnBinaryProcess(const QFileInfo &binary, .exists())
&& (m_Settings.getLoadMechanism() == LoadMechanism::LOAD_MODORGANIZER)) {
if (!testForSteam()) {
- if (QuestionBoxMemory::query(window, "steamQuery", binary.fileName(),
- tr("Start Steam?"),
- tr("Steam is required to be running already to correctly start the game. "
- "Should MO try to start steam now?"),
- QDialogButtonBox::Yes | QDialogButtonBox::No) == QDialogButtonBox::Yes) {
+ QDialogButtonBox::StandardButton result;
+ result = QuestionBoxMemory::query(window, "steamQuery", binary.fileName(),
+ tr("Start Steam?"),
+ tr("Steam is required to be running already to correctly start the game. "
+ "Should MO try to start steam now?"),
+ QDialogButtonBox::Yes | QDialogButtonBox::No | QDialogButtonBox::Cancel);
+ if (result == QDialogButtonBox::Yes) {
startSteam(window);
+ } else if(result == QDialogButtonBox::Cancel) {
+ return INVALID_HANDLE_VALUE;
}
}
}
@@ -1334,7 +1338,7 @@ HANDLE OrganizerCore::spawnBinaryProcess(const QFileInfo &binary, return INVALID_HANDLE_VALUE;
}
}
-
+
QString modsPath = settings().getModDirectory();
// Check if this a request with either an executable or a working directory under our mods folder
@@ -1727,7 +1731,7 @@ void OrganizerCore::refreshBSAList() if (m_ActiveArchives.isEmpty()) {
m_ActiveArchives = m_DefaultArchives;
}
-
+
if (m_UserInterface != nullptr) {
m_UserInterface->updateBSAList(m_DefaultArchives, m_ActiveArchives);
}
|
