dialog buttons should have a consistent interface
There are various behaviors for the buttons in the dialogs:
- Iemgui dialogs
- Ok - apply all settings and close the dialog
- Apply - temporarily apply all settings, will be reverted if the dialog is canceled
- Cancel - revert any temporary settings, close the dialog
- Canvas/Array dialogs:
- Ok - apply all settings and close the dialog
- Apply - apply all settings and leave the dialog open
- Close - close the dialog
- New Array dialog:
- Ok - create a new array and close the dialog
- Close - close the dialog without creating an array
- Preferences dialog:
- Ok - apply and save all settings, close the dialog
- Apply - apply settings, don't save them, don't close dialog
- Close - close the dialog
- Font dialog:
- Close - close the dialog
Ideally we would choose one of the following consistent behaviors:
- make all dialogs behave like Iemgui dialogs, where "Cancel" undoes temporary settings and "Ok" confirms them
- apply all form inputs in the dialogs immediately and have a single "Close" button at the bottom
Drawbacks:
- the Prefs dialog and Canvas dialog potentially do an enormous amount number of mutations to the running Pd instance and patch state. Getting them to successfully/deterministically undo these changes when clicking "Cancel" is tricky (e.g., consider what to do when undoing an array truncation). Also, applying changes immediately in the Audio Prefs dialog may connect/disconnect audio too quickly and causes unpredictable behavior. For those reasons the Prefs and Canvas dialogs have a "Close" button instead of a "Cancel" button-- i.e., there's no going back.