pupgui2: Disable Remove Button for Global Compatibility Tool #327
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Another piece for #254.
This PR disables
btnRemoveSelected
when the currently selected compatibility toolis_global
. We already have a loop where we disable based on the compatibility tool type, so this just adds an extra condition :-)Currently this PR does not:
The approach I took is based on partial discussion in #314: Disable the Remove button for the global tool by default. I figure there's no need to allow remove and then show a warning, we can simply show a warning in advanced mode and users can optionally proceed. We don't want users to risk anything without this enabled, and hopefully it's clear that the global tool shouldn't be removed. The user would have to explicitly set this anyway, so they should also be able to unset it.
Only showing one dialog and only doing it in Advanced Mode probably also makes implementation easier, since we don't have to juggle dialog elements like we do for the SteamTinkerLaunch dialogs :-)
I should be able to add the dialog in this PR as well, but if you'd prefer it go in a separate PR that's fine too.
Thanks!