diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-04-02 11:48:22 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-04-02 11:48:22 +0000 |
commit | 30801f5f8b67c7f411de0a18b29aa317da46599a (patch) | |
tree | 2cae4fd9d3384472b0c72ec9519594125923c434 /src/corelib/gdi | |
parent | af6858abfeff1f2e9d5e6aa2c23e8df5f3864e8f (diff) | |
download | fpGUI-30801f5f8b67c7f411de0a18b29aa317da46599a.tar.xz |
* Applied patch from Vladimir removing all IFDEFs from gui_grid.
* Fixed compiler error under Linux.
* Fixed painting of shortcut / symlink symbol overlay.
Diffstat (limited to 'src/corelib/gdi')
-rw-r--r-- | src/corelib/gdi/gfx_gdi.pas | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/corelib/gdi/gfx_gdi.pas b/src/corelib/gdi/gfx_gdi.pas index e620ac26..b2f6970b 100644 --- a/src/corelib/gdi/gfx_gdi.pas +++ b/src/corelib/gdi/gfx_gdi.pas @@ -209,7 +209,12 @@ type end; + { TfpgFileListImpl } + TfpgFileListImpl = class(TfpgFileListBase) + function EncodeAttributesString(attrs: longword): TFileModeString; + constructor Create; override; + function InitializeEntry(sr: TSearchRec): TFileEntry; override; procedure PopulateSpecialDirs(const aDirectory: TfpgString); override; end; @@ -2020,6 +2025,35 @@ end; { TfpgFileListImpl } +function TfpgFileListImpl.EncodeAttributesString(attrs: longword + ): TFileModeString; +begin + Result := ''; + //if (attrs and FILE_ATTRIBUTE_ARCHIVE) <> 0 then s := s + 'a' else s := s + ' '; + if (attrs and FILE_ATTRIBUTE_HIDDEN) <> 0 then Result := Result + 'h'; + if (attrs and FILE_ATTRIBUTE_READONLY) <> 0 then Result := Result + 'r'; + if (attrs and FILE_ATTRIBUTE_SYSTEM) <> 0 then Result := Result + 's'; + if (attrs and FILE_ATTRIBUTE_TEMPORARY) <> 0 then Result := Result + 't'; + if (attrs and FILE_ATTRIBUTE_COMPRESSED) <> 0 then Result := Result + 'c'; +end; + +constructor TfpgFileListImpl.Create; +begin + inherited Create; + FHasFileMode := false; +end; + +function TfpgFileListImpl.InitializeEntry(sr: TSearchRec): TFileEntry; +begin + Result := inherited InitializeEntry(sr); + if Assigned(Result) then + begin + // using sr.Attr here is incorrect and needs to be improved! + Result.Attributes := EncodeAttributesString(sr.Attr); + Result.IsExecutable := (LowerCase(Result.Extension) = '.exe'); + end; +end; + procedure TfpgFileListImpl.PopulateSpecialDirs(const aDirectory: TfpgString); const MAX_DRIVES = 25; |