Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-06

(patch) File Open dialog start in the directory of active source file

5 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Sergei Gorelkin

Hello,

This tiny patch implements a feature which can be found in Programmer's Notepad, and which proves to be very useful (at least to me). It makes the File Open dialog open in the directory of the file which is active in source notebook. Thus, each opened file acts as a filesystem bookmark, and whenever you work with sources from several directories, efforts needed to navigate in File Open dialog are greatly reduced.

Maybe this feature must be made configurable (I am ready to do it, let me know if I should), but honestly I cannot imagine any reason to disable it.

Best regards,
Sergei
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.diff
Type: text/x-patch
Size: 983 bytes
Desc: not available
Url : http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20080609/ff642e85/attachment.bin

Reply by email

Michael Van Canneyt
to Sergei Gorelkin
Sergei Gorelkin wrote 11 lines
Hello, This tiny patch implements a feature which can be found in Programmer's Notepad, and which proves to be very useful (at least to me). It makes the File Open dialog open in the directory of the file which is active in source notebook. Thus, each opened file acts as a filesystem bookmark, and whenever you work with sources from several directories, efforts needed to navigate in File Open dialog are greatly reduced. Maybe this feature must be made configurable (I am ready to do it, let me know if I should), but honestly I cannot imagine any reason to disable it.

I think it should definitely be made configurable. I much prefer the notion of the 'currently active' directory.

I have many files open, in many directories. Often the current file (rtl/vcl/fcl whatever files, opened with ctrl-enter on a unit name) will be in the wrong directory, which is not part of the project.

Michael.

Reply by email

Kostas Michalopoulos
to Michael Van Canneyt
Show quoted text 22 lines
> Hello, > > This tiny patch implements a feature which can be found in Programmer's > Notepad, and which proves to be very useful (at least to me). > It makes the File Open dialog open in the directory of the file which is > active in source notebook. Thus, each opened file acts as a filesystem > bookmark, and whenever you work with sources from several directories, > efforts > needed to navigate in File Open dialog are greatly reduced. > > Maybe this feature must be made configurable (I am ready to do it, let me > know > if I should), but honestly I cannot imagine any reason to disable it. I think it should definitely be made configurable. I much prefer the notion of the 'currently active' directory. I have many files open, in many directories. Often the current file (rtl/vcl/fcl whatever files, opened with ctrl-enter on a unit name) will be in the wrong directory, which is not part of the project. Michael.

I like this feature. However i also agree with Michael about being configurable. I think a combobox in options like

Default file dialog directory:
* Last used directory
* Current file's directory
* Project directory

The last one can enable a checkbox below (will be disabled for the first two):
* Use current file's directory for non project files

Kostas

Reply by email

Sergei Gorelkin
to Michael Van Canneyt: I think it should definitely be made configurable. I much prefer the notion of the…
Michael Van Canneyt wrote 8 lines
I think it should definitely be made configurable. I much prefer the notion of the 'currently active' directory. I have many files open, in many directories. Often the current file (rtl/vcl/fcl whatever files, opened with ctrl-enter on a unit name) will be in the wrong directory, which is not part of the project.

Correct, in this case you need an extra click to activate a file which is in the 'right' directory. But once you have some files opened, any other within their dirs is opened with four intent is exactly to handle 'random-order-multi-directory' cases. A downside of 'currently active' directory is that it changes whenever you need to open something outside of it.
When I started using Programmer's Notepad, I didn't feel like I have to change my habits to accomodate with this feature. Now I feel uncomfortable using other editors...

Sergei

Reply by email

Mattias Gaertner
to Kostas Michalopoulos: I like this feature. However i also agree with Michael about being configurable. I think…
Show quoted text 35 lines
>> Hello, >> >> This tiny patch implements a feature which can be found in >> Programmer's Notepad, and which proves to be very useful (at least >> to me). It makes the File Open dialog open in the directory of the >> file which is active in source notebook. Thus, each opened file >> acts as a filesystem bookmark, and whenever you work with sources >> from several directories, efforts >> needed to navigate in File Open dialog are greatly reduced. >> >> Maybe this feature must be made configurable (I am ready to do it, >> let me know >> if I should), but honestly I cannot imagine any reason to disable >> it. > > I think it should definitely be made configurable. > I much prefer the notion of the 'currently active' directory. > > I have many files open, in many directories. Often the current file > (rtl/vcl/fcl whatever files, opened with ctrl-enter on a unit name) > will be in the wrong directory, which is not part of the project. > > Michael. I like this feature. However i also agree with Michael about being configurable. I think a combobox in options like Default file dialog directory: * Last used directory * Current file's directory * Project directory The last one can enable a checkbox below (will be disabled for the first two): * Use current file's directory for non project files

At least all three directories should be available in the history.

Mattias

Reply by email