From 2f8ac652e33966e88e9e416a861d1562df0b2dc2 Mon Sep 17 00:00:00 2001 From: vincents Date: Fri, 12 Mar 2004 11:54:57 +0000 Subject: [PATCH] fixed 1.0.x compilation, removed double constants git-svn-id: trunk@5294 - --- lcl/filectrl.pp | 26 ++++++++++++++------------ lcl/include/filectrl.inc | 5 ++++- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/lcl/filectrl.pp b/lcl/filectrl.pp index 17dc371bcf..797e95f80a 100644 --- a/lcl/filectrl.pp +++ b/lcl/filectrl.pp @@ -41,7 +41,13 @@ interface {$endif} uses - Classes, SysUtils, StdCtrls; + Classes, SysUtils, +{$ifdef VER1_0} +// fpc 1.0.x needs unit in which redefined unit originally is defined +// otherwise IE 55665566 occurs. + Controls, +{$endif} + StdCtrls; Type @@ -71,7 +77,7 @@ Type procedure UpdateFileList; virtual; procedure Click; override; procedure Loaded; override; - function IndexOfFile(const Filename: string): integer; + function IndexOfFile(const AFilename: string): integer; public constructor Create(AOwner: TComponent); override; destructor Destroy; override; @@ -194,13 +200,6 @@ uses {$IFDEF Ver1_0}Linux{$ELSE}Unix,BaseUnix{$ENDIF}; {$ENDIF} -const - {$IFDEF Win32} - FindMask = '*.*'; - {$ELSE} - FindMask = '*'; - {$ENDIF} - var UpChars: array[char] of char; @@ -262,7 +261,7 @@ begin UpdateFileList; end; -function TCustomFileListBox.IndexOfFile(const Filename: string): integer; +function TCustomFileListBox.IndexOfFile(const AFilename: string): integer; begin Result:=0; while (ResultFindMask); + Result:=(FMask<>GetAllFilesMask); end; procedure TCustomFileListBox.SetDrive(const AValue: Char); @@ -330,7 +329,7 @@ var begin inherited Create(AOwner); //Initializes DirectorySeparator and the Mask property. - FMask := FindMask; + FMask := GetAllFilesMask; //Initializes the FileType property. FFileType := [ftNormal]; //Initializes the Directory and Drive properties to the current directory. @@ -367,6 +366,9 @@ end. { $Log$ + Revision 1.23 2004/03/12 11:54:57 vincents + fixed 1.0.x compilation, removed double constants + Revision 1.22 2004/03/11 00:07:26 mattias added TFileListBox from Luis diff --git a/lcl/include/filectrl.inc b/lcl/include/filectrl.inc index 9eaaaca19c..ade609fd57 100644 --- a/lcl/include/filectrl.inc +++ b/lcl/include/filectrl.inc @@ -731,7 +731,7 @@ var begin Result:=false; CurSrcDir:=CleanAndExpandDirectory(DirectoryName); - if SysUtils.FindFirst(CurSrcDir+FindMask,faAnyFile,FileInfo)=0 then begin + if SysUtils.FindFirst(CurSrcDir+GetAllFilesMask,faAnyFile,FileInfo)=0 then begin repeat // check if special file if (FileInfo.Name='.') or (FileInfo.Name='..') then continue; @@ -927,6 +927,9 @@ end; { $Log$ + Revision 1.43 2004/03/12 11:54:57 vincents + fixed 1.0.x compilation, removed double constants + Revision 1.42 2004/03/11 00:07:26 mattias added TFileListBox from Luis