ADD: Edit path by double click (option)

(cherry picked from commit a8a855d7f3)
This commit is contained in:
Alexander Koblov 2024-03-08 22:27:11 +03:00
commit 077c302f63
2 changed files with 11 additions and 2 deletions

View file

@ -160,8 +160,13 @@ end;
procedure TFileViewHeader.PathLabelDblClick(Sender: TObject);
begin
tmViewHistoryMenu.Enabled:=FALSE; //Cancel the possibility of a left click
FFileView.SetFocus;
frmMain.Commands.cm_DirHotList(['position=cursor']);
if gDblClickEditPath then
ShowPathEdit
else begin
FFileView.SetFocus;
frmMain.Commands.cm_DirHotList(['position=cursor']);
end;
end;
procedure TFileViewHeader.PathLabelMouseUp(Sender: TObject; Button: TMouseButton;

View file

@ -545,6 +545,7 @@ var
gInplaceRename,
gInplaceRenameButton,
gDblClickToParent,
gDblClickEditPath,
gGoToRoot: Boolean;
gShowCurDirTitleBar: Boolean;
gActiveRight: Boolean;
@ -2023,6 +2024,7 @@ begin
gInplaceRename := False;
gInplaceRenameButton := True;
gDblClickToParent := False;
gDblClickEditPath := False;
gHotDirAddTargetOrNot := False;
gHotDirFullExpandOrNot:=False;
gShowPathInPopup:=FALSE;
@ -3063,6 +3065,7 @@ begin
gInplaceRename := GetValue(Node, 'InplaceRename', gInplaceRename);
gInplaceRenameButton := GetValue(Node, 'InplaceRenameButton', gInplaceRenameButton);
gDblClickToParent := GetValue(Node, 'DblClickToParent', gDblClickToParent);
gDblClickEditPath := GetValue(Node, 'DoubleClickEditPath', gDblClickEditPath);
gHotDirAddTargetOrNot:=GetValue(Node, 'HotDirAddTargetOrNot', gHotDirAddTargetOrNot);
gHotDirFullExpandOrNot:=GetValue(Node, 'HotDirFullExpandOrNot', gHotDirFullExpandOrNot);
gShowPathInPopup:=GetValue(Node, 'ShowPathInPopup', gShowPathInPopup);
@ -3675,6 +3678,7 @@ begin
SetValue(Node, 'InplaceRename', gInplaceRename);
SetValue(Node, 'InplaceRenameButton', gInplaceRenameButton);
SetValue(Node, 'DblClickToParent', gDblClickToParent);
SetValue(Node, 'DoubleClickEditPath', gDblClickEditPath);
SetValue(Node, 'HotDirAddTargetOrNot',gHotDirAddTargetOrNot);
SetValue(Node, 'HotDirFullExpandOrNot', gHotDirFullExpandOrNot);
SetValue(Node, 'ShowPathInPopup', gShowPathInPopup);