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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<Package Version="4">
<Package Version="5">
<PathDelim Value="\"/>
<Name Value="JvCoreLazD"/>
<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."/>
<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"/>
<Files Count="4">
<Item1>
<Files>
<Item>
<Filename Value="..\design\JvCore\jvcorereg.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="JvCoreReg"/>
</Item1>
<Item2>
</Item>
<Item>
<Filename Value="..\design\JvCore\jvdsgnconsts.pas"/>
<UnitName Value="JvDsgnConsts"/>
</Item2>
<Item3>
</Item>
<Item>
<Filename Value="..\design\JvCore\jvstringsform.pas"/>
<UnitName Value="JvStringsForm"/>
</Item3>
<Item4>
</Item>
<Item>
<Filename Value="..\design\JvCore\jvdsgneditors.pas"/>
<UnitName Value="JvDsgnEditors"/>
</Item4>
</Item>
</Files>
<RequiredPkgs Count="2">
<Item1>
<RequiredPkgs>
<Item>
<PackageName Value="IDEIntf"/>
</Item1>
<Item2>
</Item>
<Item>
<PackageName Value="JvCoreLazR"/>
</Item2>
</Item>
</RequiredPkgs>
<UsageOptions>
<UnitPath Value="$(PkgOutDir)"/>

View File

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

View File

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

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<Package Version="4">
<Package Version="5">
<PathDelim Value="\"/>
<Name Value="JvPageCompsD"/>
<Type Value="RunAndDesignTime"/>
@ -16,7 +16,7 @@
<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. "/>
<Version Major="1" Release="6"/>
<Files Count="3">
<Files Count="4">
<Item1>
<Filename Value="..\design\JvPageComps\jvpagecompsreg.pas"/>
<HasRegisterProc Value="True"/>
@ -30,6 +30,10 @@
<Filename Value="..\design\JvPageComps\jvpagelisteditors.pas"/>
<UnitName Value="JvPageListEditors"/>
</Item3>
<Item4>
<Filename Value="..\design\JvPageComps\jvpagelinkeditorform.pas"/>
<UnitName Value="JvPageLinkEditorForm"/>
</Item4>
</Files>
<RequiredPkgs Count="3">
<Item1>

View File

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

View File

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

View File

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

View File

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

View File

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