Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI Config : Add LocalDispatcher shutdown checks #5586

Merged
merged 4 commits into from
Dec 13, 2023

Conversation

johnhaddon
Copy link
Member

This is a follow up to #5557, adding a prompt at shutdown if there are any LocalDispatcher jobs still running. It required rejigging the Quit action so that it prompts once per window with unsaved changes rather than once for all such windows. But hopefully the potential inconvenience of that is more than offset by the addition of a "Save" button into those prompts, so you can save during quit rather than cancelling, saving and quitting again.

I wasn't sure where a bunch of this code belonged so I've taken the most non-commital approach, leaving old stuff where it was and not adding new stuff (other than preCloseSignal() to the public API.

Copy link
Contributor

@murraystevenson murraystevenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks John! This looks good to me. The confirmation dialogue per script doesn't feel too inconvenient, it keeps the experience consistent whether you have one or many unsaved scripts open, and it fits the usual pattern followed by other multi-document applications such as Krita, Inkscape, etc.

Adding the "Save" button may introduce some room for debate about whether it or the "Discard" button should be focussed by default, but I'm okay with leaving it as is.

_ChoiceDialogue does feel like it would be a decent addition to GafferUI, maybe something to do the next time we find a use for it...

Since all running jobs will be killed during shutdown prompt the user when closing the last ScriptWindow, offering the option of cancelling shutdown,.
This means we're using the ScriptWindow's own discard/cancel prompts
rather than duplicating them here. Which also means that the LocalDispatcher
kill-incomplete-jobs? prompt is shown on quit.
@johnhaddon johnhaddon merged commit 772e296 into GafferHQ:main Dec 13, 2023
2 checks passed
@johnhaddon johnhaddon deleted the localDispatcherShutdownChecks branch March 15, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants