Re: [hatari-devel] Hatari Mac GUI: Selecting IDE image |
[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]
Hi, On 25.8.2022 23.45, Chris Jenkins wrote:
Here is a patch that allows any type of file to be chosen as an IDE image, as well as allowing any filetype to be chosen in various other file selectors in the Mac UI. In doing a bit of reading about the Objective C class that is used here, NSOpenPanel, I discovered that the allowedFileTypes property has actually been deprecated for a while [0]. This might explain why the user is not given any indication of what the set of allowed fields are. If we really do want to only allow certain file types then I might be able to figure out what it was replaced with... but tbh I'd be happy to leave it as it is. All feedback on this little patch gratefully received.
Thanks!Patch looks very straightforward / fine, especially considering that handling of images was inconsistent, two different extensions were accepted for ASCI files, but only one for IDE ones...
I just wonder whether:* would NSOpenPanel default to all files being selectable i.e. could mutString lines be completely removed?
* does using this "chooseDirectories:NO defaultInitialDir" mean file selector defaulting to application workdir, or to dir of the initial file selection?
- EeroPS. In Hatari configuration defaults, TOS / kernel images default to DataDir, and HD images + audio/video recordings default to WorkingDir.
Screenshots default to ScreenshotsDir, and if that is missing, to WorkingDir.
DataDir is same place as where Hatari binary is (WorkingDir is obviously CWD).
[0] https://developer.apple.com/documentation/appkit/nssavepanel/1534419-allowedfiletypes
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |