-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
get_default_filename modifies user-supplied title for save dialog #7824
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
Comments
I agree. I don't see any reason for the conversion. It looks like fixing it is a matter of deleting the |
I think the reason for the lower case is that some OSs don't support capitalization of filenames (OSX?). |
OSX HFS+ by default, and Windows always, are case-preserving but not case-sensitive. With OSX one can reformat the HFS+ filesystem to be case-sensitive. I am not aware of any OS or filesystem that rejects names with upper-case letters. |
That's hard to imagine, but there must have been a reason for the reversion. The PR is #908. |
When I made the changes in PR #908, I left the |
I agree, let's remove the What happens if there is a slash or a colon in the figure title? One of these is forbidden in file names in most environments. Or how about some emoji outside the Unicode BMP? |
Exact work: |
FIX Preserve title case when saving through GUI (issue #7824)
FIX Preserve title case when saving through GUI (issue #7824)
Closed by #7865. |
To help us understand and resolve your issue, please fill out the form to the best of your ability. You can feel free to delete the sections that do not apply.
Bug report
Bug summary
The default name for the save dialog is based upon the window/figure title. This is good as it's the only means by which a user's script can influence the default filename.
If the user's title has spaces in it then they are converted to underscores. This modification is not good as it changes the user's intended name but it may be necessary due to some Apps on some OSs not being able to handle spaces in paths.
The bigger problem is that the user- supplied title is ALWAYS converted to lower-case. This is VERY bad. If a user supplies a title that is valid for the OS they are using then they DO NOT expect it to be modified! In our case we have auto-generated filenames 40 or more chars in length with mixed case and it is impractical for the user to re-type this in every time.
If this is not fixed then it is essential to add a function by which the user can set the default name in some other manner.
Code for reproduction
a)
b) Manually adjust plot to suit.
c) Click 'save' button.
Actual outcome
Default filename is:
'auto_generated_very_specific_title_that_is_very_annoying_to_retype'
Expected outcome
'Auto_Generated_Very_Specific_Title_That_Is_Very_Annoying_To_ReType'
Matplotlib version
Latest
The text was updated successfully, but these errors were encountered: