Author Topic: Autoset file extension on saving  (Read 871 times)

Offline photon

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Autoset file extension on saving
« on: August 24, 2010, 07:23:27 am »
When I save file which was made by "New" command file save dialog must autoset suitable extension.
For example: Create new Powershell file (Untitled.ps1). When "save as" operation get called I need ps1 extension in dialog.

And thank you for this nice tool.

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1712
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: Autoset file extension on saving
« Reply #1 on: August 24, 2010, 10:27:04 am »
Do you mean that file name does not contain .ps1 extension or that Save As drop down list do not have corresponding file type selected?

If the question is about first case, than reason why file extension is not shown is not in HippoEDIT but in system setting: Windows Explorer -> Properties -> View -> Hide File Extension for known file types.
In this case you need to add extension manually or switch switch off option I have mentioned.
But even, if you will not set the extesnion and press Save, HippoEDIT will worn you and will display dialog, suggesting to add default extension.
If the option is Off, you will see a file extension (should see).

Is some previous HE version, default extension was added, but this caused several over probelms: if there is more then one extension - which to use. Is it better to add first and than user will delete it if it is wrong or add nothing. From another side, if HE adds files extension for default file name, than depending of mentioned flag set, I can get back twice added extension. And than I do not not, is this is intended (who knows, user enters that like this) or this is is a bug.

And thanks a lot for your warm comments.

best regards,
Alex.

Offline photon

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Autoset file extension on saving
« Reply #2 on: August 24, 2010, 11:16:43 am »
I'm talking about second case: drop down list does not have corresponding file type selected on file creation.

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1712
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: Autoset file extension on saving
« Reply #3 on: August 24, 2010, 02:52:35 pm »
Ok. Than this is a bug. I think :)
I will try to fix it with next 1.49 beta.

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 774
  • Karma: +6/-0
    • View Profile
Re: Autoset file extension on saving
« Reply #4 on: August 24, 2010, 06:31:26 pm »
Hmm, i just downloaded the PowerShell Syntax file from http://www.hippoedit.com/syntax_files.php?lang=en
and the test file "Untitled1.ps1" is saved with ps1 extension.
Also the ps1 extension is listed in the "Save as" dialog at "File type" (as default i see "Custom Filter",
but ps1 is available. But the file name has already this extension)

Ohh, or, maybe this  "Custom Filter" is the point,

"drop down list does not have corresponding file type selected"

perhaps the corresponding file type to the current file
should be pre- chosen at the file type-field instead of "Custom Filter"?


That way the files in the list above would be filtered to that one file type.

Maybe there is an setting to set what this "file type-field" should show (and maybe i have mess this up?)


(1.48.755 here)
« Last Edit: August 24, 2010, 06:35:08 pm by Stefan »

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1712
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: Autoset file extension on saving
« Reply #5 on: August 24, 2010, 07:33:49 pm »
The point is wrong selection of the filter.

Quote
Maybe there is an setting to set what this "file type-field" should show (and maybe i have mess this up?)
No, there is no such setting. But I think here I have done some when changes... Previously, selected item in Save as type was preset to correspond active syntax file pattern. But later I have changed logic to keep filter previously chosen by user. This is a reason for current "bug", I think. But probably the logic should be extended to select active syntax extension filter, for save dialog, and last used for open dialog... But this became more and more complex...

Probably mu categorization as BUG was too fast :)

Best regards,
Alex.

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
683 Views
Last post February 27, 2009, 11:24:08 am
by alex
13 Replies
815 Views
Last post October 06, 2009, 07:52:00 am
by Stefan
4 Replies
471 Views
Last post October 16, 2009, 10:16:49 pm
by joseluis
2 Replies
380 Views
Last post January 10, 2010, 11:06:10 pm
by Arthur
4 Replies
441 Views
Last post May 10, 2010, 01:15:46 am
by cichlasoma