jvcllaz: Fix compilation on macOS and on 64-bit.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7431 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-05-06 10:40:05 +00:00
parent 6952568642
commit f2502d8ad3
15 changed files with 73 additions and 65 deletions

View File

@ -142,7 +142,7 @@ begin
JvFullColorDialog.Options := JvFullColorDialog.Options - [foShowApply]; JvFullColorDialog.Options := JvFullColorDialog.Options - [foShowApply];
if JvFullColorDialog.Execute then if JvFullColorDialog.Execute then
ListBoxColors.Items.InsertObject(ListBoxColors.ItemIndex, '', ListBoxColors.Items.InsertObject(ListBoxColors.ItemIndex, '',
TObject(JvFullColorDialog.FullColor)); TObject(PtrInt(JvFullColorDialog.FullColor)));
end; end;
procedure TJvFullColorListFrm.ActionInsertUpdate(Sender: TObject); procedure TJvFullColorListFrm.ActionInsertUpdate(Sender: TObject);
@ -153,9 +153,9 @@ end;
procedure TJvFullColorListFrm.ActionModifyExecute(Sender: TObject); procedure TJvFullColorListFrm.ActionModifyExecute(Sender: TObject);
begin begin
JvFullColorDialog.Options := JvFullColorDialog.Options + [foShowApply]; JvFullColorDialog.Options := JvFullColorDialog.Options + [foShowApply];
JvFullColorDialog.FullColor := TJvFullColor(ListBoxColors.Items.Objects[ListBoxColors.ItemIndex]); JvFullColorDialog.FullColor := TJvFullColor(PtrInt(ListBoxColors.Items.Objects[ListBoxColors.ItemIndex]));
if JvFullColorDialog.Execute then if JvFullColorDialog.Execute then
ListBoxColors.Items.Objects[ListBoxColors.ItemIndex] := TObject(JvFullColorDialog.FullColor); ListBoxColors.Items.Objects[ListBoxColors.ItemIndex] := TObject(PtrInt(JvFullColorDialog.FullColor));
end; end;
procedure TJvFullColorListFrm.ActionModifyUpdate(Sender: TObject); procedure TJvFullColorListFrm.ActionModifyUpdate(Sender: TObject);
@ -203,7 +203,7 @@ procedure TJvFullColorListFrm.ActionNewExecute(Sender: TObject);
begin begin
JvFullColorDialog.Options := JvFullColorDialog.Options - [foShowApply]; JvFullColorDialog.Options := JvFullColorDialog.Options - [foShowApply];
if JvFullColorDialog.Execute then begin if JvFullColorDialog.Execute then begin
ListBoxColors.Items.AddObject('', TObject(JvFullColorDialog.FullColor)); ListBoxColors.Items.AddObject('', TObject(PtrInt(JvFullColorDialog.FullColor)));
ListBoxColors.ItemIndex := ListBoxColors.Items.Count-1; ListBoxColors.ItemIndex := ListBoxColors.Items.Count-1;
end; end;
end; end;
@ -259,7 +259,7 @@ begin
FColorList.BeginUpdate; FColorList.BeginUpdate;
FColorList.Clear; FColorList.Clear;
for Index := 0 to ListBoxColors.Items.Count - 1 do for Index := 0 to ListBoxColors.Items.Count - 1 do
FColorList.Add(TJvFullColor(ListBoxColors.Items.Objects[Index])); FColorList.Add(TJvFullColor(PtrInt(ListBoxColors.Items.Objects[Index])));
FColorList.EndUpdate; FColorList.EndUpdate;
Result := FColorList; Result := FColorList;
end; end;
@ -272,7 +272,7 @@ begin
begin begin
BeginUpdate; BeginUpdate;
for I := 0 to Value.Count - 1 do for I := 0 to Value.Count - 1 do
AddObject('', TObject(Value.Items[I])); AddObject('', TObject(PtrInt(Value.Items[I])));
EndUpdate; EndUpdate;
end; end;
end; end;
@ -286,7 +286,7 @@ end;
procedure TJvFullColorListFrm.JvFullColorDialogApply(Sender: TObject; procedure TJvFullColorListFrm.JvFullColorDialogApply(Sender: TObject;
AFullColor: TJvFullColor); AFullColor: TJvFullColor);
begin begin
ListBoxColors.Items.Objects[ListBoxColors.ItemIndex] := TObject(JvFullColorDialog.FullColor); ListBoxColors.Items.Objects[ListBoxColors.ItemIndex] := TObject(PtrInt(JvFullColorDialog.FullColor));
end; end;
procedure TJvFullColorListFrm.ListBoxColorsDrawItem(Control: TWinControl; procedure TJvFullColorListFrm.ListBoxColorsDrawItem(Control: TWinControl;
@ -306,7 +306,7 @@ begin
Rectangle(Rect); Rectangle(Rect);
AFullColor := TJvFullColor(Items.Objects[Index]); AFullColor := TJvFullColor(PtrInt(Items.Objects[Index]));
with ColorSpaceManager do with ColorSpaceManager do
begin begin

View File

@ -647,10 +647,10 @@ begin
if PropCount > 1 then if PropCount > 1 then
begin begin
FullColorList := TJvFullColorList.Create; FullColorList := TJvFullColorList.Create;
FullColorList.Assign(TJvFullColorList(GetOrdValue)); FullColorList.Assign(TJvFullColorList(PtrInt(GetOrdValue)));
for IndexList := 1 to PropCount - 1 do for IndexList := 1 to PropCount - 1 do
with TJvFullColorList(GetOrdValueAt(IndexList)) do with TJvFullColorList(PtrInt(GetOrdValueAt(PtrInt(IndexList)))) do
for IndexColor:=0 to Count - 1 do for IndexColor:=0 to Count - 1 do
if FullColorList.Items[IndexColor] <> Items[IndexColor] then if FullColorList.Items[IndexColor] <> Items[IndexColor] then
Exit; Exit;
@ -669,7 +669,7 @@ begin
FullColorList:=TJvFullColorList.Create; FullColorList:=TJvFullColorList.Create;
try try
for IndexList := 0 to PropCount - 1 do for IndexList := 0 to PropCount - 1 do
with TJvFullColorList(GetOrdValueAt(IndexList)) do with TJvFullColorList(PtrInt(GetOrdValueAt(IndexList))) do
for IndexColor := 0 to Count - 1 do for IndexColor := 0 to Count - 1 do
if FullColorList.IndexOf(Items[IndexColor]) = -1 then if FullColorList.IndexOf(Items[IndexColor]) = -1 then
FullColorList.Add(Items[IndexColor]); FullColorList.Add(Items[IndexColor]);
@ -688,7 +688,7 @@ end;
procedure TJvFullColorListEditor.FormApply(Sender: TObject); procedure TJvFullColorListEditor.FormApply(Sender: TObject);
begin begin
SetOrdValue(Cardinal((Sender as TJvFullColorListFrm).ColorList)); SetOrdValue(PtrInt((Sender as TJvFullColorListFrm).ColorList));
end; end;
function TJvFullColorListEditor.GetAttributes: TPropertyAttributes; function TJvFullColorListEditor.GetAttributes: TPropertyAttributes;

View File

@ -15,12 +15,12 @@ implementation
uses uses
ImgList, ImgList,
PropEdits, ComponentEditors, PropEdits, ComponentEditors, TreeViewPropEdit,
JvDsgnConsts, JvPageList, JvDsgnConsts, JvPageList,
JvNavigationPane, JvNavPaneEditors, JvNavigationPane, JvNavPaneEditors,
JvTabBar, JvTabBarXPPainter, JvTabBar, JvTabBarXPPainter,
JvNotebookPageList, JvNotebookPageList,
JvPageListEditors, JvPageListEditors, JvPageLinkEditorForm,
JvPageListTreeView; JvPageListTreeView;
procedure Register; procedure Register;
@ -67,7 +67,10 @@ begin
TJvSettingsTreeView TJvSettingsTreeView
]); ]);
RegisterClasses([TJvSettingsTreeView, TJvPageListTreeView]); RegisterClasses([TJvSettingsTreeView, TJvPageListTreeView]);
RegisterComponentEditor(TJvCustomPageListTreeView, TTreeViewComponentEditor);
RegisterPropertyEditor(TypeInfo(TJvPageLinks),
TJvCustomPageListTreeView, '', TJvPageLinksProperty);
RegisterPropertyEditor(TypeInfo(TImageIndex), TJvSettingsTreeImages, '', RegisterPropertyEditor(TypeInfo(TImageIndex), TJvSettingsTreeImages, '',
TJvSettingsTreeImagesProperty); TJvSettingsTreeImagesProperty);

View File

@ -61,7 +61,6 @@ object frmJvTreeViewLinksEditor: TfrmJvTreeViewLinksEditor
Width = 155 Width = 155
Height = 167 Height = 167
Align = alClient Align = alClient
ChangeDelay = 60
HideSelection = False HideSelection = False
Indent = 19 Indent = 19
PopupMenu = popTree PopupMenu = popTree

View File

@ -31,7 +31,8 @@ $Id$
unit JvPageLinkEditorForm; unit JvPageLinkEditorForm;
{$I jvcl.inc} {$mode objfpc}{$H+}
//{$I jvcl.inc}
interface interface
@ -39,7 +40,8 @@ uses
Classes, SysUtils, Windows, Forms, Controls, StdCtrls, ExtCtrls, ComCtrls, Classes, SysUtils, Windows, Forms, Controls, StdCtrls, ExtCtrls, ComCtrls,
ActnList, Menus, ActnList, Menus,
Variants, Variants,
DesignEditors, DesignIntf, //DesignEditors, DesignIntf,
PropEdits,
JvPageList, JvPageListTreeView, JvComponent; JvPageList, JvPageListTreeView, JvComponent;
type type
@ -50,7 +52,7 @@ type
procedure Edit; override; procedure Edit; override;
end; end;
TfrmJvTreeViewLinksEditor = class(TJvForm) TfrmJvTreeViewLinksEditor = class(TForm) //TJvForm)
tvItems: TTreeView; tvItems: TTreeView;
btnLink: TButton; btnLink: TButton;
lbPages: TListBox; lbPages: TListBox;
@ -69,8 +71,7 @@ type
Splitter2: TSplitter; Splitter2: TSplitter;
procedure tvItemsChange(Sender: TObject; Node: TTreeNode); procedure tvItemsChange(Sender: TObject; Node: TTreeNode);
procedure acLinkExecute(Sender: TObject); procedure acLinkExecute(Sender: TObject);
procedure acMainUpdate(Action: TBasicAction; procedure acMainUpdate(AnAction: TBasicAction; var Handled: Boolean);
var Handled: Boolean);
procedure FormResize(Sender: TObject); procedure FormResize(Sender: TObject);
private private
FTreeView:TCustomTreeView; FTreeView:TCustomTreeView;
@ -89,7 +90,7 @@ implementation
uses uses
JvDsgnConsts; JvDsgnConsts;
{$R *.dfm} {$R *.lfm}
type type
THackTreeView = class(TJvCustomPageListTreeView); THackTreeView = class(TJvCustomPageListTreeView);
@ -154,7 +155,7 @@ begin
else else
if (Index >= 10) and (Index < 36) then if (Index >= 10) and (Index < 36) then
Result.ShortCut := ShortCut(Ord('A') + Index - 10, [ssCtrl]); Result.ShortCut := ShortCut(Ord('A') + Index - 10, [ssCtrl]);
Result.OnClick := DoPopClick; Result.OnClick := @DoPopClick;
end; end;
procedure TfrmJvTreeViewLinksEditor.AssignComponents(TreeView: TCustomTreeView; procedure TfrmJvTreeViewLinksEditor.AssignComponents(TreeView: TCustomTreeView;
@ -258,7 +259,7 @@ begin
N.Text := GetNewTreeText(N.Text, lbPages.ItemIndex); N.Text := GetNewTreeText(N.Text, lbPages.ItemIndex);
end; end;
procedure TfrmJvTreeViewLinksEditor.acMainUpdate(Action: TBasicAction; procedure TfrmJvTreeViewLinksEditor.acMainUpdate(AnAction: TBasicAction;
var Handled: Boolean); var Handled: Boolean);
begin begin
acLink.Enabled := (tvItems.Selected <> nil) and (lbPages.ItemIndex > -1); acLink.Enabled := (tvItems.Selected <> nil) and (lbPages.ItemIndex > -1);

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<CONFIG> <CONFIG>
<Package Version="4"> <Package Version="5">
<PathDelim Value="\"/> <PathDelim Value="\"/>
<Name Value="JvCmpD"/> <Name Value="JvCmpD"/>
<Type Value="RunAndDesignTime"/> <Type Value="RunAndDesignTime"/>
@ -29,19 +29,16 @@
<UnitName Value="JvStrHolderEditor"/> <UnitName Value="JvStrHolderEditor"/>
</Item2> </Item2>
</Files> </Files>
<RequiredPkgs Count="4"> <RequiredPkgs Count="3">
<Item1> <Item1>
<PackageName Value="JvCoreLazD"/> <PackageName Value="JvCoreLazD"/>
</Item1> </Item1>
<Item2> <Item2>
<PackageName Value="IDEIntf"/> <PackageName Value="JvCmpR"/>
</Item2> </Item2>
<Item3> <Item3>
<PackageName Value="JvCmpR"/>
</Item3>
<Item4>
<PackageName Value="FCL"/> <PackageName Value="FCL"/>
</Item4> </Item3>
</RequiredPkgs> </RequiredPkgs>
<UsageOptions> <UsageOptions>
<UnitPath Value="$(PkgOutDir)"/> <UnitPath Value="$(PkgOutDir)"/>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<CONFIG> <CONFIG>
<Package Version="4"> <Package Version="5">
<PathDelim Value="\"/> <PathDelim Value="\"/>
<Name Value="JvCoreLazD"/> <Name Value="JvCoreLazD"/>
<Type Value="RunAndDesignTime"/> <Type Value="RunAndDesignTime"/>
@ -17,32 +17,32 @@
<Description Value="JVCL Core Components (Designtime). Must be compiled before any of the other JvXXX packages can be installed."/> <Description Value="JVCL Core Components (Designtime). Must be compiled before any of the other JvXXX packages can be installed."/>
<License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/> <License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/>
<Version Major="1" Release="6"/> <Version Major="1" Release="6"/>
<Files Count="4"> <Files>
<Item1> <Item>
<Filename Value="..\design\JvCore\jvcorereg.pas"/> <Filename Value="..\design\JvCore\jvcorereg.pas"/>
<HasRegisterProc Value="True"/> <HasRegisterProc Value="True"/>
<UnitName Value="JvCoreReg"/> <UnitName Value="JvCoreReg"/>
</Item1> </Item>
<Item2> <Item>
<Filename Value="..\design\JvCore\jvdsgnconsts.pas"/> <Filename Value="..\design\JvCore\jvdsgnconsts.pas"/>
<UnitName Value="JvDsgnConsts"/> <UnitName Value="JvDsgnConsts"/>
</Item2> </Item>
<Item3> <Item>
<Filename Value="..\design\JvCore\jvstringsform.pas"/> <Filename Value="..\design\JvCore\jvstringsform.pas"/>
<UnitName Value="JvStringsForm"/> <UnitName Value="JvStringsForm"/>
</Item3> </Item>
<Item4> <Item>
<Filename Value="..\design\JvCore\jvdsgneditors.pas"/> <Filename Value="..\design\JvCore\jvdsgneditors.pas"/>
<UnitName Value="JvDsgnEditors"/> <UnitName Value="JvDsgnEditors"/>
</Item4> </Item>
</Files> </Files>
<RequiredPkgs Count="2"> <RequiredPkgs>
<Item1> <Item>
<PackageName Value="IDEIntf"/> <PackageName Value="IDEIntf"/>
</Item1> </Item>
<Item2> <Item>
<PackageName Value="JvCoreLazR"/> <PackageName Value="JvCoreLazR"/>
</Item2> </Item>
</RequiredPkgs> </RequiredPkgs>
<UsageOptions> <UsageOptions>
<UnitPath Value="$(PkgOutDir)"/> <UnitPath Value="$(PkgOutDir)"/>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<CONFIG> <CONFIG>
<Package Version="4"> <Package Version="5">
<PathDelim Value="\"/> <PathDelim Value="\"/>
<Name Value="JvMMLazD"/> <Name Value="JvMMLazD"/>
<Type Value="RunAndDesignTime"/> <Type Value="RunAndDesignTime"/>
@ -44,19 +44,16 @@ bmp animator, id3v1 and id3v2 tags, full color components and dialogs, gradient
<UnitName Value="JvFullColorListForm"/> <UnitName Value="JvFullColorListForm"/>
</Item6> </Item6>
</Files> </Files>
<RequiredPkgs Count="4"> <RequiredPkgs Count="3">
<Item1> <Item1>
<PackageName Value="JvCoreLazD"/> <PackageName Value="JvCoreLazD"/>
</Item1> </Item1>
<Item2> <Item2>
<PackageName Value="IDEIntf"/> <PackageName Value="JvMMLazR"/>
</Item2> </Item2>
<Item3> <Item3>
<PackageName Value="JvMMLazR"/>
</Item3>
<Item4>
<PackageName Value="FCL"/> <PackageName Value="FCL"/>
</Item4> </Item3>
</RequiredPkgs> </RequiredPkgs>
<UsageOptions> <UsageOptions>
<UnitPath Value="$(PkgOutDir)"/> <UnitPath Value="$(PkgOutDir)"/>

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<CONFIG> <CONFIG>
<Package Version="4"> <Package Version="5">
<PathDelim Value="\"/> <PathDelim Value="\"/>
<Name Value="JvNetLazD"/> <Name Value="JvNetLazD"/>
<Type Value="DesignTime"/> <Type Value="RunAndDesignTime"/>
<Author Value="Various authors - see header of each unit for original author."/> <Author Value="Various authors - see header of each unit for original author."/>
<CompilerOptions> <CompilerOptions>
<Version Value="11"/> <Version Value="11"/>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<CONFIG> <CONFIG>
<Package Version="4"> <Package Version="5">
<PathDelim Value="\"/> <PathDelim Value="\"/>
<Name Value="JvPageCompsD"/> <Name Value="JvPageCompsD"/>
<Type Value="RunAndDesignTime"/> <Type Value="RunAndDesignTime"/>
@ -16,7 +16,7 @@
<Description Value="Page style components of the JVCL library (https://sourceforge.net/projects/jvcl/) (designtime code)"/> <Description Value="Page style components of the JVCL library (https://sourceforge.net/projects/jvcl/) (designtime code)"/>
<License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/> <License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/>
<Version Major="1" Release="6"/> <Version Major="1" Release="6"/>
<Files Count="3"> <Files Count="4">
<Item1> <Item1>
<Filename Value="..\design\JvPageComps\jvpagecompsreg.pas"/> <Filename Value="..\design\JvPageComps\jvpagecompsreg.pas"/>
<HasRegisterProc Value="True"/> <HasRegisterProc Value="True"/>
@ -30,6 +30,10 @@
<Filename Value="..\design\JvPageComps\jvpagelisteditors.pas"/> <Filename Value="..\design\JvPageComps\jvpagelisteditors.pas"/>
<UnitName Value="JvPageListEditors"/> <UnitName Value="JvPageListEditors"/>
</Item3> </Item3>
<Item4>
<Filename Value="..\design\JvPageComps\jvpagelinkeditorform.pas"/>
<UnitName Value="JvPageLinkEditorForm"/>
</Item4>
</Files> </Files>
<RequiredPkgs Count="3"> <RequiredPkgs Count="3">
<Item1> <Item1>

View File

@ -116,8 +116,11 @@ implementation
uses uses
LCLVersion, LCLVersion,
{$IFDEF LINUX} {$IFDEF UNIX} // RPH 16Apr2020 - Fix for Darwin
baseunix, unix, linux, users, baseunix, unix,
{$IFDEF LINUX}
linux, users,
{$ENDIF}
{$ELSE} {$ELSE}
Windows, Windows,
{$ENDIF} {$ENDIF}

View File

@ -388,7 +388,11 @@ begin
FDFileAccessed := UnixToDateTime(info.st_atime); FDFileAccessed := UnixToDateTime(info.st_atime);
FDFileChanged := UnixToDateTime(info.st_mtime); FDFileChanged := UnixToDateTime(info.st_mtime);
FDFileCreated := UnixToDateTime(info.st_ctime); FDFileCreated := UnixToDateTime(info.st_ctime);
{$IFDEF DARWIN}
FDFileSize := info.st_size;
{$ELSE}
FDFileSize := info.Size; FDFileSize := info.Size;
{$ENDIF}
end; end;
{$ENDIF} {$ENDIF}
end; end;

View File

@ -2506,7 +2506,7 @@ var
begin begin
MapCols := FData[MapSearchRow, 0]; MapCols := FData[MapSearchRow, 0];
Col := 1; Col := 1;
ApptVal := Integer(Appt); ApptVal := PtrInt(Appt);
while (Col <= MapCols) and (FData[MapSearchRow, Col] <> ApptVal) do while (Col <= MapCols) and (FData[MapSearchRow, Col] <> ApptVal) do
Inc(Col); Inc(Col);

View File

@ -1247,7 +1247,7 @@ var
begin begin
I := FTopLines.IndexOf(GetCellString(ACell)); I := FTopLines.IndexOf(GetCellString(ACell));
if I > -1 then if I > -1 then
Result := Integer(FTopLines.Objects[I]) Result := PtrInt(FTopLines.Objects[I])
else else
Result := 0; Result := 0;
end; end;
@ -1395,10 +1395,10 @@ begin
if Value = 0 then if Value = 0 then
FTopLines.Delete(I) FTopLines.Delete(I)
else else
FTopLines.Objects[I] := TObject(Value) FTopLines.Objects[I] := TObject(PtrInt(Value))
else else
if Value <> 0 then if Value <> 0 then
FTopLines.AddObject(CellStr, TObject(Value)); FTopLines.AddObject(CellStr, TObject(PtrInt(Value)));
Refresh; Refresh;
end; end;

View File

@ -1094,12 +1094,12 @@ end;
function TJvTFCustomImageMap.GetImage(MapIndex: Integer): Integer; function TJvTFCustomImageMap.GetImage(MapIndex: Integer): Integer;
begin begin
Result := Integer(FMap.Objects[MapIndex]); Result := PtrInt(FMap.Objects[MapIndex]);
end; end;
procedure TJvTFCustomImageMap.SetImage(MapIndex, Value: Integer); procedure TJvTFCustomImageMap.SetImage(MapIndex, Value: Integer);
begin begin
FMap.Objects[MapIndex] := TObject(Value); FMap.Objects[MapIndex] := TObject(PtrInt(Value));
end; end;
function TJvTFCustomImageMap.GetImageName(MapIndex: Integer): string; function TJvTFCustomImageMap.GetImageName(MapIndex: Integer): string;
@ -1126,7 +1126,7 @@ procedure TJvTFCustomImageMap.Add(const ImageName: string; ImageIndex: Integer);
begin begin
if FMap.IndexOf(ImageName) = -1 then if FMap.IndexOf(ImageName) = -1 then
begin begin
FMap.AddObject(ImageName, TObject(ImageIndex)); FMap.AddObject(ImageName, TObject(PtrInt(ImageIndex)));
Change; Change;
end; end;
end; end;