mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: Check if icons are enabled at all when trying to load overlay icons for files.
This commit is contained in:
parent
ad44b76c4d
commit
16fa2aab06
2 changed files with 30 additions and 24 deletions
|
|
@ -784,18 +784,21 @@ begin
|
|||
if FFileSource.CanRetrieveProperties(FWorkingFile.FSFile, FFilePropertiesNeeded) then
|
||||
FFileSource.RetrieveProperties(FWorkingFile.FSFile, FFilePropertiesNeeded);
|
||||
|
||||
if HaveIcons and (FWorkingFile.IconID < 0) then
|
||||
FWorkingFile.IconID := PixMapManager.GetIconByFile(
|
||||
FWorkingFile.FSFile,
|
||||
fspDirectAccess in FFileSource.Properties,
|
||||
True);
|
||||
if HaveIcons then
|
||||
begin
|
||||
if FWorkingFile.IconID < 0 then
|
||||
FWorkingFile.IconID := PixMapManager.GetIconByFile(
|
||||
FWorkingFile.FSFile,
|
||||
fspDirectAccess in FFileSource.Properties,
|
||||
True);
|
||||
|
||||
{$IF DEFINED(MSWINDOWS)}
|
||||
if gIconOverlays and (FWorkingFile.IconOverlayID < 0) then
|
||||
FWorkingFile.IconOverlayID := PixMapManager.GetIconOverlayByFile(
|
||||
FWorkingFile.FSFile,
|
||||
fspDirectAccess in FFileSource.Properties);
|
||||
{$ENDIF}
|
||||
{$IF DEFINED(MSWINDOWS)}
|
||||
if gIconOverlays and (FWorkingFile.IconOverlayID < 0) then
|
||||
FWorkingFile.IconOverlayID := PixMapManager.GetIconOverlayByFile(
|
||||
FWorkingFile.FSFile,
|
||||
fspDirectAccess in FFileSource.Properties);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
if Aborted then
|
||||
Exit;
|
||||
|
|
|
|||
|
|
@ -303,15 +303,18 @@ begin
|
|||
AFile := FFiles[i];
|
||||
if AFile.FSFile.Name <> '..' then
|
||||
begin
|
||||
if HaveIcons and (AFile.IconID < 0) then
|
||||
AFile.IconID := PixMapManager.GetIconByFile(AFile.FSFile, fspDirectAccess in FileSource.Properties, True);
|
||||
{$IF DEFINED(MSWINDOWS)}
|
||||
if gIconOverlays and (AFile.IconOverlayID < 0) then
|
||||
if HaveIcons then
|
||||
begin
|
||||
AFile.IconOverlayID := PixMapManager.GetIconOverlayByFile(AFile.FSFile,
|
||||
fspDirectAccess in FileSource.Properties);
|
||||
if AFile.IconID < 0 then
|
||||
AFile.IconID := PixMapManager.GetIconByFile(AFile.FSFile, fspDirectAccess in FileSource.Properties, True);
|
||||
{$IF DEFINED(MSWINDOWS)}
|
||||
if gIconOverlays and (AFile.IconOverlayID < 0) then
|
||||
begin
|
||||
AFile.IconOverlayID := PixMapManager.GetIconOverlayByFile(AFile.FSFile,
|
||||
fspDirectAccess in FileSource.Properties);
|
||||
end;
|
||||
{$ENDIF}
|
||||
end;
|
||||
{$ENDIF}
|
||||
if FileSource.CanRetrieveProperties(AFile.FSFile, FilePropertiesNeeded) then
|
||||
FileSource.RetrieveProperties(AFile.FSFile, FilePropertiesNeeded);
|
||||
end;
|
||||
|
|
@ -324,11 +327,11 @@ begin
|
|||
begin
|
||||
AFile := FFiles[i];
|
||||
if (AFile.FSFile.Name <> '..') and
|
||||
(FileSource.CanRetrieveProperties(AFile.FSFile, FilePropertiesNeeded)
|
||||
or (HaveIcons and (AFile.IconID < 0))
|
||||
{$IF DEFINED(MSWINDOWS)}
|
||||
or (gIconOverlays and (AFile.IconOverlayID < 0))
|
||||
{$ENDIF}
|
||||
(FileSource.CanRetrieveProperties(AFile.FSFile, FilePropertiesNeeded) or
|
||||
(HaveIcons and ((AFile.IconID < 0)
|
||||
{$IF DEFINED(MSWINDOWS)}
|
||||
or (gIconOverlays and (AFile.IconOverlayID < 0))))
|
||||
{$ENDIF}
|
||||
) then
|
||||
begin
|
||||
if not Assigned(AFileList) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue