updated filedate, after file on disk check

git-svn-id: trunk@8662 -
This commit is contained in:
mattias 2006-01-30 10:38:28 +00:00
parent 7091bb7446
commit 395c164a81
4 changed files with 54 additions and 52 deletions

View File

@ -64,7 +64,6 @@ type
procedure SetFilename(Value: string);
procedure SetScanner(const Value: TLinkScanner);
procedure SetIsDeleted(const NewValue: boolean);
procedure MakeFileDateValid;
public
constructor Create;
destructor Destroy; override;
@ -85,6 +84,7 @@ type
procedure UnlockAutoDiskRevert;
procedure IncrementRefCount;
procedure ReleaseRefCount;
procedure MakeFileDateValid;
public
property CodeCache: TCodeCache read FCodeCache write FCodeCache;
property Filename: string read FFilename write SetFilename;

View File

@ -88,12 +88,12 @@ function ShowDiskDiffsDialog(AnUnitList: TList): TModalResult;
i: Integer;
CurUnit: TUnitInfo;
fs: TFileStream;
KeepUnit: Boolean;
UnitDidNotChange: Boolean;
s: string;
begin
for i:=AnUnitList.Count-1 downto 0 do begin
CurUnit:=TUnitInfo(AnUnitList[i]);
KeepUnit:=true;
UnitDidNotChange:=false;
try
fs:=TFileStream.Create(CurUnit.Filename,fmOpenRead);
try
@ -102,7 +102,7 @@ function ShowDiskDiffsDialog(AnUnitList: TList): TModalResult;
SetLength(s,fs.Size);
fs.Read(s[1],length(s));
if s=CurUnit.Source.Source then
KeepUnit:=false;
UnitDidNotChange:=true;
end;
finally
fs.Free;
@ -110,8 +110,10 @@ function ShowDiskDiffsDialog(AnUnitList: TList): TModalResult;
except
// unable to load
end;
if not KeepUnit then
if UnitDidNotChange then begin
if (CurUnit.Source<>nil) then CurUnit.Source.MakeFileDateValid;
AnUnitList.Delete(i);
end;
end;
end;

View File

@ -2,26 +2,26 @@ object NewOtherDialog: TNewOtherDialog
ActiveControl = ItemsTreeView
BorderStyle = bsSizeToolWin
Caption = 'NewOtherDialog'
ClientHeight = 300
ClientWidth = 400
PixelsPerInch = 96
ClientHeight = 296
ClientWidth = 397
PixelsPerInch = 112
Position = poScreenCenter
HorzScrollBar.Page = 399
VertScrollBar.Page = 299
HorzScrollBar.Page = 396
VertScrollBar.Page = 295
Left = 481
Height = 300
Height = 296
Top = 362
Width = 400
Width = 397
object ItemsTreeView: TTreeView
Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Around = 6
DefaultItemHeight = 15
DefaultItemHeight = 14
TabOrder = 0
OnClick = ItemsTreeViewClick
OnDblClick = OkButtonClick
OnSelectionChanged = ItemsTreeViewSelectionChanged
Left = 6
Height = 250
Height = 246
Top = 6
Width = 178
end
@ -29,17 +29,17 @@ object NewOtherDialog: TNewOtherDialog
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6
Caption = 'DescriptionGroupBox'
ClientHeight = 232
ClientWidth = 200
ClientHeight = 229
ClientWidth = 197
TabOrder = 1
AnchorSideLeft.Control = ItemsTreeView
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 190
Height = 250
Height = 246
Top = 6
Width = 204
Width = 201
object DescriptionLabel: TLabel
Align = alClient
BorderSpacing.Around = 6
@ -48,9 +48,9 @@ object NewOtherDialog: TNewOtherDialog
ParentColor = False
WordWrap = True
Left = 6
Height = 220
Height = 217
Top = 6
Width = 188
Width = 185
end
end
object CancelButton: TButton
@ -62,9 +62,9 @@ object NewOtherDialog: TNewOtherDialog
ModalResult = 2
TabOrder = 2
Left = 306
Height = 29
Top = 265
Width = 88
Height = 26
Top = 264
Width = 85
end
object OkButton: TButton
Anchors = [akRight, akBottom]
@ -76,9 +76,9 @@ object NewOtherDialog: TNewOtherDialog
OnClick = OkButtonClick
TabOrder = 3
AnchorSideRight.Control = CancelButton
Left = 231
Height = 29
Top = 265
Width = 69
Left = 239
Height = 26
Top = 264
Width = 61
end
end

View File

@ -3,29 +3,29 @@
LazarusResources.Add('TNewOtherDialog','FORMDATA',[
'TPF0'#15'TNewOtherDialog'#14'NewOtherDialog'#13'ActiveControl'#7#13'ItemsTre'
+'eView'#11'BorderStyle'#7#13'bsSizeToolWin'#7'Caption'#6#14'NewOtherDialog'
+#12'ClientHeight'#3','#1#11'ClientWidth'#3#144#1#13'PixelsPerInch'#2'`'#8'Po'
+'sition'#7#14'poScreenCenter'#18'HorzScrollBar.Page'#3#143#1#18'VertScrollBa'
+'r.Page'#3'+'#1#4'Left'#3#225#1#6'Height'#3','#1#3'Top'#3'j'#1#5'Width'#3#144
+#1#0#9'TTreeView'#13'ItemsTreeView'#7'Anchors'#11#5'akTop'#6'akLeft'#8'akBot'
+'tom'#0#20'BorderSpacing.Around'#2#6#17'DefaultItemHeight'#2#15#8'TabOrder'#2
+#0#7'OnClick'#7#18'ItemsTreeViewClick'#10'OnDblClick'#7#13'OkButtonClick'#18
+'OnSelectionChanged'#7#29'ItemsTreeViewSelectionChanged'#4'Left'#2#6#6'Heigh'
+'t'#3#250#0#3'Top'#2#6#5'Width'#3#178#0#0#0#9'TGroupBox'#19'DescriptionGroup'
+'Box'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#20'BorderSpa'
+'cing.Around'#2#6#7'Caption'#6#19'DescriptionGroupBox'#12'ClientHeight'#3#232
+#0#11'ClientWidth'#3#200#0#8'TabOrder'#2#1#22'AnchorSideLeft.Control'#7#13'I'
+'temsTreeView'#19'AnchorSideLeft.Side'#7#9'asrBottom'#23'AnchorSideRight.Con'
+'trol'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#190#0#6
+'Height'#3#250#0#3'Top'#2#6#5'Width'#3#204#0#0#6'TLabel'#16'DescriptionLabel'
+#5'Align'#7#8'alClient'#20'BorderSpacing.Around'#2#6#7'Caption'#6#16'Descrip'
+'tionLabel'#5'Color'#7#6'clNone'#11'ParentColor'#8#8'WordWrap'#9#4'Left'#2#6
+#6'Height'#3#220#0#3'Top'#2#6#5'Width'#3#188#0#0#0#0#7'TButton'#12'CancelBut'
+'ton'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.'
+'Around'#2#6#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#12'CancelButton'
+#11'ModalResult'#2#2#8'TabOrder'#2#2#4'Left'#3'2'#1#6'Height'#2#29#3'Top'#3#9
+#1#5'Width'#2'X'#0#0#7'TButton'#8'OkButton'#7'Anchors'#11#7'akRight'#8'akBot'
+'tom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#25'BorderSpacing.InnerBor'
+'der'#2#2#7'Caption'#6#8'OkButton'#7'Enabled'#8#7'OnClick'#7#13'OkButtonClic'
+'k'#8'TabOrder'#2#3#23'AnchorSideRight.Control'#7#12'CancelButton'#4'Left'#3
+#231#0#6'Height'#2#29#3'Top'#3#9#1#5'Width'#2'E'#0#0#0
+#12'ClientHeight'#3'('#1#11'ClientWidth'#3#141#1#13'PixelsPerInch'#2'p'#8'Po'
+'sition'#7#14'poScreenCenter'#18'HorzScrollBar.Page'#3#140#1#18'VertScrollBa'
+'r.Page'#3''''#1#4'Left'#3#225#1#6'Height'#3'('#1#3'Top'#3'j'#1#5'Width'#3
+#141#1#0#9'TTreeView'#13'ItemsTreeView'#7'Anchors'#11#5'akTop'#6'akLeft'#8'a'
+'kBottom'#0#20'BorderSpacing.Around'#2#6#17'DefaultItemHeight'#2#14#8'TabOrd'
+'er'#2#0#7'OnClick'#7#18'ItemsTreeViewClick'#10'OnDblClick'#7#13'OkButtonCli'
+'ck'#18'OnSelectionChanged'#7#29'ItemsTreeViewSelectionChanged'#4'Left'#2#6#6
+'Height'#3#246#0#3'Top'#2#6#5'Width'#3#178#0#0#0#9'TGroupBox'#19'Description'
+'GroupBox'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#20'Bord'
+'erSpacing.Around'#2#6#7'Caption'#6#19'DescriptionGroupBox'#12'ClientHeight'
+#3#229#0#11'ClientWidth'#3#197#0#8'TabOrder'#2#1#22'AnchorSideLeft.Control'#7
+#13'ItemsTreeView'#19'AnchorSideLeft.Side'#7#9'asrBottom'#23'AnchorSideRight'
+'.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#190#0
+#6'Height'#3#246#0#3'Top'#2#6#5'Width'#3#201#0#0#6'TLabel'#16'DescriptionLab'
+'el'#5'Align'#7#8'alClient'#20'BorderSpacing.Around'#2#6#7'Caption'#6#16'Des'
+'criptionLabel'#5'Color'#7#6'clNone'#11'ParentColor'#8#8'WordWrap'#9#4'Left'
+#2#6#6'Height'#3#217#0#3'Top'#2#6#5'Width'#3#185#0#0#0#0#7'TButton'#12'Cance'
+'lButton'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpac'
+'ing.Around'#2#6#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#12'CancelBut'
+'ton'#11'ModalResult'#2#2#8'TabOrder'#2#2#4'Left'#3'2'#1#6'Height'#2#26#3'To'
+'p'#3#8#1#5'Width'#2'U'#0#0#7'TButton'#8'OkButton'#7'Anchors'#11#7'akRight'#8
+'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#25'BorderSpacing.Inn'
+'erBorder'#2#2#7'Caption'#6#8'OkButton'#7'Enabled'#8#7'OnClick'#7#13'OkButto'
+'nClick'#8'TabOrder'#2#3#23'AnchorSideRight.Control'#7#12'CancelButton'#4'Le'
+'ft'#3#239#0#6'Height'#2#26#3'Top'#3#8#1#5'Width'#2'='#0#0#0
]);