mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-13 17:59:32 +02:00
lcl: less warnings
git-svn-id: trunk@53138 -
This commit is contained in:
parent
ad2a1d0c2d
commit
425d1ffeb1
@ -292,8 +292,8 @@ end;
|
||||
procedure TCustomFileListBox.UpdateFileList;
|
||||
const
|
||||
AttrNotNormal = faReadOnly or
|
||||
faHidden or
|
||||
faSysFile or
|
||||
faHidden{%H-} or
|
||||
faSysFile{%H-} or
|
||||
faVolumeID or
|
||||
faDirectory or
|
||||
faArchive;
|
||||
@ -305,9 +305,9 @@ var
|
||||
FileTypeToAttrMap: array[TFileAttr] of LongInt =
|
||||
(
|
||||
{ ftReadOnly } faReadOnly,
|
||||
{ ftHidden } faHidden,
|
||||
{ ftSystem } faSysFile,
|
||||
{ ftVolumeID } faVolumeId,
|
||||
{ ftHidden } faHidden{%H-},
|
||||
{ ftSystem } faSysFile{%H-},
|
||||
{ ftVolumeID } faVolumeId{%H-},
|
||||
{ ftDirectory } faDirectory,
|
||||
{ ftArchive } faArchive,
|
||||
{ ftNormal } 0
|
||||
|
@ -4674,8 +4674,6 @@ procedure TGtk2WidgetSet.DestroyLCLComponent(Sender : TObject);
|
||||
var
|
||||
handle: hwnd; // handle of sender
|
||||
Widget: PGtkWidget;
|
||||
APage: TCustomPage;
|
||||
NoteBookWidget: PGtkNotebook;
|
||||
GtkWindow: PGtkWidget;
|
||||
begin
|
||||
Handle := HWnd({%H-}PtrUInt(ObjectToGtkObject(Sender)));
|
||||
|
@ -43,7 +43,7 @@ type
|
||||
class procedure SetCallbacks(const AGtkWidget: PGtkWidget; const AWidgetInfo: PWidgetInfo); virtual;
|
||||
class procedure SetSizes(const AGtkWidget: PGtkWidget; const AWidgetInfo: PWidgetInfo); virtual;
|
||||
published
|
||||
class function CreateHandle(const ACommonDialog: TCommonDialog): THandle; override;
|
||||
class function CreateHandle(const {%H-}ACommonDialog: TCommonDialog): THandle; override;
|
||||
class procedure ShowModal(const ACommonDialog: TCommonDialog); override;
|
||||
class procedure DestroyHandle(const ACommonDialog: TCommonDialog); override;
|
||||
end;
|
||||
@ -66,21 +66,21 @@ type
|
||||
class procedure CreatePreviewDialogControl(PreviewDialog: TPreviewFileDialog; SelWidget: PGtkWidget); virtual;
|
||||
published
|
||||
class function CreateHandle(const ACommonDialog: TCommonDialog): THandle; override;
|
||||
class function QueryWSEventCapabilities(const ACommonDialog: TCommonDialog): TCDWSEventCapabilities; override;
|
||||
class function QueryWSEventCapabilities(const {%H-}ACommonDialog: TCommonDialog): TCDWSEventCapabilities; override;
|
||||
end;
|
||||
|
||||
{ TGtk2WSSaveDialog }
|
||||
|
||||
TGtk2WSSaveDialog = class(TWSSaveDialog)
|
||||
published
|
||||
class function QueryWSEventCapabilities(const ACommonDialog: TCommonDialog): TCDWSEventCapabilities; override;
|
||||
class function QueryWSEventCapabilities(const {%H-}ACommonDialog: TCommonDialog): TCDWSEventCapabilities; override;
|
||||
end;
|
||||
|
||||
{ TGtk2WSSelectDirectoryDialog }
|
||||
|
||||
TGtk2WSSelectDirectoryDialog = class(TWSSelectDirectoryDialog)
|
||||
published
|
||||
class function QueryWSEventCapabilities(const ACommonDialog: TCommonDialog): TCDWSEventCapabilities; override;
|
||||
class function QueryWSEventCapabilities(const {%H-}ACommonDialog: TCommonDialog): TCDWSEventCapabilities; override;
|
||||
end;
|
||||
|
||||
{ TGtk2WSColorDialog }
|
||||
@ -90,7 +90,7 @@ type
|
||||
class procedure SetCallbacks(const AGtkWidget: PGtkWidget; const AWidgetInfo: PWidgetInfo); virtual;
|
||||
published
|
||||
class function CreateHandle(const ACommonDialog: TCommonDialog): THandle; override;
|
||||
class function QueryWSEventCapabilities(const ACommonDialog: TCommonDialog): TCDWSEventCapabilities; override;
|
||||
class function QueryWSEventCapabilities(const {%H-}ACommonDialog: TCommonDialog): TCDWSEventCapabilities; override;
|
||||
end;
|
||||
|
||||
{ TGtk2WSColorButton }
|
||||
@ -106,7 +106,7 @@ type
|
||||
class procedure SetCallbacks(const AGtkWidget: PGtkWidget; const AWidgetInfo: PWidgetInfo); virtual;
|
||||
published
|
||||
class function CreateHandle(const ACommonDialog: TCommonDialog): THandle; override;
|
||||
class function QueryWSEventCapabilities(const ACommonDialog: TCommonDialog): TCDWSEventCapabilities; override;
|
||||
class function QueryWSEventCapabilities(const {%H-}ACommonDialog: TCommonDialog): TCDWSEventCapabilities; override;
|
||||
end;
|
||||
|
||||
// forward declarations
|
||||
|
@ -402,8 +402,8 @@ var
|
||||
// ! TaskEx.Base.Inst := 'Callback Test';
|
||||
// ! TaskEx.Execute;
|
||||
DefaultTaskDialog: TTaskDialogEx = (
|
||||
DialogIcon: tiInformation;
|
||||
FooterIcon: tfiWarning);
|
||||
DialogIcon: {%H-}tiInformation;
|
||||
FooterIcon: tfiWarning{%H-});
|
||||
|
||||
//function for translating the captions
|
||||
type
|
||||
|
@ -695,7 +695,7 @@ begin
|
||||
|
||||
IsValidDirectory := (ShortFilename <> '.') and (ShortFilename <> '..');
|
||||
|
||||
IsHidden := (DirInfo.Attr and faHidden = faHidden);
|
||||
IsHidden := (DirInfo.Attr and faHidden{%H-} = faHidden{%H-});
|
||||
|
||||
// First check if we show hidden files
|
||||
if IsHidden then AddFile := (otHidden in AObjectTypes)
|
||||
@ -800,14 +800,14 @@ var
|
||||
Result:=False;
|
||||
try
|
||||
Attr := faDirectory;
|
||||
if (otHidden in fObjectTypes) then Attr := Attr or faHidden;
|
||||
if (otHidden in fObjectTypes) then Attr := Attr or faHidden{%H-};
|
||||
FindRes := FindFirstUTF8(AppendPathDelim(ADir) + AllFilesMask, Attr , SR);
|
||||
while (FindRes = 0) do
|
||||
begin
|
||||
if ((SR.Attr and faDirectory <> 0) and (SR.Name <> '.') and
|
||||
(SR.Name <> '..')) then
|
||||
begin
|
||||
IsHidden := ((Attr and faHidden) > 0);
|
||||
IsHidden := ((Attr and faHidden{%H-}) > 0);
|
||||
if not (IsHidden and (not ((otHidden in fObjectTypes)))) then
|
||||
begin
|
||||
Result := True;
|
||||
@ -1065,7 +1065,7 @@ var
|
||||
else
|
||||
begin
|
||||
Attr := FileGetAttrUtf8(Fn);
|
||||
Result := ((Attr and faHidden) = faHidden) and not PathIsDriveRoot(Fn);
|
||||
Result := ((Attr and faHidden{%H-}) = faHidden{%H-}) and not PathIsDriveRoot(Fn);
|
||||
if not Result then
|
||||
begin
|
||||
//it also is not allowed that any folder above is hidden
|
||||
@ -1097,7 +1097,7 @@ var
|
||||
if (Length(Fn) = 2) and (Fn[2] = ':') then Continue;
|
||||
{$endif}
|
||||
Attr := FileGetAttrUtf8(Fn);
|
||||
if (Attr <> -1) and ((Attr and faHidden) > 0) and not PathIsDriveRoot(Fn) then
|
||||
if (Attr <> -1) and ((Attr and faHidden{%H-}) > 0) and not PathIsDriveRoot(Fn) then
|
||||
begin
|
||||
Result := True;
|
||||
{$ifdef debug_shellctrls}
|
||||
|
Loading…
Reference in New Issue
Block a user