From a219d034448496880f9deed48ef6905ac4ce594e Mon Sep 17 00:00:00 2001 From: LostDragonist Date: Mon, 26 Nov 2018 03:13:33 -0600 Subject: Add cancel button to "Start Steam?" dialog to not start binary --- src/organizer_en.ts | 160 +++++++++++++++++++++++++------------------------- src/organizercore.cpp | 22 ++++--- 2 files changed, 93 insertions(+), 89 deletions(-) (limited to 'src') diff --git a/src/organizer_en.ts b/src/organizer_en.ts index 5a3826b0..9b1294ac 100644 --- a/src/organizer_en.ts +++ b/src/organizer_en.ts @@ -2650,6 +2650,18 @@ You can also use online editors and converters instead. Remove Backup... + + + + Change Categories + + + + + + Primary Category + + Rename Separator... @@ -2660,11 +2672,6 @@ You can also use online editors and converters instead. Remove Separator... - - - Set the priority of the selected mods - - Select Color... @@ -2675,18 +2682,6 @@ You can also use online editors and converters instead. Reset Color - - - - Change Categories - - - - - - Primary Category - - Change versioning scheme @@ -3151,6 +3146,11 @@ You can also use online editors and converters instead. Ignore file + + + Set the priority of the selected mods + + MessageDialog @@ -4326,118 +4326,118 @@ p, li { white-space: pre-wrap; } - + Start Steam? - + Steam is required to be running already to correctly start the game. Should MO try to start steam now? - + Error - + Windows Event Log Error - + The Windows Event Log service is disabled and/or not running. This prevents USVFS from running properly. Your mods may not be working in the executable that you are launching. Note that you may have to restart MO and/or your PC after the service is fixed. Continue launching %1? - + No profile set - + Failed to refresh list of esps: %1 - + Multiple esps/esls activated, please check that they don't conflict. - + Download? - + A download has been started but no installed page plugin recognizes it. If you download anyway no information (i.e. version) will be associated with the download. Continue? - + failed to update mod list: %1 - - + + login successful - + Login failed - + Login failed, try again? - + login failed: %1. Download will not be associated with an account - + login failed: %1 - + login failed: %1. You need to log-in with Nexus to update MO. - + MO1 "Script Extender" load mechanism has left hook.dll in your game folder - - + + Description missing - + <a href="%1">hook.dll</a> has been found in your game folder (right click to copy the full path). This is most likely a leftover of setting the ModOrganizer 1 load mechanism to "Script Extender", in which case you must remove this file either by changing the load mechanism in ModOrganizer 1 or manually removing the file, otherwise the game is likely to crash and burn. - + failed to save load order: %1 - + The designated write target "%1" is not enabled. @@ -5034,7 +5034,8 @@ p, li { white-space: pre-wrap; } QObject - + + Error @@ -5397,7 +5398,7 @@ If the folder was still in use, restart MO and try again. - + Mod Organizer @@ -5474,12 +5475,12 @@ If the folder was still in use, restart MO and try again. - + Script Extender - + Proxy DLL @@ -5699,12 +5700,12 @@ Select Show Details option to see the full change-log. - + Error - + Failed to create "%1", you may not have the necessary permission. path remains unchanged. @@ -5784,6 +5785,11 @@ If you use pre-releases, never contact me directly by e-mail or via private mess Colors + + + Mod Contains selected Plugin + + Plugin is Contained in selected Mod @@ -5795,23 +5801,24 @@ If you use pre-releases, never contact me directly by e-mail or via private mess - - If checked, the download interface will be more compact. + + Is overwritten (loose files) - - Compact Download Interface + + Is overwriting (loose files) - - If checked, the download list will display meta information instead of file names. + + + Modify the categories available to arrange your mods. - - Download Meta Information + + Configure Mod Categories @@ -5819,12 +5826,6 @@ If you use pre-releases, never contact me directly by e-mail or via private mess Reset stored information from dialogs. - - - Mod Contains selected Plugin - Is contained in selected Mod - - This will make all dialogs show up again where you checked the "Remember selection"-box. @@ -5836,24 +5837,23 @@ If you use pre-releases, never contact me directly by e-mail or via private mess - - - Modify the categories available to arrange your mods. + + If checked, the download interface will be more compact. - - Configure Mod Categories + + Compact Download Interface - - Is overwriting (loose files) + + If checked, the download list will display meta information instead of file names. - - Is overwritten (loose files) + + Download Meta Information @@ -6327,52 +6327,52 @@ For the other games this is not a sufficient replacement for AI! - + Confirm - + Changing the mod directory affects all your profiles! Mods not present (or named differently) in the new location will be disabled in all profiles. There is no way to undo this unless you backed up your profiles manually. Proceed? - + Select base directory - + Select download directory - + Select mod directory - + Select cache directory - + Select profiles directory - + Select overwrite directory - + Confirm? - + This will make all dialogs show up again where you checked the "Remember selection"-box. Continue? 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); } -- cgit v1.3.1