-
Notifications
You must be signed in to change notification settings - Fork 757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
default file extension missing #838
Comments
We used to employ mechanisms to provide "scd" as default extension offered by native file-save dialogs, but sadly, they do not work reliably across platforms and cause other issues (see for example #615). We could add the extension in our code, after the dialog is closed, but that raises complications if the file with the added extension already exists, as the dialog's own "file already exists" warning would not be used, and the file would be overwritten without a warning. We could then implement such a warning on our own, but it would always look a bit different than the native dialog's own warning, and hence inconsistent. Alternatively, there might be a chance that we can intercept the click on the native dialog's OK button, and modify the filename before the dialog continues its processing, so as to trigger the dialog's own warning. |
Sensible behaviour would be to display the default extension explicitly and let the user modify if desired, I think. Adding it implicitly seems like bad form. This may be a case where a little platform specific code would be appropriate. |
The issue #615 was caused by the lack of a way to select default extension in a native dialog without enforcing only that extension. Yes, some platform-specific code might help, although I'm not sure we can tap into native objects instantiated by the Qt framework. Maybe we should instantiate native dialogs with our own native code to begin with. |
on OS X it may be enough to append the string ".scd" to the file name if it doesn't contain a period char? |
[fixes #838] Since this bypasses the native file selection dialog's check for file existence, we implement our own check whether the file with the added extension exists, and warn the user in that case.
[fixes supercollider#838] Since this bypasses the native file selection dialog's check for file existence, we implement our own check whether the file with the added extension exists, and warn the user in that case.
When saving a new file, no file type extension is added unless one specifically selects one. If this happens, one has to manually rename the file, close the old one, and reopen the new one.
I think .scd should be the default.
The text was updated successfully, but these errors were encountered: