Browse Source

UPD: Differ - move auto-compare option to doublecmd.xml (fixes #607)

Alexander Koblov 3 years ago
parent
commit
c612db2577
3 changed files with 7 additions and 1 deletions
  1. 1 1
      src/fdiffer.lfm
  2. 2 0
      src/fdiffer.pas
  3. 4 0
      src/uglobs.pas

+ 1 - 1
src/fdiffer.lfm

@@ -13,7 +13,7 @@ object frmDiffer: TfrmDiffer
   OnDestroy = FormDestroy
   OnKeyDown = FormKeyDown
   OnResize = FormResize
-  SessionProperties = 'actAutoCompare.Checked;Height;Left;Top;Width;WindowState'
+  SessionProperties = 'Height;Left;Top;Width;WindowState'
   ShowHint = True
   ShowInTaskBar = stAlways
   LCLVersion = '2.2.0.4'

+ 2 - 0
src/fdiffer.pas

@@ -780,6 +780,7 @@ begin
 
   // Load settings
   actIgnoreCase.Checked := gDifferIgnoreCase;
+  actAutoCompare.Checked := gDifferAutoCompare;
   actKeepScrolling.Checked := gDifferKeepScrolling;
   actLineDifferences.Checked := gDifferLineDifferences;
   actPaintBackground.Checked := gDifferPaintBackground;
@@ -1004,6 +1005,7 @@ begin
   CloseAction:= caFree;
   // Save settings
   gDifferIgnoreCase := actIgnoreCase.Checked;
+  gDifferAutoCompare := actAutoCompare.Checked;
   gDifferKeepScrolling := actKeepScrolling.Checked;
   gDifferLineDifferences := actLineDifferences.Checked;
   gDifferPaintBackground := actPaintBackground.Checked;

+ 4 - 0
src/uglobs.pas

@@ -646,6 +646,7 @@ var
 
   { Differ }
   gDifferIgnoreCase,
+  gDifferAutoCompare,
   gDifferKeepScrolling,
   gDifferLineDifferences,
   gDifferPaintBackground,
@@ -2065,6 +2066,7 @@ begin
 
   { Differ }
   gDifferIgnoreCase := False;
+  gDifferAutoCompare := True;
   gDifferKeepScrolling := True;
   gDifferPaintBackground := True;
   gDifferLineDifferences := False;
@@ -3174,6 +3176,7 @@ begin
     if Assigned(Node) then
     begin
       gDifferIgnoreCase := GetValue(Node, 'IgnoreCase', gDifferIgnoreCase);
+      gDifferAutoCompare := GetValue(Node, 'AutoCompare', gDifferAutoCompare);
       gDifferKeepScrolling := GetValue(Node, 'KeepScrolling', gDifferKeepScrolling);
       gDifferPaintBackground := GetValue(Node, 'PaintBackground', gDifferPaintBackground);
       gDifferLineDifferences := GetValue(Node, 'LineDifferences', gDifferLineDifferences);
@@ -3793,6 +3796,7 @@ begin
     { Differ }
     Node := FindNode(Root, 'Differ',True);
     SetValue(Node, 'IgnoreCase', gDifferIgnoreCase);
+    SetValue(Node, 'AutoCompare', gDifferAutoCompare);
     SetValue(Node, 'KeepScrolling', gDifferKeepScrolling);
     SetValue(Node, 'PaintBackground', gDifferPaintBackground);
     SetValue(Node, 'LineDifferences', gDifferLineDifferences);