02-09-2021, 10:28 PM
(02-09-2021, 08:40 PM)ChameleonScales Wrote: Apart from the dialog that you define in register() and the gimp.message command (which doesn't allow for any user input), I don't know if Gimp's api provides a way to pop a dialog to, say, ask for confirmation about something or provide other sliders, spinners, etc based on what you selected in the main plug'in's dialog.
Do we have to revert to other python libraries like zenity or GTK?
You can build a whole dialog using PyGTK (recommended solution since it is available on all platforms that support Gimp with Python).
Personally, I wrote over a hundred Gimp scripts and never had to request confirmation, I just ensure that Ctrl-Z will allow the user to express regrets about the result. Given you recent post history I think such confirmation should be done before even calling Gimp.
Ergonomics-wise, using two successive dialogs is bad, if some initial choice leads to very different parameters, I use two menu entries leading to two different auto-generated dialogs.