|
@@ -230,6 +230,7 @@ type
|
|
private
|
|
private
|
|
procedure ShowDialog;
|
|
procedure ShowDialog;
|
|
procedure ShowIdentical;
|
|
procedure ShowIdentical;
|
|
|
|
+ procedure ShowTextIdentical;
|
|
procedure ShowProgressDialog;
|
|
procedure ShowProgressDialog;
|
|
procedure CloseProgressDialog;
|
|
procedure CloseProgressDialog;
|
|
procedure Clear(bLeft, bRight: Boolean);
|
|
procedure Clear(bLeft, bRight: Boolean);
|
|
@@ -409,6 +410,14 @@ begin
|
|
Application.QueueAsyncCall(@ShowFirstDifference, 0);
|
|
Application.QueueAsyncCall(@ShowFirstDifference, 0);
|
|
ShowDialog;
|
|
ShowDialog;
|
|
end;
|
|
end;
|
|
|
|
+ end
|
|
|
|
+ else if (modifies = 0) and (adds = 0) and (deletes = 0) then
|
|
|
|
+ begin
|
|
|
|
+ if (SynDiffEditLeft.Encoding <> SynDiffEditRight.Encoding) or
|
|
|
|
+ (SynDiffEditLeft.Lines.TextLineBreakStyle <> SynDiffEditRight.Lines.TextLineBreakStyle) then
|
|
|
|
+ begin
|
|
|
|
+ ShowTextIdentical;
|
|
|
|
+ end;
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
finally
|
|
finally
|
|
@@ -844,10 +853,40 @@ end;
|
|
procedure TfrmDiffer.ShowIdentical;
|
|
procedure TfrmDiffer.ShowIdentical;
|
|
var
|
|
var
|
|
Message: String;
|
|
Message: String;
|
|
|
|
+ Encoding, LineBreak: Boolean;
|
|
|
|
+ DlgType: TMsgDlgType = mtInformation;
|
|
begin
|
|
begin
|
|
Message:= rsDiffFilesIdentical + LineEnding + LineEnding;
|
|
Message:= rsDiffFilesIdentical + LineEnding + LineEnding;
|
|
Message+= edtFileNameLeft.Text + LineEnding + edtFileNameRight.Text;
|
|
Message+= edtFileNameLeft.Text + LineEnding + edtFileNameRight.Text;
|
|
- if MessageDlg(rsToolDiffer, Message, mtWarning, [mbIgnore, mbCancel], 0, mbIgnore) = mrCancel then
|
|
|
|
|
|
+ if not actBinaryCompare.Checked then
|
|
|
|
+ begin
|
|
|
|
+ Encoding:= (SynDiffEditLeft.Encoding <> SynDiffEditRight.Encoding);
|
|
|
|
+ LineBreak:= (SynDiffEditLeft.Lines.TextLineBreakStyle <> SynDiffEditRight.Lines.TextLineBreakStyle);
|
|
|
|
+ if Encoding or LineBreak then
|
|
|
|
+ begin
|
|
|
|
+ DlgType:= mtWarning;
|
|
|
|
+ Message:= rsDiffTextIdenticalNotMatch;
|
|
|
|
+ if Encoding then begin
|
|
|
|
+ Message+= LineEnding + rsDiffTextDifferenceEncoding +
|
|
|
|
+ Format(' (%s, %s)', [SynDiffEditLeft.Encoding, SynDiffEditRight.Encoding]);
|
|
|
|
+ end;
|
|
|
|
+ if LineBreak then begin
|
|
|
|
+ Message+= LineEnding + rsDiffTextDifferenceLineEnding;
|
|
|
|
+ end;
|
|
|
|
+ end
|
|
|
|
+ else if actIgnoreCase.Checked or actIgnoreWhiteSpace.Checked then
|
|
|
|
+ begin
|
|
|
|
+ DlgType:= mtWarning;
|
|
|
|
+ Message:= rsDiffTextIdentical;
|
|
|
|
+ if actIgnoreCase.Checked then begin
|
|
|
|
+ Message+= LineEnding + actIgnoreCase.Caption;
|
|
|
|
+ end;
|
|
|
|
+ if actIgnoreWhiteSpace.Checked then begin
|
|
|
|
+ Message+= LineEnding + actIgnoreWhiteSpace.Caption;
|
|
|
|
+ end;
|
|
|
|
+ end;
|
|
|
|
+ end;
|
|
|
|
+ if MessageDlg(rsToolDiffer, Message, DlgType, [mbIgnore, mbCancel], 0, mbIgnore) = mrCancel then
|
|
Close
|
|
Close
|
|
else begin
|
|
else begin
|
|
FShowIdentical:= False;
|
|
FShowIdentical:= False;
|
|
@@ -855,6 +894,18 @@ begin
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TfrmDiffer.ShowTextIdentical;
|
|
|
|
+var
|
|
|
|
+ Message: String;
|
|
|
|
+begin
|
|
|
|
+ Message:= rsDiffTextIdenticalNotMatch;
|
|
|
|
+ if (SynDiffEditLeft.Encoding <> SynDiffEditRight.Encoding) then
|
|
|
|
+ Message+= LineEnding + rsDiffTextDifferenceEncoding;
|
|
|
|
+ if (SynDiffEditLeft.Lines.TextLineBreakStyle <> SynDiffEditRight.Lines.TextLineBreakStyle) then
|
|
|
|
+ Message+= LineEnding + rsDiffTextDifferenceLineEnding;
|
|
|
|
+ MessageDlg(rsToolDiffer, Message, mtWarning, [mbOK], 0, mbOK);
|
|
|
|
+end;
|
|
|
|
+
|
|
procedure TfrmDiffer.ShowProgressDialog;
|
|
procedure TfrmDiffer.ShowProgressDialog;
|
|
var
|
|
var
|
|
lblPrompt : TLabel;
|
|
lblPrompt : TLabel;
|