Skip to content
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

Add "Assign file type" checkbox to Save As dialog #9732

Closed

Conversation

mere-human
Copy link
Contributor

Fix #9515

@mere-human
Copy link
Contributor Author

mere-human commented Apr 6, 2021

How it works:
Save As dialog now has Append extension checkbox (default is ON).
If it's ON, the file type (in dialog drop-down) as well as file extension is set based on document language.
If checkbox is OFF, then the file type is set to *.* and the file extension isn't added.
The checkbox value is remembered between runs.
The option Set Save dialog file extension filter to *.* is removed from the Preferences.

Demo:

save-dlg-assign-type.mp4

@donho
Copy link
Member

donho commented Apr 6, 2021

Just a suggestion:
Using "Apply current doc. language filter" (instead of "Assign file type") may be more relevant for users.

@mere-human
Copy link
Contributor Author

mere-human commented Apr 7, 2021

@donho

Using "Apply current doc. language filter" (instead of "Assign file type") may be more relevant for users.

This seems too long as for me. At least, it could be "Apply file language filter" or something like this.

But there are more ideas. I'm not sure what is the best option yet.
Please, see the latest comment here #9515 (comment) and links to community forum.

@chcg chcg added the enhancement Proposed enhancements of existing features label Apr 7, 2021
@mere-human mere-human marked this pull request as ready for review April 12, 2021 18:35
@mere-human
Copy link
Contributor Author

I should probably remove the checkbox from the preferences.

The same preference still can be set from the save dialog.
The value is saved to XML as before.
@donho donho self-assigned this Apr 14, 2021
Copy link
Member

@donho donho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Remove getNppGUIMutable(). Use getNppGUI instead.
  2. Change IDC_CHECK_AUTOUPDATE control's Y position.

PowerEditor/src/Parameters.h Outdated Show resolved Hide resolved
PowerEditor/src/WinControls/Preference/preference.rc Outdated Show resolved Hide resolved
Copy link
Member

@donho donho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Remove getNppGUIMutable(). Use getNppGUI instead.
  2. Change IDC_CHECK_AUTOUPDATE control's Y position.

@mere-human mere-human requested a review from donho April 15, 2021 19:04
CONTROL "Mute all sounds", IDC_CHECK_MUTE_SOUNDS, "Button", BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP, 37, 94, 217, 10
CONTROL "Enable Notepad++ auto-updater",IDC_CHECK_AUTOUPDATE,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP, 37, 78, 210, 10
CONTROL "Set Save dialog file extension filter to *.*",IDC_CHECK_SAVEDLGEXTFILTALLTYPES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,37,109,267,10
CONTROL "Enable Notepad++ auto-updater",IDC_CHECK_AUTOUPDATE,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP, 37, 94, 210, 10
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved it upper in the code so it corresponds to the comment that says "Enable Notepad++ auto-updater" should be always the 1st item".
It was me who added "Mute all sounds" in the wrong place 😬

@donho donho added the accepted label Apr 15, 2021
@donho donho closed this in e3dbeda Apr 15, 2021
@mere-human mere-human deleted the issue-9515-save-type branch April 16, 2021 08:35
@sasumner
Copy link
Contributor

@mere-human Hooray! I like it.
I should cautiously add: "We'll see how it goes with users".

@mere-human
Copy link
Contributor Author

I should cautiously add: "We'll see how it goes with users".

Users don't stop to surprise me with what they request and how they're able break our features 😄

@sasumner
Copy link
Contributor

Users don't stop to surprise me with what they request and how they're able break our features

Yes, but this one is a very special case. It seems to be one where we can't predict what will arise.
Hopefully we (you!) are "honing in" on the final solution (the one that generates no more complaints).
It has been a long saga (6+ years) starting with old/new style user questions/problems...and probably hundreds of related Community postings...sigh...

@sasumner
Copy link
Contributor

@mere-human

Can you update the user manual for this feature?
Having said that, I'm not sure the best area it belongs in.
On the upside, I think I was remiss and never added the setting you just removed from the Preferences, so nothing will need to be removed there.

@mere-human
Copy link
Contributor Author

@mere-human

Can you update the user manual for this feature?

Sure, I will check it. Should I write something like in my 2nd comment in this PR?

@sasumner
Copy link
Contributor

like in my 2nd comment in this PR?

Very reasonable.
I'll let you create your own issue in the user manual issue tracker.
Thanks!

@mere-human
Copy link
Contributor Author

@pryrt Do you have an idea whether this should be documented and what section it belongs to?

@sasumner
Copy link
Contributor

whether this should be documented

I thought we established this.
A strong YES. :-)

what section it belongs to?

It may need a new section.
And yes @pryrt 's thoughts on that would be super to have.
Normally there is no need to discuss open/save dialogs as everyone that uses Windows knows how they work. !!

@pryrt
Copy link
Contributor

pryrt commented Jun 1, 2021

@mere-human / @sasumner ,

Have Alan Kilborn and I misunderstood the intention of the "Append extension" checkbox, as Alan describes in the Forum here? Because as I understood its intention, if you type a filename with no extension when the "Append extension" is checked, Alan and I expect it to automatically add the first extension from the current Save As type. But in Alan's experiment on 8.0-RC2, it does not append the extension if there is no extension in the file-name box.

And that's how I described it in the v8 usermanual:
image
... So if my understanding was wrong, I'm going to need to fix that, too.

@mere-human
Copy link
Contributor Author

mere-human commented Jun 1, 2021

But in Alan's experiment on 8.0-RC2, it does not append the extension if there is no extension in the file-name box.

Indeed, it should work as described. But it shouldn't because there is a bug.
I'm going to fix that.

@mere-human
Copy link
Contributor Author

@pryrt Does it work if you press Enter key or Alt+S?

@sasumner
Copy link
Contributor

sasumner commented Jun 1, 2021

@mere-human

I tried it:

  • Enter key: works! (.txt extension added automagically)
  • Alt+s: doesn't work (no extension added)

@donho
Copy link
Member

donho commented Jun 3, 2021

@mere-human So is it a regression due to this PR?
Any opened issue about it?

@mere-human
Copy link
Contributor Author

@mere-human So is it a regression due to this PR?
Any opened issue about it?

Yes, it is a regression.
I haven't seen any issue about it. I'll create one to document everything related.

@sasumner
Copy link
Contributor

sasumner commented Jun 3, 2021

regression

Nitpick: I would call it a bug because this checkbox is new functionality -- nothing to "regress".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted enhancement Proposed enhancements of existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move "Set Save dialog file extension filter to *.*" pref. setting to the SaveAs dialog
5 participants