diff --git a/components/jvcllaz/design/JvMM/jvfullcolorlistform.pas b/components/jvcllaz/design/JvMM/jvfullcolorlistform.pas index a0469b8a1..38dd06f6b 100644 --- a/components/jvcllaz/design/JvMM/jvfullcolorlistform.pas +++ b/components/jvcllaz/design/JvMM/jvfullcolorlistform.pas @@ -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 diff --git a/components/jvcllaz/design/JvMM/jvfullcolorspaceseditors.pas b/components/jvcllaz/design/JvMM/jvfullcolorspaceseditors.pas index fc68c04d7..cfd94d9ca 100644 --- a/components/jvcllaz/design/JvMM/jvfullcolorspaceseditors.pas +++ b/components/jvcllaz/design/JvMM/jvfullcolorspaceseditors.pas @@ -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; diff --git a/components/jvcllaz/design/JvPageComps/jvpagecompsreg.pas b/components/jvcllaz/design/JvPageComps/jvpagecompsreg.pas index 2c88c9ccd..897d62229 100644 --- a/components/jvcllaz/design/JvPageComps/jvpagecompsreg.pas +++ b/components/jvcllaz/design/JvPageComps/jvpagecompsreg.pas @@ -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); diff --git a/components/jvcllaz/design/JvPageComps/jvpagelinkeditorform.lfm b/components/jvcllaz/design/JvPageComps/jvpagelinkeditorform.lfm index 55e023519..0ead7e656 100644 --- a/components/jvcllaz/design/JvPageComps/jvpagelinkeditorform.lfm +++ b/components/jvcllaz/design/JvPageComps/jvpagelinkeditorform.lfm @@ -61,7 +61,6 @@ object frmJvTreeViewLinksEditor: TfrmJvTreeViewLinksEditor Width = 155 Height = 167 Align = alClient - ChangeDelay = 60 HideSelection = False Indent = 19 PopupMenu = popTree diff --git a/components/jvcllaz/design/JvPageComps/jvpagelinkeditorform.pas b/components/jvcllaz/design/JvPageComps/jvpagelinkeditorform.pas index a0413dd39..11c0063f8 100644 --- a/components/jvcllaz/design/JvPageComps/jvpagelinkeditorform.pas +++ b/components/jvcllaz/design/JvPageComps/jvpagelinkeditorform.pas @@ -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); diff --git a/components/jvcllaz/packages/jvcmpd.lpk b/components/jvcllaz/packages/jvcmpd.lpk index e219e5e5d..6fbafce27 100644 --- a/components/jvcllaz/packages/jvcmpd.lpk +++ b/components/jvcllaz/packages/jvcmpd.lpk @@ -1,6 +1,6 @@ - + @@ -29,19 +29,16 @@ - + - + - - - - + diff --git a/components/jvcllaz/packages/jvcorelazd.lpk b/components/jvcllaz/packages/jvcorelazd.lpk index e61240fb9..e290fb3f4 100644 --- a/components/jvcllaz/packages/jvcorelazd.lpk +++ b/components/jvcllaz/packages/jvcorelazd.lpk @@ -1,6 +1,6 @@ - + @@ -17,32 +17,32 @@ - - + + - - + + - - + + - - + + - + - - + + - - + + - + diff --git a/components/jvcllaz/packages/jvmmlazd.lpk b/components/jvcllaz/packages/jvmmlazd.lpk index ac5c2f85b..fefa68c3f 100644 --- a/components/jvcllaz/packages/jvmmlazd.lpk +++ b/components/jvcllaz/packages/jvmmlazd.lpk @@ -1,6 +1,6 @@ - + @@ -44,19 +44,16 @@ bmp animator, id3v1 and id3v2 tags, full color components and dialogs, gradient - + - + - - - - + diff --git a/components/jvcllaz/packages/jvnetlazd.lpk b/components/jvcllaz/packages/jvnetlazd.lpk index 5d5a7afdf..efbf9f2e0 100644 --- a/components/jvcllaz/packages/jvnetlazd.lpk +++ b/components/jvcllaz/packages/jvnetlazd.lpk @@ -1,9 +1,9 @@ - + - + diff --git a/components/jvcllaz/packages/jvpagecompsd.lpk b/components/jvcllaz/packages/jvpagecompsd.lpk index ef4d7f24e..07e30fec8 100644 --- a/components/jvcllaz/packages/jvpagecompsd.lpk +++ b/components/jvcllaz/packages/jvpagecompsd.lpk @@ -1,6 +1,6 @@ - + @@ -16,7 +16,7 @@ - + @@ -30,6 +30,10 @@ + + + + diff --git a/components/jvcllaz/run/JvCmp/jvprofilerform.pas b/components/jvcllaz/run/JvCmp/jvprofilerform.pas index 23ea46801..151f02ac8 100644 --- a/components/jvcllaz/run/JvCmp/jvprofilerform.pas +++ b/components/jvcllaz/run/JvCmp/jvprofilerform.pas @@ -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} diff --git a/components/jvcllaz/run/JvCustomControls/jvthumbnails.pas b/components/jvcllaz/run/JvCustomControls/jvthumbnails.pas index 5902acf1e..60eecdc35 100644 --- a/components/jvcllaz/run/JvCustomControls/jvthumbnails.pas +++ b/components/jvcllaz/run/JvCustomControls/jvthumbnails.pas @@ -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; diff --git a/components/jvcllaz/run/JvTimeFramework/jvtfdays.pas b/components/jvcllaz/run/JvTimeFramework/jvtfdays.pas index c251428b4..0b76ff249 100644 --- a/components/jvcllaz/run/JvTimeFramework/jvtfdays.pas +++ b/components/jvcllaz/run/JvTimeFramework/jvtfdays.pas @@ -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); diff --git a/components/jvcllaz/run/JvTimeFramework/jvtfglancetextviewer.pas b/components/jvcllaz/run/JvTimeFramework/jvtfglancetextviewer.pas index cb70db0a9..32fe4e454 100644 --- a/components/jvcllaz/run/JvTimeFramework/jvtfglancetextviewer.pas +++ b/components/jvcllaz/run/JvTimeFramework/jvtfglancetextviewer.pas @@ -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; diff --git a/components/jvcllaz/run/JvTimeFramework/jvtfmanager.pas b/components/jvcllaz/run/JvTimeFramework/jvtfmanager.pas index 18044e71c..8189da400 100644 --- a/components/jvcllaz/run/JvTimeFramework/jvtfmanager.pas +++ b/components/jvcllaz/run/JvTimeFramework/jvtfmanager.pas @@ -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;