Draft: gui: fix #11725 critical from gtk_application_uninhibit
Tested lightly, only on Linux. Warns user when powers off and dirty image.
Did not test using LinuxBeaver's test cases (GEGL plugins) which may be unrelated.
Since the symptoms were not reproducible ALWAYS, it is not certain that this IS a fix.
The logic is the same as used by other Gtk application gnome-text-editor. Not that we are sure that is a good example.
You shouldn't review the changes, since it is a drastic replacement and the diff is not instructive.
Edited by Lloyd Konneker