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