mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-14 02:19:39 +02:00
ide: DiskDiffsDlg: add AutoCheckModifiedFiles check box
git-svn-id: trunk@51945 -
This commit is contained in:
parent
34015a1f71
commit
335c6cd563
@ -1,11 +1,11 @@
|
||||
object DiskDiffsDlg: TDiskDiffsDlg
|
||||
Left = 314
|
||||
Height = 354
|
||||
Height = 353
|
||||
Top = 351
|
||||
Width = 600
|
||||
ActiveControl = FilesListBox
|
||||
Caption = 'DiskDiffsDlg'
|
||||
ClientHeight = 354
|
||||
ClientHeight = 353
|
||||
ClientWidth = 600
|
||||
KeyPreview = True
|
||||
OnClose = FormClose
|
||||
@ -27,7 +27,7 @@ object DiskDiffsDlg: TDiskDiffsDlg
|
||||
inline DiffSynEdit: TSynEdit
|
||||
AnchorSideBottom.Control = CheckDiskChangesWithLoadingCheckBox
|
||||
Left = 6
|
||||
Height = 189
|
||||
Height = 167
|
||||
Top = 97
|
||||
Width = 588
|
||||
Align = alTop
|
||||
@ -40,7 +40,7 @@ object DiskDiffsDlg: TDiskDiffsDlg
|
||||
Font.Quality = fqNonAntialiased
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
TabOrder = 2
|
||||
BookMarkOptions.Xoffset = -18
|
||||
Gutter.Visible = False
|
||||
Gutter.Width = 59
|
||||
@ -574,24 +574,24 @@ object DiskDiffsDlg: TDiskDiffsDlg
|
||||
AnchorSideBottom.Control = BtnPanel
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 292
|
||||
Top = 270
|
||||
Width = 241
|
||||
Anchors = [akLeft, akBottom]
|
||||
Anchors = [akLeft]
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'CheckDiskChangesWithLoadingCheckBox'
|
||||
TabOrder = 2
|
||||
TabOrder = 3
|
||||
end
|
||||
object BtnPanel: TPanel
|
||||
Left = 0
|
||||
Height = 37
|
||||
Top = 317
|
||||
Top = 316
|
||||
Width = 600
|
||||
Align = alBottom
|
||||
AutoSize = True
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 37
|
||||
ClientWidth = 600
|
||||
TabOrder = 4
|
||||
TabOrder = 5
|
||||
object RevertButton: TButton
|
||||
Left = 499
|
||||
Height = 25
|
||||
@ -618,6 +618,20 @@ object DiskDiffsDlg: TDiskDiffsDlg
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object AutoCheckModifiedFilesCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = CheckDiskChangesWithLoadingCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Control = BtnPanel
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 295
|
||||
Width = 202
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'AutoCheckModifiedFilesCheckBox'
|
||||
TabOrder = 4
|
||||
end
|
||||
object SynDiffSyn1: TSynDiffSyn
|
||||
Enabled = False
|
||||
left = 135
|
||||
|
@ -60,6 +60,7 @@ type
|
||||
TDiskDiffsDlg = class(TForm)
|
||||
BtnPanel: TPanel;
|
||||
CheckDiskChangesWithLoadingCheckBox: TCheckBox;
|
||||
AutoCheckModifiedFilesCheckBox: TCheckBox;
|
||||
DiffSynEdit: TSynEdit;
|
||||
FilesListBox: TCheckListBox;
|
||||
RevertButton: TButton;
|
||||
@ -216,6 +217,7 @@ end;
|
||||
procedure TDiskDiffsDlg.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
begin
|
||||
EnvironmentOptions.CheckDiskChangesWithLoading:=CheckDiskChangesWithLoadingCheckBox.Checked;
|
||||
EnvironmentOptions.DiskChangesAutoCheckModified:=AutoCheckModifiedFilesCheckBox.Checked;
|
||||
end;
|
||||
|
||||
procedure TDiskDiffsDlg.FillFilesListBox;
|
||||
@ -227,25 +229,29 @@ begin
|
||||
FilesListBox.Items.BeginUpdate;
|
||||
FilesListBox.Items.Clear;
|
||||
if UnitList<>nil then
|
||||
begin
|
||||
for i:=0 to UnitList.Count-1 do begin
|
||||
AnUnitInfo:=TUnitInfo(UnitList[i]);
|
||||
AFileName:=AnUnitInfo.ShortFilename;
|
||||
if AnUnitInfo.Modified then
|
||||
AFileName:='*'+AFileName;
|
||||
ii := FilesListBox.Items.AddObject(AFileName,AnUnitInfo);
|
||||
if not AnUnitInfo.Modified then
|
||||
if AutoCheckModifiedFilesCheckBox.Checked or not AnUnitInfo.Modified then
|
||||
FilesListBox.Checked[ii] := True;
|
||||
end;
|
||||
end;
|
||||
if PackageList<>nil then
|
||||
begin
|
||||
for i:=0 to PackageList.Count-1 do begin
|
||||
APackage:=TLazPackage(PackageList.Objects[i]);
|
||||
AFileName:=APackage.Filename;
|
||||
if APackage.Modified then
|
||||
AFileName:='*'+AFileName;
|
||||
ii := FilesListBox.Items.AddObject(AFileName,APackage);
|
||||
if not APackage.Modified then
|
||||
if AutoCheckModifiedFilesCheckBox.Checked or not APackage.Modified then
|
||||
FilesListBox.Checked[ii] := True;
|
||||
end;
|
||||
end;
|
||||
FilesListBox.Items.EndUpdate;
|
||||
end;
|
||||
|
||||
@ -363,6 +369,8 @@ begin
|
||||
IgnoreDiskChangesButton.Caption:=lisDiskDiffIgnoreAllDiskChanges;
|
||||
CheckDiskChangesWithLoadingCheckBox.Caption:=lisCheckForDiskFileChangesViaContent;
|
||||
CheckDiskChangesWithLoadingCheckBox.Checked:=EnvironmentOptions.CheckDiskChangesWithLoading;
|
||||
AutoCheckModifiedFilesCheckBox.Caption:=lisAutoCheckModifiedFiles;
|
||||
AutoCheckModifiedFilesCheckBox.Checked:=EnvironmentOptions.DiskChangesAutoCheckModified;
|
||||
|
||||
DefaultControl:=RevertButton;
|
||||
CancelControl:=IgnoreDiskChangesButton;
|
||||
|
@ -451,6 +451,7 @@ type
|
||||
// hints
|
||||
FAskSaveSessionOnly: boolean;
|
||||
FCheckDiskChangesWithLoading: boolean;
|
||||
FDiskChangesAutoCheckModified: boolean;
|
||||
FShowHintsForComponentPalette: boolean;
|
||||
FShowHintsForMainSpeedButtons: boolean;
|
||||
|
||||
@ -701,6 +702,8 @@ type
|
||||
// hints
|
||||
property CheckDiskChangesWithLoading: boolean read FCheckDiskChangesWithLoading
|
||||
write FCheckDiskChangesWithLoading;
|
||||
property DiskChangesAutoCheckModified: boolean read FDiskChangesAutoCheckModified
|
||||
write FDiskChangesAutoCheckModified;
|
||||
property ShowHintsForComponentPalette: boolean read FShowHintsForComponentPalette
|
||||
write FShowHintsForComponentPalette;
|
||||
property ShowHintsForMainSpeedButtons: boolean read FShowHintsForMainSpeedButtons
|
||||
@ -1357,6 +1360,7 @@ begin
|
||||
|
||||
// hints
|
||||
FCheckDiskChangesWithLoading:=false;
|
||||
FDiskChangesAutoCheckModified:=false;
|
||||
FShowHintsForComponentPalette:=true;
|
||||
FShowHintsForMainSpeedButtons:=true;
|
||||
|
||||
@ -1795,6 +1799,7 @@ begin
|
||||
|
||||
// hints
|
||||
FCheckDiskChangesWithLoading:=FXMLCfg.GetValue(Path+'CheckDiskChangesWithLoading/Value',false);
|
||||
FDiskChangesAutoCheckModified:=FXMLCfg.GetValue(Path+'DiskChangesAutoCheckModified/Value',false);
|
||||
FShowHintsForComponentPalette:=FXMLCfg.GetValue(Path+'ShowHintsForComponentPalette/Value',true);
|
||||
FShowHintsForMainSpeedButtons:=FXMLCfg.GetValue(Path+'ShowHintsForMainSpeedButtons/Value',true);
|
||||
|
||||
@ -2139,6 +2144,7 @@ begin
|
||||
|
||||
// hints
|
||||
FXMLCfg.SetDeleteValue(Path+'CheckDiskChangesWithLoading/Value',FCheckDiskChangesWithLoading,false);
|
||||
FXMLCfg.SetDeleteValue(Path+'DiskChangesAutoCheckModified/Value',FDiskChangesAutoCheckModified,false);
|
||||
FXMLCfg.SetDeleteValue(Path+'ShowHintsForComponentPalette/Value',FShowHintsForComponentPalette,true);
|
||||
FXMLCfg.SetDeleteValue(Path+'ShowHintsForMainSpeedButtons/Value',FShowHintsForMainSpeedButtons,true);
|
||||
|
||||
|
@ -1199,6 +1199,7 @@ resourcestring
|
||||
lisMessagesWindow = 'Messages Window';
|
||||
lisCheckForDiskFileChangesViaContent = 'Check for disk file changes via content '
|
||||
+'rather than timestamp';
|
||||
lisAutoCheckModifiedFiles = 'Automatically check (select) modified files';
|
||||
lisSlowerButMoreAccurate = 'Slower but more accurate.';
|
||||
|
||||
// Search dialog
|
||||
|
Loading…
Reference in New Issue
Block a user