-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Relates to #53 which tries only to make things 'less bad'.
The behavior of a (save) file chooser in JavaFX differs according to platform, e.g.
- On macOS, not specifying a name to save results in a default name of 'Untitled'; on Windows and Linux, the field is blank
- Multipart extensions are handled weirdly/badly (especially on macOS) - see this stack overflow discussion for related complications
I think the solution might be to do a thorough investigation and try to come up with something workable across platforms.
My guess is that:
- We should provide a default name if none is specified
- If we can get the extension from a filter, we should leave that up to the filter
- Except for multi-part extensions on macOS, where we need to add the first part only (e.g.
Untitled.omeif we wantUntitled.ome.tif)
- Except for multi-part extensions on macOS, where we need to add the first part only (e.g.
- If we can get the extension from a filter, we should leave that up to the filter
- If a name is specified, we should strip the extension from the name and leave it up to the filter
- Except we can't do that if the filter supports multiple extensions (e.g.
.tif,.tiff) and we want to default to an existing file... since this might then choose the wrong option- We also can't do that on macOS for multi-part extensions; we'd probably need to add the first part again (e.g.
Titled.ome)
- We also can't do that on macOS for multi-part extensions; we'd probably need to add the first part again (e.g.
- Except we can't do that if the filter supports multiple extensions (e.g.
In any case, it seems likely to be a painful task to come up with sensible behavior for all scenarios... so this issue exists as a reminder, and also to avoid creating lots of 'small' issues to fix inconsistent behavior with the current code that might cause us to break things on other platforms.
Metadata
Metadata
Assignees
Labels
No labels