File Open Dialog Default Path

Started by swbrains, June 15, 2011, 01:53:09 AM

Previous topic - Next topic

swbrains

Whenever I click the open file dialog button on the toolbar (or CTRL+O), it defaults to the HippoEdit directory.  Any way to have it match the File Explorer default directory or to specify where to default to?

Thanks!

Arthur

You can make HippoEdit open a certain directory by default on the Open Command.
To do so you need to go to the Tools menu item in the tool bar, then Options -> Document. In the Working Directory specify or navigate to the path you want HippoEdit to use as a start location next time you Ctrl-O.
To match to the file in the File Explorer I think is a redundant request IMHO because you can simply open any file from there, e.g. by HippoEDITging and dropping it into the HE canvas.

alex

Thanks Arthur!

Just want to add, there is another way to maintain initial directory for File Open dialog:
Tools->Options->General->File Open/Save initial directory. If this is not set, Working directory from Document settings or Project setting used.

As far as I remember, it is really missing, synchronization of the Last Used directory and active directory of the File Explorer. Probably because I forget, or decide that these are independent features and should no be mixed... But maybe I will change this (File Explorer active directory would influence Last Used directory) for 1.50. But I do not know if it would be really useful, when last directory would change every time user switches documents and Follow Active document from File Explorer is enabled.. It will behave same like "Use current file dir" for File Open/Save dialog and nobody will be able to understand this...
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

swu

#3
My setting for File Open/Save is "Current File Directory" but it is not working.  Is this a known bug?  I have lastest 1.49.830 on Vista.

Upon further investigation, I realize HE used the current project file location instead of current file location.  Please fix this behavior.

alex

Hello swu,

by me, using 1.49.830, on Window 7, with or without open project works fine. For Current File location or Last used Location. Tested with file Open.

What you have tried:
- File Open or File Save As ?
- What is a folder location your current file is (is the problem consistent or depends on file location)?
- Do you have project open?
- Do you have Working Directory maintained for Project or for Document (global settings)?

BR, Alex
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

swu


alex

Hello swu,

please check what you have in Project->Options->Working Directory and in Tools->Options->Document Working Directory.
These settings, if set, overwrite initial directory selection for File Save (but not File Open). Looks like that you have there something.

P.S: I think, to avoid such problems, I will replace current option for This directory with Working Directory option. It will be more logical.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

swu

#7
Hi Alex,

I guess my anticipation of 'Project' is a way to gather files that don't belong to a single folder.  If all the project files are under the same directory, I can just use File Explorer to manage them without the trouble setting up a project.

One might argue that project has controls over what files are in/out, but I can use filters and naming for that.

What bothers me is that the current way HE takes care of files in a project by assuming them are all related to the physical location of project management file (*.heprj) .  If I alter the 'Working Directory' of a project, all files managed by the project become orphant as their paths become invalid.

Please reconsider how HE can sovle this usecase:

1. user has 10 files under 3 physical directories.  (e.g. C:\work, C:\home, E:\other)
2. user creates a project which manages above files (e.g. under (C:\Documents\mywork.heprj)
3. user opens/edits 1 of that 10 files (e.g. C:\work\file1.txt), then wantting to save a copy in the same directory (C:\work)

Now HE prompts C:\Documents as the location of new copy, it doesn't matter if I opened C:\home\file2.txt or E:\other\file3.txt.



alex

#8
Hi swu,

what do you have as Working directory for your project (Project->Properties->Working Directory) and what as global Working directory (Tools->Options->Document->Working Directory)?

If you change Working Directory in HE (in Projects Settings) and after this file paths became invalid - this is a bug. But should not be.
If you do this manually in project file - hm.. this your fault ;)
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

swu

Hi Alex,

My settings:
Generatl:Document:Working Directory >> empty
Project Working Directory >> empty

I created a test project and added files from different directories:
  C:\testhe\myproj.heprj
  C:\work1\test1.txt
  C:\work1\test1.txt.orig
  C:\work2\test2.txt

The content of the HE project says HE remembers relative path instead of full path  ???,  is there a logical reason for that design?

<XMLConfigSettings>
        <FILEINFO type="ProjectFile"/>
        <Properties>
                <RootDirectory>C:\\TestHE</RootDirectory>
                <CRLFMode>-1</CRLFMode>
        </Properties>
        <NODES>
                <File name="..\\work1\\test1.txt"/>
                <Folder open="true" name="backup">
                        <File name="..\\work1\\test1.txt.orig"/>
                </Folder>
                <File name="..\\work2\\test2.txt"/>
        </NODES>
</XMLConfigSettings>

alex

QuoteThe content of the HE project says HE remembers relative path instead of full path  ,  is there a logical reason for that design?
Of course. This is standard way by most of the editors, Visual Studio etc. It allows to store project files into CVSs or move projects.
Files are relative to RootDirectory.

With this test project do you have problem with initial directory when saving files?
I assume you have "Use current file directory" as selection for "File Open/Save initial directory".

How about Working Directory and invalid file paths?
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

swu

Which path should be project's 'root directory'?  Is it project file's location or project working directory?  (although by experiment I knew the root directory is changed as I enter different working directory for project properties, which is still a surprise to me)

alex

Hello swu,

I will be very graceful, if you would answer my questions also, but not only ask new ones ;)

Yes, if Working directory is set, it value used as RootDirectory, because normally people will have their files closer to it, as to to RootDirectory. So paths will be shorter. If WorkDirectory is empty, than RootDirectory path to project file location.
And what? RootDirectory is a internal variable used by HE, not shown somewhere in UI. If you do not manipulate with project files manually, this should not matter. Or I miss something?

BR, Alex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]