mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: Option to change editor wait time
This commit is contained in:
parent
e7aca838ad
commit
b810bf3c99
3 changed files with 7 additions and 3 deletions
|
|
@ -72,7 +72,7 @@ begin
|
|||
begin
|
||||
FWaitData:= aWaitData;
|
||||
// Show wait window
|
||||
Show;
|
||||
Visible := True;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
@ -131,7 +131,6 @@ procedure TfrmFileExecuteYourSelf.FormClose(Sender: TObject;
|
|||
var CloseAction: TCloseAction);
|
||||
begin
|
||||
CloseAction:= caFree;
|
||||
if Assigned(FWaitData) then EditDone(FWaitData);
|
||||
end;
|
||||
|
||||
procedure TfrmFileExecuteYourSelf.FormCreate(Sender: TObject);
|
||||
|
|
@ -156,6 +155,7 @@ begin
|
|||
// Delete the temporary file source and all files inside.
|
||||
FFileSource:= nil;
|
||||
inherited Destroy;
|
||||
if Assigned(FWaitData) then EditDone(FWaitData);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
|
|
|||
|
|
@ -478,6 +478,7 @@ var
|
|||
gTextPosition:PtrInt;
|
||||
|
||||
{ Editor }
|
||||
gEditWaitTime: Integer;
|
||||
gEditorSynEditOptions: TSynEditorOptions;
|
||||
|
||||
{SyncDirs}
|
||||
|
|
@ -1590,6 +1591,7 @@ begin
|
|||
gViewerHeight:=Screen.WorkAreaHeight;
|
||||
|
||||
{ Editor }
|
||||
gEditWaitTime := 2000;
|
||||
gEditorSynEditOptions := SYNEDIT_DEFAULT_OPTIONS;
|
||||
|
||||
{SyncDirs}
|
||||
|
|
@ -2801,6 +2803,7 @@ begin
|
|||
Node := Root.FindNode('Editor');
|
||||
if Assigned(Node) then
|
||||
begin
|
||||
gEditWaitTime := GetValue(Node, 'EditWaitTime', gEditWaitTime);
|
||||
gEditorSynEditOptions := TSynEditorOptions(GetValue(Node, 'SynEditOptions', Integer(gEditorSynEditOptions)));
|
||||
end;
|
||||
|
||||
|
|
@ -3266,6 +3269,7 @@ begin
|
|||
|
||||
{ Editor }
|
||||
Node := FindNode(Root, 'Editor',True);
|
||||
SetValue(Node, 'EditWaitTime', gEditWaitTime);
|
||||
SetValue(Node, 'SynEditOptions', Integer(gEditorSynEditOptions));
|
||||
|
||||
{ SyncDirs }
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@ begin
|
|||
Process.Execute;
|
||||
Process.Free;
|
||||
|
||||
if GetTickCount64 - StartTime < 800 then
|
||||
if GetTickCount64 - StartTime < gEditWaitTime then
|
||||
begin
|
||||
Synchronize(@ShowWaitForm);
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue