mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
UPD: Toggle logic
This commit is contained in:
parent
fee5c36bc8
commit
24bfff6548
2 changed files with 22 additions and 2 deletions
|
|
@ -1584,6 +1584,7 @@ object frmDiffer: TfrmDiffer
|
|||
end
|
||||
object actCancelCompare: TAction
|
||||
Caption = 'Cancel'
|
||||
Enabled = False
|
||||
Hint = 'Cancel'
|
||||
ImageIndex = 7
|
||||
OnExecute = actCancelCompareExecute
|
||||
|
|
|
|||
|
|
@ -295,6 +295,7 @@ begin
|
|||
begin
|
||||
actStartCompare.Enabled := False;
|
||||
actCancelCompare.Enabled := True;
|
||||
actBinaryCompare.Enabled := False;
|
||||
BinaryCompare:= TBinaryCompare.Create(BinaryViewerLeft.GetDataAdr,
|
||||
BinaryViewerRight.GetDataAdr,
|
||||
BinaryViewerLeft.FileSize,
|
||||
|
|
@ -469,8 +470,13 @@ begin
|
|||
|
||||
if actBinaryCompare.Checked then
|
||||
begin
|
||||
BinaryDiffList.Clear;
|
||||
BinaryViewerLeft.FileName:= edtFileNameLeft.Text;
|
||||
BinaryViewerRight.FileName:= edtFileNameRight.Text;
|
||||
StatusBar.Panels[0].Text := EmptyStr;
|
||||
StatusBar.Panels[1].Text := EmptyStr;
|
||||
StatusBar.Panels[2].Text := EmptyStr;
|
||||
StatusBar.Panels[3].Text := EmptyStr;
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
|
@ -590,12 +596,14 @@ procedure TfrmDiffer.edtFileNameLeftAcceptFileName(Sender: TObject;
|
|||
var Value: String);
|
||||
begin
|
||||
OpenFileLeft(Value);
|
||||
if actAutoCompare.Checked then actStartCompare.Execute;
|
||||
end;
|
||||
|
||||
procedure TfrmDiffer.edtFileNameRightAcceptFileName(Sender: TObject;
|
||||
var Value: String);
|
||||
begin
|
||||
OpenFileRight(Value);
|
||||
if actAutoCompare.Checked then actStartCompare.Execute;
|
||||
end;
|
||||
|
||||
procedure TfrmDiffer.FormCreate(Sender: TObject);
|
||||
|
|
@ -692,6 +700,7 @@ begin
|
|||
StatusBar.Panels[3].Text := EmptyStr;
|
||||
actStartCompare.Enabled := True;
|
||||
actCancelCompare.Enabled := False;
|
||||
actBinaryCompare.Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TfrmDiffer.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
|
|
@ -1063,7 +1072,12 @@ end;
|
|||
procedure TfrmDiffer.OpenFileLeft(const FileName: UTF8String);
|
||||
begin
|
||||
if not mbFileExists(FileName) then Exit;
|
||||
try
|
||||
if actBinaryCompare.Checked then
|
||||
begin
|
||||
BinaryDiffList.Clear;
|
||||
BinaryViewerLeft.FileName:= FileName
|
||||
end
|
||||
else try
|
||||
Clear(True, False);
|
||||
LoadFromFile(SynDiffEditLeft, FileName);
|
||||
BuildHashList(True, False);
|
||||
|
|
@ -1077,7 +1091,12 @@ end;
|
|||
procedure TfrmDiffer.OpenFileRight(const FileName: UTF8String);
|
||||
begin
|
||||
if not mbFileExists(FileName) then Exit;
|
||||
try
|
||||
if actBinaryCompare.Checked then
|
||||
begin
|
||||
BinaryDiffList.Clear;
|
||||
BinaryViewerRight.FileName:= FileName
|
||||
end
|
||||
else try
|
||||
Clear(False, True);
|
||||
LoadFromFile(SynDiffEditRight, FileName);
|
||||
BuildHashList(False, True);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue