Changeset 424


Ignore:
Timestamp:
Apr 25, 2022, 6:22:53 PM (3 years ago)
Author:
chronos
Message:
  • Modified: Update Common package to version 0.10.
  • Modified: fgl unit replaced by Generics.Collections.
Location:
trunk
Files:
1 added
30 edited

Legend:

Unmodified
Added
Removed
  • trunk/GameServer.pas

    r420 r424  
    77
    88uses
    9   Protocol, Database, dynlibs, Platform, dateutils, fgl, LazFileUtils,
    10   Graphics, UBrain, Global;
     9  Protocol, Database, dynlibs, Platform, dateutils, LazFileUtils, Graphics,
     10  UBrain, Global;
    1111
    1212const
  • trunk/LocalPlayer/Help.pas

    r416 r424  
    77  Protocol, ScreenTools, BaseWin, StringTables, Math, LCLIntf, LCLType,
    88  Messages, SysUtils, Classes, Graphics, Controls, Forms, ExtCtrls,
    9   ButtonB, PVSB, Types, fgl, IsoEngine;
     9  ButtonB, PVSB, Types, Generics.Collections, IsoEngine;
    1010
    1111const
     
    6060  { THistItems }
    6161
    62   THistItems = class(TFPGObjectList<THistItem>)
     62  THistItems = class(TObjectList<THistItem>)
    6363    function AddNew(Kind, No, Pos: Integer; SearchContent: string): THistItem;
    6464  end;
  • trunk/LocalPlayer/UKeyBindings.pas

    r423 r424  
    44
    55uses
    6   Classes, SysUtils, fgl, LCLProc, LCLType, Menus, Registry;
     6  Classes, SysUtils, Generics.Collections, Generics.Defaults, LCLProc, LCLType,
     7  Menus, Registry;
    78
    89type
     
    2425  { TKeyBindings }
    2526
    26   TKeyBindings = class(TFPGObjectList<TKeyBinding>)
     27  TKeyBindings = class(TObjectList<TKeyBinding>)
    2728  private
    2829  public
     
    290291end;
    291292
    292 function CompareAlpha(const Item1, Item2: TKeyBinding): Integer;
     293function CompareAlpha(constref Item1, Item2: TKeyBinding): Integer;
    293294begin
    294295  Result := CompareStr(Item1.FullName, Item2.FullName);
     
    297298procedure TKeyBindings.SortAlpha;
    298299begin
    299   Sort(CompareAlpha);
     300  Sort(TComparer<TKeyBinding>.Construct(CompareAlpha));
    300301end;
    301302
  • trunk/Network/UNetworkServer.pas

    r423 r424  
    44
    55uses
    6   Classes, SysUtils{$IFDEF UNIX}, fgl, fpAsync, fpsock, fphttpclient{$ENDIF}, Protocol;
     6  Classes, SysUtils{$IFDEF UNIX}, Generics.Collections, fpAsync, fpsock,
     7  fphttpclient{$ENDIF}, Protocol;
    78
    89{$IFDEF UNIX}
     
    5556  { TNetworkServerPlayers }
    5657
    57   TNetworkServerPlayers = class(TFPGObjectList<TNetworkServerPlayer>)
     58  TNetworkServerPlayers = class(TObjectList<TNetworkServerPlayer>)
    5859    function SearchById(Id: Integer): TNetworkServerPlayer;
    5960  end;
     
    6465  private
    6566    Players: TNetworkServerPlayers;
    66     Connections: TFPGObjectList<TNetworkServerConnection>;
     67    Connections: TObjectList<TNetworkServerConnection>;
    6768    TCPServerThread: TTCPServerThread;
    6869    ServerEventLoop: TEventLoop;
     
    302303  Players := TNetworkServerPlayers.Create;
    303304  ServerEventLoop := TEventLoop.Create;
    304   Connections := TFPGObjectList<TNetworkServerConnection>.Create;
     305  Connections := TObjectList<TNetworkServerConnection>.Create;
    305306  TCPServer := TTCPServer.Create(nil);
    306307  with TCPServer do begin
  • trunk/Packages/CevoComponents/ScreenTools.pas

    r423 r424  
    88  {$ENDIF}
    99  StringTables, LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Math,
    10   Forms, Menus, GraphType, fgl, UGraphicSet, LazFileUtils, UTexture;
     10  Forms, Menus, GraphType, UGraphicSet, LazFileUtils, UTexture;
    1111
    1212type
  • trunk/Packages/CevoComponents/Sound.pas

    r423 r424  
    44
    55uses
    6   SysUtils, Classes, Graphics, Controls, Forms, fgl, FileUtil,
     6  SysUtils, Classes, Graphics, Controls, Forms, Generics.Collections, FileUtil,
    77  StringTables, Directories, LCLType
    88  {$IFDEF WINDOWS}, MMSystem, Windows{$ENDIF}
     
    5555  SoundMode: TSoundMode;
    5656  SoundPlayer: TSoundPlayer;
    57   SoundList: TFPGObjectList<TSound>;
     57  SoundList: TObjectList<TSound>;
    5858  PlayingSound: TSound;
    5959
     
    333333procedure UnitInit;
    334334begin
    335   SoundList := TFPGObjectList<TSound>.Create;
     335  SoundList := TObjectList<TSound>.Create;
    336336  PlayingSound := nil;
    337337  SoundPlayer := nil;
  • trunk/Packages/CevoComponents/UGraphicSet.pas

    r417 r424  
    44
    55uses
    6   Classes, SysUtils, Graphics, fgl, LCLType, UPixelPointer, DOM, XMLRead,
    7   XMLWrite, UXMLUtils;
     6  Classes, SysUtils, Graphics, Generics.Collections, LCLType, UPixelPointer, DOM,
     7  XMLRead, XMLWrite, UXMLUtils;
    88
    99type
     
    3131  { TGraphicSetItems }
    3232
    33   TGraphicSetItems = class(TFPGObjectList<TGraphicSetItem>)
     33  TGraphicSetItems = class(TObjectList<TGraphicSetItem>)
    3434    GraphicSet: TGraphicSet;
    3535    function SearchByName(Name: string): TGraphicSetItem;
     
    5959  { TGraphicSets }
    6060
    61   TGraphicSets = class(TFPGObjectList<TGraphicSet>)
     61  TGraphicSets = class(TObjectList<TGraphicSet>)
    6262    function SearchByName(Name: string): TGraphicSet;
    6363    function AddNew(Name: string): TGraphicSet;
  • trunk/Packages/Common/Common.lpk

    r420 r424  
    11<?xml version="1.0" encoding="UTF-8"?>
    22<CONFIG>
    3   <Package Version="4">
     3  <Package Version="5">
    44    <PathDelim Value="\"/>
    55    <Name Value="Common"/>
     
    3333      <Other>
    3434        <CompilerMessages>
    35           <IgnoredMessages idx5024="True"/>
     35          <IgnoredMessages idx6058="True" idx5071="True" idx5024="True" idx3124="True" idx3123="True"/>
    3636        </CompilerMessages>
    3737      </Other>
     
    4141Source: https://svn.zdechov.net/PascalClassLibrary/Common/"/>
    4242    <License Value="Copy left."/>
    43     <Version Minor="9"/>
     43    <Version Minor="10"/>
    4444    <Files Count="29">
    4545      <Item1>
     
    172172      </Item29>
    173173    </Files>
     174    <CompatibilityMode Value="True"/>
    174175    <i18n>
    175176      <EnableI18N Value="True"/>
  • trunk/Packages/Common/UAboutDialog.pas

    r423 r424  
    55uses
    66  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
    7   StdCtrls, ExtCtrls, UApplicationInfo, UCommon, UTranslator, UTheme, UFormAbout;
     7  ExtCtrls, UApplicationInfo, UCommon, UTranslator, UTheme, UFormAbout;
    88
    99type
  • trunk/Packages/Common/UCommon.pas

    r423 r424  
    66  {$IFDEF WINDOWS}Windows,{$ENDIF}
    77  {$IFDEF UNIX}baseunix,{$ENDIF}
    8   Classes, SysUtils, StrUtils, Dialogs, Process, LCLIntf,
     8  Classes, SysUtils, StrUtils, Dialogs, Process, LCLIntf, Graphics,
    99  FileUtil; //, ShFolder, ShellAPI;
    1010
    1111type
    1212  TArrayOfByte = array of Byte;
    13   TArrayOfString = array of string;
    1413  TExceptionEvent = procedure(Sender: TObject; E: Exception) of object;
    1514
     
    3332  DLLHandle1: HModule;
    3433
    35 {$IFDEF WINDOWS}
    36   GetUserNameEx: procedure (NameFormat: DWORD;
    37     lpNameBuffer: LPSTR; nSize: PULONG); stdcall;
    38 {$ENDIF}
     34  {$IFDEF WINDOWS}
     35    GetUserNameEx: procedure (NameFormat: DWORD;
     36      lpNameBuffer: LPSTR; nSize: PULONG); stdcall;
     37  {$ENDIF}
     38
     39const
     40  clLightBlue = TColor($FF8080);
     41  clLightGreen = TColor($80FF80);
     42  clLightRed = TColor($8080FF);
    3943
    4044function AddLeadingZeroes(const aNumber, Length : integer) : string;
     
    4953function ComputerName: string;
    5054procedure DeleteFiles(APath, AFileSpec: string);
     55function Explode(Separator: Char; Data: string): TStringArray;
    5156procedure ExecuteProgram(Executable: string; Parameters: array of string);
    5257procedure FileDialogUpdateFilterFileType(FileDialog: TOpenDialog);
     
    6368function LoadFileToStr(const FileName: TFileName): AnsiString;
    6469function LoggedOnUserNameEx(Format: TUserNameFormat): string;
    65 function MergeArray(A, B: array of string): TArrayOfString;
     70function MergeArray(A, B: array of string): TStringArray;
    6671function OccurenceOfChar(What: Char; Where: string): Integer;
    6772procedure OpenWebPage(URL: string);
     73procedure OpenEmail(Email: string);
    6874procedure OpenFileInShell(FileName: string);
    6975function PosFromIndex(SubStr: string; Text: string;
     
    8187function SplitString(var Text: string; Count: Word): string;
    8288function StripTags(const S: string): string;
    83 function TryHexToInt(Data: string; var Value: Integer): Boolean;
    84 function TryBinToInt(Data: string; var Value: Integer): Boolean;
     89function TryHexToInt(Data: string; out Value: Integer): Boolean;
     90function TryBinToInt(Data: string; out Value: Integer): Boolean;
    8591procedure SortStrings(Strings: TStrings);
    8692
     
    244250end;
    245251
    246 function TryHexToInt(Data: string; var Value: Integer): Boolean;
     252function TryHexToInt(Data: string; out Value: Integer): Boolean;
    247253var
    248254  I: Integer;
     
    260266end;
    261267
    262 function TryBinToInt(Data: string; var Value: Integer): Boolean;
     268function TryBinToInt(Data: string; out Value: Integer): Boolean;
    263269var
    264270  I: Integer;
     
    288294end;
    289295
    290 function Explode(Separator: char; Data: string): TArrayOfString;
    291 begin
    292   SetLength(Result, 0);
    293   while Pos(Separator, Data) > 0 do begin
     296function Explode(Separator: Char; Data: string): TStringArray;
     297var
     298  Index: Integer;
     299begin
     300  Result := Default(TStringArray);
     301  repeat
     302    Index := Pos(Separator, Data);
     303    if Index > 0 then begin
     304      SetLength(Result, Length(Result) + 1);
     305      Result[High(Result)] := Copy(Data, 1, Index - 1);
     306      Delete(Data, 1, Index);
     307    end else Break;
     308  until False;
     309  if Data <> '' then begin
    294310    SetLength(Result, Length(Result) + 1);
    295     Result[High(Result)] := Copy(Data, 1, Pos(Separator, Data) - 1);
    296     Delete(Data, 1, Pos(Separator, Data));
    297   end;
    298   SetLength(Result, Length(Result) + 1);
    299   Result[High(Result)] := Data;
     311    Result[High(Result)] := Data;
     312  end;
    300313end;
    301314
     
    308321begin
    309322  L := MAX_USERNAME_LENGTH + 2;
     323  Result := Default(string);
    310324  SetLength(Result, L);
    311325  if Windows.GetUserName(PChar(Result), L) and (L > 0) then begin
     
    344358  Name: UtsName;
    345359begin
     360  Name := Default(UtsName);
    346361  fpuname(Name);
    347362  Result := Name.Nodename;
     
    471486end;
    472487
     488procedure OpenEmail(Email: string);
     489begin
     490  OpenURL('mailto:' + Email);
     491end;
     492
    473493procedure OpenFileInShell(FileName: string);
    474494begin
     
    499519end;
    500520
    501 function MergeArray(A, B: array of string): TArrayOfString;
    502 var
    503   I: Integer;
    504 begin
     521function MergeArray(A, B: array of string): TStringArray;
     522var
     523  I: Integer;
     524begin
     525  Result := Default(TStringArray);
    505526  SetLength(Result, Length(A) + Length(B));
    506527  for I := 0 to Length(A) - 1 do
  • trunk/Packages/Common/UDebugLog.pas

    r423 r424  
    44
    55uses
    6   Classes, SysUtils, FileUtil, fgl, SyncObjs;
     6  Classes, SysUtils, FileUtil, Generics.Collections, SyncObjs;
    77
    88type
     
    1313    Group: string;
    1414    Text: string;
     15  end;
     16
     17  TDebugLogItems = class(TObjectList<TDebugLogItem>)
    1518  end;
    1619
     
    2730    procedure SetMaxCount(const AValue: Integer);
    2831  public
    29     Items: TFPGObjectList<TDebugLogItem>;
     32    Items: TDebugLogItems;
    3033    Lock: TCriticalSection;
    3134    procedure Add(Text: string; Group: string = '');
     
    116119begin
    117120  inherited;
    118   Items := TFPGObjectList<TDebugLogItem>.Create;
     121  Items := TDebugLogItems.Create;
    119122  Lock := TCriticalSection.Create;
    120123  MaxCount := 100;
     
    125128destructor TDebugLog.Destroy;
    126129begin
    127   Items.Free;
    128   Lock.Free;
     130  FreeAndNil(Items);
     131  FreeAndNil(Lock);
    129132  inherited;
    130133end;
  • trunk/Packages/Common/UFindFile.pas

    r423 r424  
    3535  private
    3636    s : TStringList;
    37 
    3837    fSubFolder : boolean;
    3938    fAttr: TFileAttrib;
    4039    fPath : string;
    4140    fFileMask : string;
    42 
    4341    procedure SetPath(Value: string);
    4442    procedure FileSearch(const inPath : string);
     
    4644    constructor Create(AOwner: TComponent); override;
    4745    destructor Destroy; override;
    48 
    4946    function SearchForFiles: TStringList;
    5047  published
     
    6461
    6562procedure Register;
     63
    6664
    6765implementation
  • trunk/Packages/Common/UGeometric.pas

    r423 r424  
    9595  I: Integer;
    9696begin
     97  Result := Default(TPointArray);
    9798  SetLength(Result, Length(P));
    9899  for I := 0 to High(P) do
  • trunk/Packages/Common/UJobProgressView.lfm

    r396 r424  
    11object FormJobProgressView: TFormJobProgressView
    22  Left = 467
    3   Height = 345
     3  Height = 414
    44  Top = 252
    5   Width = 539
     5  Width = 647
    66  BorderIcons = [biSystemMenu]
    7   ClientHeight = 345
    8   ClientWidth = 539
    9   DesignTimePPI = 120
     7  ClientHeight = 414
     8  ClientWidth = 647
     9  DesignTimePPI = 144
    1010  OnClose = FormClose
    1111  OnCloseQuery = FormCloseQuery
    1212  OnCreate = FormCreate
    13   OnDestroy = FormDestroy
    1413  OnHide = FormHide
    1514  OnShow = FormShow
    1615  Position = poScreenCenter
    17   LCLVersion = '2.0.2.0'
     16  LCLVersion = '2.2.0.4'
    1817  object PanelOperationsTitle: TPanel
    1918    Left = 0
    20     Height = 32
     19    Height = 38
    2120    Top = 0
    22     Width = 539
     21    Width = 647
    2322    Align = alTop
    2423    BevelOuter = bvNone
    25     ClientHeight = 32
    26     ClientWidth = 539
     24    ClientHeight = 38
     25    ClientWidth = 647
    2726    FullRepaint = False
    2827    TabOrder = 0
    2928    object LabelOperation: TLabel
    30       Left = 8
    31       Height = 20
    32       Top = 8
    33       Width = 76
     29      Left = 10
     30      Height = 26
     31      Top = 10
     32      Width = 99
    3433      Caption = 'Operations:'
    35       ParentColor = False
    3634      ParentFont = False
    3735    end
     
    3937  object PanelLog: TPanel
    4038    Left = 0
    41     Height = 133
    42     Top = 212
    43     Width = 539
     39    Height = 161
     40    Top = 253
     41    Width = 647
    4442    Align = alClient
    4543    BevelOuter = bvSpace
    46     ClientHeight = 133
    47     ClientWidth = 539
     44    ClientHeight = 161
     45    ClientWidth = 647
    4846    TabOrder = 1
    4947    object MemoLog: TMemo
    50       Left = 8
    51       Height = 117
    52       Top = 8
    53       Width = 523
     48      Left = 10
     49      Height = 141
     50      Top = 10
     51      Width = 627
    5452      Anchors = [akTop, akLeft, akRight, akBottom]
    5553      ReadOnly = True
     
    6058  object PanelProgress: TPanel
    6159    Left = 0
    62     Height = 54
    63     Top = 106
    64     Width = 539
     60    Height = 65
     61    Top = 126
     62    Width = 647
    6563    Align = alTop
    6664    BevelOuter = bvNone
    67     ClientHeight = 54
    68     ClientWidth = 539
     65    ClientHeight = 65
     66    ClientWidth = 647
    6967    TabOrder = 2
    7068    object ProgressBarPart: TProgressBar
    71       Left = 10
    72       Height = 24
    73       Top = 24
    74       Width = 523
     69      Left = 12
     70      Height = 29
     71      Top = 29
     72      Width = 628
    7573      Anchors = [akTop, akLeft, akRight]
    7674      TabOrder = 0
    7775    end
    7876    object LabelEstimatedTimePart: TLabel
    79       Left = 8
    80       Height = 20
     77      Left = 10
     78      Height = 26
    8179      Top = -2
    82       Width = 103
     80      Width = 132
    8381      Caption = 'Estimated time:'
    84       ParentColor = False
    8582    end
    8683  end
    8784  object PanelOperations: TPanel
    8885    Left = 0
    89     Height = 42
    90     Top = 64
    91     Width = 539
     86    Height = 50
     87    Top = 76
     88    Width = 647
    9289    Align = alTop
    9390    BevelOuter = bvNone
    94     ClientHeight = 42
    95     ClientWidth = 539
     91    ClientHeight = 50
     92    ClientWidth = 647
    9693    FullRepaint = False
    9794    TabOrder = 3
    9895    object ListViewJobs: TListView
    99       Left = 8
    100       Height = 32
    101       Top = 5
    102       Width = 523
     96      Left = 10
     97      Height = 38
     98      Top = 6
     99      Width = 627
    103100      Anchors = [akTop, akLeft, akRight, akBottom]
    104101      AutoWidthLastColumn = True
     
    107104      Columns = <     
    108105        item
    109           Width = 523
     106          Width = 614
    110107        end>
    111108      OwnerData = True
     
    120117  object PanelProgressTotal: TPanel
    121118    Left = 0
    122     Height = 52
    123     Top = 160
    124     Width = 539
     119    Height = 62
     120    Top = 191
     121    Width = 647
    125122    Align = alTop
    126123    BevelOuter = bvNone
    127     ClientHeight = 52
    128     ClientWidth = 539
     124    ClientHeight = 62
     125    ClientWidth = 647
    129126    TabOrder = 4
    130127    object LabelEstimatedTimeTotal: TLabel
    131       Left = 8
    132       Height = 20
     128      Left = 10
     129      Height = 26
    133130      Top = 0
    134       Width = 141
     131      Width = 178
    135132      Caption = 'Total estimated time:'
    136       ParentColor = False
    137133    end
    138134    object ProgressBarTotal: TProgressBar
    139       Left = 8
    140       Height = 24
    141       Top = 24
    142       Width = 523
     135      Left = 10
     136      Height = 29
     137      Top = 29
     138      Width = 627
    143139      Anchors = [akTop, akLeft, akRight]
    144140      TabOrder = 0
     
    147143  object PanelText: TPanel
    148144    Left = 0
    149     Height = 32
    150     Top = 32
    151     Width = 539
     145    Height = 38
     146    Top = 38
     147    Width = 647
    152148    Align = alTop
    153149    BevelOuter = bvNone
    154     ClientHeight = 32
    155     ClientWidth = 539
     150    ClientHeight = 38
     151    ClientWidth = 647
    156152    TabOrder = 5
    157153    object LabelText: TLabel
    158       Left = 8
    159       Height = 24
    160       Top = 8
    161       Width = 525
     154      Left = 10
     155      Height = 29
     156      Top = 10
     157      Width = 630
    162158      Anchors = [akTop, akLeft, akRight]
    163159      AutoSize = False
    164       ParentColor = False
    165160    end
    166161  end
    167162  object ImageList1: TImageList
    168     BkColor = clForeground
    169     left = 200
    170     top = 8
     163    Left = 240
     164    Top = 10
    171165    Bitmap = {
    172       4C69020000001000000010000000FF00FF00FF00FF00FF00FF00FF00FF00FF00
    173       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    174       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    175       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    176       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    177       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    178       FF00000000FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    179       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF000000
    180       00FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    181       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF0000
    182       00FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    183       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF0000
    184       00FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    185       FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF0000
    186       00FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00
    187       FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF000000FFFF00
    188       FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FFFF00
    189       FF00FF00FF00FF00FF00000000FF000000FF000000FF000000FFFF00FF00FF00
    190       FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF0000
    191       00FFFF00FF00000000FF000000FF000000FF000000FFFF00FF00FF00FF00FF00
    192       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF0000
    193       00FF000000FF000000FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00
    194       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF0000
    195       00FF000000FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00
    196       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF000000
    197       00FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    198       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    199       FF00000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    200       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    201       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    202       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    203       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    204       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    205       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    206       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    207       FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00FF00FF00FF00FF00
    208       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    209       FF00FF00FF00FF00FF00FF00FF00000000FF000000FFFF00FF00FF00FF00FF00
    210       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    211       FF00FF00FF00FF00FF00FF00FF00000000FF000084FF000000FFFF00FF00FF00
    212       FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF0000
    213       00FF000000FF000000FF000000FF000000FF0000FFFF000084FF000000FFFF00
    214       FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF0000FFFF0000FFFF0000
    215       FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000084FF0000
    216       00FFFF00FF00FF00FF00FF00FF00FF00FF00000000FF0000FFFF0000FFFF0000
    217       FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000
    218       84FF000000FFFF00FF00FF00FF00FF00FF00000000FF0000FFFF0000FFFF0000
    219       FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000
    220       FFFF000084FF000000FFFF00FF00FF00FF00000000FF0000FFFF0000FFFF0000
    221       FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000
    222       84FF000000FFFF00FF00FF00FF00FF00FF00000000FF0000FFFF0000FFFF0000
    223       FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000084FF0000
    224       00FFFF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF0000
    225       00FF000000FF000000FF000000FF000000FF0000FFFF000084FF000000FFFF00
    226       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    227       FF00FF00FF00FF00FF00FF00FF00000000FF000084FF000000FFFF00FF00FF00
    228       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    229       FF00FF00FF00FF00FF00FF00FF00000000FF000000FFFF00FF00FF00FF00FF00
    230       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    231       FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00FF00FF00FF00FF00
    232       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    233       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    234       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    235       FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
    236       FF00FF00FF00FF00FF00FF00FF00
     166      4C7A0200000010000000100000006A0000000000000078DAE593490E00100C45
     167      7B78F72E5684A63A1142C382BE4F0708F89C955117F4B016BE67B5FC6E96DB97
     168      B0D4B9F4CD949F36DED1DF922B0F1BD11FAB5AFC68DE5C44D40220A9FA779EC8
     169      6A349FD5A435E43CADA1E3678D73F773F1DBF3EFADFFEEFEBBF97F6696BE9D36
    237170    }
    238171  end
     
    241174    Interval = 100
    242175    OnTimer = TimerUpdateTimer
    243     left = 320
    244     top = 8
     176    Left = 384
     177    Top = 10
    245178  end
    246179end
  • trunk/Packages/Common/UJobProgressView.pas

    r423 r424  
    55uses
    66  SysUtils, Variants, Classes, Graphics, Controls, Forms, Syncobjs,
    7   Dialogs, ComCtrls, StdCtrls, ExtCtrls, Contnrs, UThreading, Math,
     7  Dialogs, ComCtrls, StdCtrls, ExtCtrls, Generics.Collections, UThreading, Math,
    88  DateUtils;
    99
     
    6969  end;
    7070
    71   TJobs = class(TObjectList)
     71  TJobs = class(TObjectList<TJob>)
    7272  end;
    7373
     
    103103    procedure ReloadJobList;
    104104    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    105     procedure FormDestroy(Sender: TObject);
    106105    procedure ListViewJobsData(Sender: TObject; Item: TListItem);
    107106    procedure TimerUpdateTimer(Sender: TObject);
     
    163162  SExecuted = 'Executed';
    164163
     164
    165165implementation
    166166
     
    284284end;
    285285
    286 procedure TFormJobProgressView.FormDestroy(Sender:TObject);
    287 begin
    288 end;
    289 
    290286procedure TFormJobProgressView.ListViewJobsData(Sender: TObject; Item: TListItem);
    291287begin
    292288  if (Item.Index >= 0) and (Item.Index < JobProgressView.Jobs.Count) then
    293   with TJob(JobProgressView.Jobs[Item.Index]) do begin
     289  with JobProgressView.Jobs[Item.Index] do begin
    294290    Item.Caption := Title;
    295291    if Item.Index = JobProgressView.CurrentJobIndex then Item.ImageIndex := 1
     
    403399    I := 0;
    404400    while I < Jobs.Count do
    405     with TJob(Jobs[I]) do begin
     401    with Jobs[I] do begin
    406402      CurrentJobIndex := I;
    407       CurrentJob := TJob(Jobs[I]);
     403      CurrentJob := Jobs[I];
    408404      JobProgressChange(Self);
    409405      StartTime := Now;
     
    418414        Method(CurrentJob);
    419415      end else begin
     416        Thread := TJobThread.Create(True);
    420417        try
    421           Thread := TJobThread.Create(True);
    422418          with Thread do begin
    423419            FreeOnTerminate := False;
     
    492488  if AValue = FTerminate then Exit;
    493489  for I := 0 to Jobs.Count - 1 do
    494     TJob(Jobs[I]).Terminate := AValue;
     490    Jobs[I].Terminate := AValue;
    495491  FTerminate := AValue;
    496492end;
     
    618614procedure TProgress.Increment;
    619615begin
    620   try
    621     FLock.Acquire;
     616  FLock.Acquire;
     617  try
    622618    Value := Value + 1;
    623619  finally
     
    628624procedure TProgress.Reset;
    629625begin
    630   try
    631     FLock.Acquire;
     626  FLock.Acquire;
     627  try
    632628    FValue := 0;
    633629  finally
     
    676672destructor TJob.Destroy;
    677673begin
    678   Progress.Free;
     674  FreeAndNil(Progress);
    679675  inherited;
    680676end;
  • trunk/Packages/Common/ULanguages.pas

    r423 r424  
    44
    55uses
    6   Classes, SysUtils, fgl;
     6  Classes, SysUtils, Generics.Collections;
    77
    88type
     
    1515  { TLanguages }
    1616
    17   TLanguages = class(TFPGObjectList<TLanguage>)
     17  TLanguages = class(TObjectList<TLanguage>)
    1818    function SearchByCode(ACode: string): TLanguage;
    1919    procedure AddNew(Code: string; Name: string);
  • trunk/Packages/Common/ULastOpenedList.pas

    r423 r424  
    8282destructor TLastOpenedList.Destroy;
    8383begin
    84   Items.Free;
     84  FreeAndNil(Items);
    8585  inherited;
    8686end;
     
    9292begin
    9393  if Assigned(MenuItem) then begin
    94     MenuItem.Clear;
     94    while MenuItem.Count > Items.Count do
     95      MenuItem.Delete(MenuItem.Count - 1);
     96    while MenuItem.Count < Items.Count do begin
     97      NewMenuItem := TMenuItem.Create(MenuItem);
     98      MenuItem.Add(NewMenuItem);
     99    end;
    95100    for I := 0 to Items.Count - 1 do begin
    96       NewMenuItem := TMenuItem.Create(MenuItem);
    97       NewMenuItem.Caption := Items[I];
    98       NewMenuItem.OnClick := ClickAction;
    99       MenuItem.Add(NewMenuItem);
     101      MenuItem.Items[I].Caption := Items[I];
     102      MenuItem.Items[I].OnClick := ClickAction;
    100103    end;
    101104  end;
  • trunk/Packages/Common/UListViewSort.pas

    r423 r424  
    77uses
    88  {$IFDEF Windows}Windows, CommCtrl, LMessages, {$ENDIF}Classes, Graphics, ComCtrls, SysUtils,
    9   Controls, DateUtils, Dialogs, fgl, Forms, Grids, StdCtrls, ExtCtrls,
    10   LclIntf, LclType, LResources;
     9  Controls, DateUtils, Dialogs, Forms, Grids, StdCtrls, ExtCtrls,
     10  LclIntf, LclType, LResources, Generics.Collections, Generics.Defaults;
    1111
    1212type
     
    1717  TCompareEvent = function (Item1, Item2: TObject): Integer of object;
    1818  TListFilterEvent = procedure (ListViewSort: TListViewSort) of object;
     19
     20  TObjects = TObjectList<TObject>;
    1921
    2022  { TListViewSort }
     
    5052    {$ENDIF}
    5153  public
    52     List: TFPGObjectList<TObject>;
    53     Source: TFPGObjectList<TObject>;
     54    Source: TObjects;
     55    List: TObjects;
    5456    constructor Create(AOwner: TComponent); override;
    5557    destructor Destroy; override;
     
    336338  ListViewSortCompare: TCompareEvent;
    337339
    338 function ListViewCompare(const Item1, Item2: TObject): Integer;
     340function ListViewCompare(constref Item1, Item2: TObject): Integer;
    339341begin
    340342  Result := ListViewSortCompare(Item1, Item2);
     
    347349  ListViewSortCompare := Compare;
    348350  if (List.Count > 0) then
    349     List.Sort(ListViewCompare);
     351    List.Sort(TComparer<TObject>.Construct(ListViewCompare));
    350352end;
    351353
     
    353355begin
    354356  if Assigned(FOnFilter) then FOnFilter(Self)
    355   else if Assigned(Source) then
    356     List.Assign(Source) else
     357  else if Assigned(Source) then begin
    357358    List.Clear;
     359    List.AddRange(Source);
     360  end else List.Clear;
    358361  if ListView.Items.Count <> List.Count then
    359362    ListView.Items.Count := List.Count;
     
    410413begin
    411414  inherited;
    412   List := TFPGObjectList<TObject>.Create;
    413   List.FreeObjects := False;
     415  List := TObjects.Create;
     416  List.OwnsObjects := False;
    414417end;
    415418
    416419destructor TListViewSort.Destroy;
    417420begin
    418   List.Free;
     421  FreeAndNil(List);
    419422  inherited;
    420423end;
  • trunk/Packages/Common/UMetaCanvas.pas

    r423 r424  
    44
    55uses
    6   Classes, SysUtils, Graphics, Types, fgl;
     6  Classes, SysUtils, Graphics, Types, Generics.Collections;
    77
    88type
     
    1717  end;
    1818
    19   TCanvasObjects = class(TFPGObjectList<TCanvasObject>)
     19  TCanvasObjects = class(TObjectList<TCanvasObject>)
    2020  end;
    2121
     
    140140    procedure RoundRect(const Rect: TRect; RX,RY: Integer); overload;
    141141    procedure TextOut(X,Y: Integer; const Text: String); override;
    142     procedure Polygon(Points: PPoint; NumPts: Integer; Winding: boolean = False); override;
     142    procedure Polygon(Points: PPoint; NumPts: Integer; Winding: Boolean = False); override;
    143143    procedure Ellipse(x1, y1, x2, y2: Integer); override;
    144144    procedure StretchDraw(const DestRect: TRect; SrcGraphic: TGraphic); override;
     
    500500end;
    501501
    502 procedure TMetaCanvas.Polygon(Points: PPoint; NumPts: Integer; Winding: boolean
     502procedure TMetaCanvas.Polygon(Points: PPoint; NumPts: Integer; Winding: Boolean
    503503  );
    504504var
     
    506506  I: Integer;
    507507begin
     508  APoints := nil;
    508509  SetLength(APoints, NumPts);
    509510  for I := 0 to High(APoints) do
  • trunk/Packages/Common/UPixelPointer.pas

    r420 r424  
    5959  function Color32ToColor(Color: TColor32): TColor;
    6060  function ColorToColor32(Color: TColor): TColor32;
     61
    6162
    6263implementation
  • trunk/Packages/Common/UPool.pas

    r423 r424  
    44
    55uses
    6   Classes, SysUtils, syncobjs, fgl, UThreading;
     6  Classes, SysUtils, syncobjs, Generics.Collections, UThreading;
    77
    88type
     
    2020    function NewItemObject: TObject; virtual;
    2121  public
    22     Items: TFPGObjectList<TObject>;
    23     FreeItems: TFPGObjectList<TObject>;
     22    Items: TObjectList<TObject>;
     23    FreeItems: TObjectList<TObject>;
    2424    function Acquire: TObject; virtual;
    2525    procedure Release(Item: TObject); virtual;
     
    183183begin
    184184  inherited;
    185   Items := TFPGObjectList<TObject>.Create;
    186   FreeItems := TFPGObjectList<TObject>.Create;
    187   FreeItems.FreeObjects := False;
     185  Items := TObjectList<TObject>.Create;
     186  FreeItems := TObjectList<TObject>.Create;
     187  FreeItems.OwnsObjects := False;
    188188  FReleaseEvent := TEvent.Create(nil, False, False, '');
    189189end;
  • trunk/Packages/Common/URegistry.pas

    r423 r424  
    4646    HKEY_CURRENT_CONFIG, HKEY_DYN_DATA);
    4747
     48
    4849implementation
    49 
    5050
    5151{ TRegistryContext }
     
    138138function TRegistryEx.GetCurrentContext: TRegistryContext;
    139139begin
    140   Result.Key := CurrentPath;
     140  Result.Key := String(CurrentPath);
    141141  Result.RootKey := RootKey;
    142142end;
  • trunk/Packages/Common/UScaleDPI.pas

    r423 r424  
    66
    77uses
    8   Classes, Forms, Graphics, Controls, ComCtrls, LCLType, SysUtils, StdCtrls,
    9   Contnrs;
     8  Classes, Forms, Graphics, Controls, ComCtrls, LCLType, SysUtils,
     9  Generics.Collections;
    1010
    1111type
     12  TControlDimensions = class;
    1213
    1314  { TControlDimension }
     
    1617    BoundsRect: TRect;
    1718    FontHeight: Integer;
    18     Controls: TObjectList; // TList<TControlDimension>
     19    Controls: TControlDimensions;
    1920    // Class specifics
    2021    ButtonSize: TPoint; // TToolBar
     
    2425    constructor Create;
    2526    destructor Destroy; override;
     27  end;
     28
     29  TControlDimensions = class(TObjectList<TControlDimension>)
    2630  end;
    2731
     
    7175constructor TControlDimension.Create;
    7276begin
    73   Controls := TObjectList.Create;
     77  Controls := TControlDimensions.Create;
    7478end;
    7579
     
    7781begin
    7882  FreeAndNil(Controls);
    79   inherited Destroy;
     83  inherited;
    8084end;
    8185
     
    210214  TempBmp: TBitmap;
    211215  Temp: array of TBitmap;
    212   NewWidth, NewHeight: integer;
     216  NewWidth: Integer;
     217  NewHeight: Integer;
    213218  I: Integer;
    214219begin
    215220  ImgList.BeginUpdate;
    216   NewWidth := ScaleX(ImgList.Width, FromDPI.X);
    217   NewHeight := ScaleY(ImgList.Height, FromDPI.Y);
    218 
    219   SetLength(Temp, ImgList.Count);
    220   for I := 0 to ImgList.Count - 1 do
    221   begin
    222     TempBmp := TBitmap.Create;
    223     TempBmp.PixelFormat := pf32bit;
    224     ImgList.GetBitmap(I, TempBmp);
    225     Temp[I] := TBitmap.Create;
    226     Temp[I].SetSize(NewWidth, NewHeight);
    227     {$IFDEF UNIX}
    228     Temp[I].PixelFormat := pf24bit;
    229     {$ELSE}
    230     Temp[I].PixelFormat := pf32bit;
    231     {$ENDIF}
    232     Temp[I].TransparentColor := TempBmp.TransparentColor;
    233     //Temp[I].TransparentMode := TempBmp.TransparentMode;
    234     Temp[I].Transparent := True;
    235     Temp[I].Canvas.Brush.Style := bsSolid;
    236     Temp[I].Canvas.Brush.Color := Temp[I].TransparentColor;
    237     Temp[I].Canvas.FillRect(0, 0, Temp[I].Width, Temp[I].Height);
    238 
    239     if (Temp[I].Width = 0) or (Temp[I].Height = 0) then Continue;
    240     Temp[I].Canvas.StretchDraw(Rect(0, 0, Temp[I].Width, Temp[I].Height), TempBmp);
    241     TempBmp.Free;
    242   end;
    243 
    244   ImgList.Clear;
    245   ImgList.Width := NewWidth;
    246   ImgList.Height := NewHeight;
    247 
    248   for I := 0 to High(Temp) do
    249   begin
    250     ImgList.Add(Temp[I], nil);
    251     Temp[i].Free;
    252   end;
    253   ImgList.EndUpdate;
     221  try
     222    NewWidth := ScaleX(ImgList.Width, FromDPI.X);
     223    NewHeight := ScaleY(ImgList.Height, FromDPI.Y);
     224
     225    Temp := nil;
     226    SetLength(Temp, ImgList.Count);
     227    for I := 0 to ImgList.Count - 1 do
     228    begin
     229      TempBmp := TBitmap.Create;
     230      try
     231        TempBmp.PixelFormat := pf32bit;
     232        ImgList.GetBitmap(I, TempBmp);
     233        Temp[I] := TBitmap.Create;
     234        Temp[I].SetSize(NewWidth, NewHeight);
     235        {$IFDEF UNIX}
     236        Temp[I].PixelFormat := pf24bit;
     237        {$ELSE}
     238        Temp[I].PixelFormat := pf32bit;
     239        {$ENDIF}
     240        Temp[I].TransparentColor := TempBmp.TransparentColor;
     241        //Temp[I].TransparentMode := TempBmp.TransparentMode;
     242        Temp[I].Transparent := True;
     243        Temp[I].Canvas.Brush.Style := bsSolid;
     244        Temp[I].Canvas.Brush.Color := Temp[I].TransparentColor;
     245        Temp[I].Canvas.FillRect(0, 0, Temp[I].Width, Temp[I].Height);
     246
     247        if (Temp[I].Width = 0) or (Temp[I].Height = 0) then Continue;
     248        Temp[I].Canvas.StretchDraw(Rect(0, 0, Temp[I].Width, Temp[I].Height), TempBmp);
     249      finally
     250        TempBmp.Free;
     251      end;
     252    end;
     253
     254    ImgList.Clear;
     255    ImgList.Width := NewWidth;
     256    ImgList.Height := NewHeight;
     257
     258    for I := 0 to High(Temp) do
     259    begin
     260      ImgList.Add(Temp[I], nil);
     261      Temp[i].Free;
     262    end;
     263  finally
     264    ImgList.EndUpdate;
     265  end;
    254266end;
    255267
     
    329341  with TCoolBar(Control) do begin
    330342    BeginUpdate;
    331     for I := 0 to Bands.Count - 1 do
    332       with Bands[I] do begin
    333         MinWidth := ScaleX(MinWidth, FromDPI.X);
    334         MinHeight := ScaleY(MinHeight, FromDPI.Y);
    335         // Workaround to bad band width auto sizing
    336         //Width := ScaleX(Width, FromDPI.X);
    337         Width := ScaleX(Control.Width + 28, FromDPI.X);
    338         //Control.Invalidate;
     343    try
     344      for I := 0 to Bands.Count - 1 do
     345        with Bands[I] do begin
     346          MinWidth := ScaleX(MinWidth, FromDPI.X);
     347          MinHeight := ScaleY(MinHeight, FromDPI.Y);
     348          // Workaround to bad band width auto sizing
     349          //Width := ScaleX(Width, FromDPI.X);
     350          Width := ScaleX(Control.Width + 28, FromDPI.X);
     351          //Control.Invalidate;
     352        end;
     353      // Workaround for bad autosizing of coolbar
     354      if AutoSize then begin
     355        AutoSize := False;
     356        Height := ScaleY(Height, FromDPI.Y);
     357        AutoSize := True;
    339358      end;
    340     // Workaround for bad autosizing of coolbar
    341     if AutoSize then begin
    342       AutoSize := False;
    343       Height := ScaleY(Height, FromDPI.Y);
    344       AutoSize := True;
    345     end;
    346     EndUpdate;
     359    finally
     360      EndUpdate;
     361    end;
    347362  end;
    348363
  • trunk/Packages/Common/UStringTable.pas

    r396 r424  
    11unit UStringTable;
    2 
    3 {$mode objfpc}{$H+}
    42
    53interface
  • trunk/Packages/Common/UTheme.pas

    r420 r424  
    55uses
    66  Classes, SysUtils, Graphics, ComCtrls, Controls, ExtCtrls, Menus, StdCtrls,
    7   Spin, Forms, fgl, Grids;
     7  Spin, Forms, Generics.Collections, Grids;
    88
    99type
     
    1919  { TThemes }
    2020
    21   TThemes = class(TFPGObjectList<TTheme>)
     21  TThemes = class(TObjectList<TTheme>)
    2222    function AddNew(Name: string): TTheme;
    2323    function FindByName(Name: string): TTheme;
     
    4242  end;
    4343
     44const
     45  ThemeNameSystem = 'System';
     46  ThemeNameLight = 'Light';
     47  ThemeNameDark = 'Dark';
     48
    4449procedure Register;
     50
    4551
    4652implementation
     
    105111  inherited;
    106112  Themes := TThemes.Create;
    107   with Themes.AddNew('System') do begin
     113  with Themes.AddNew(ThemeNameSystem) do begin
    108114    ColorWindow := clWindow;
    109115    ColorWindowText := clWindowText;
     
    113119  end;
    114120  Theme := TTheme(Themes.First);
    115   with Themes.AddNew('Dark') do begin
     121  with Themes.AddNew(ThemeNameDark) do begin
    116122    ColorWindow := RGBToColor($20, $20, $20);
    117123    ColorWindowText := clWhite;
     
    120126    ColorControlSelected := RGBToColor(96, 125, 155);
    121127  end;
    122   with Themes.AddNew('Light') do begin
     128  with Themes.AddNew(ThemeNameLight) do begin
    123129    ColorWindow := clWhite;
    124130    ColorWindowText := clBlack;
     
    175181procedure TThemeManager.UseTheme(Form: TForm);
    176182begin
    177   if not Used and (FTheme.Name = 'System') then Exit;
     183  if not Used and (FTheme.Name = ThemeNameSystem) then Exit;
    178184  ApplyTheme(Form);
    179185  Used := True;
  • trunk/Packages/Common/UThreading.pas

    r423 r424  
    44
    55uses
    6   Classes, SysUtils, Forms, fgl, SyncObjs;
     6  Classes, SysUtils, Forms, Generics.Collections, SyncObjs;
    77
    88type
    99  TExceptionEvent = procedure (Sender: TObject; E: Exception) of object;
    1010  TMethodCall = procedure of object;
    11 
    1211
    1312  { TVirtualThread }
     
    10099  { TThreadList }
    101100
    102   TThreadList = class(TFPGObjectList<TVirtualThread>)
     101  TThreadList = class(TObjectList<TVirtualThread>)
    103102    function FindById(Id: TThreadID): TVirtualThread;
    104103    constructor Create; virtual;
     
    359358ThreadListLock := TCriticalSection.Create;
    360359ThreadList := TThreadList.Create;
    361 ThreadList.FreeObjects := False;
     360ThreadList.OwnsObjects := False;
    362361
    363362finalization
  • trunk/Packages/Common/UTranslator.pas

    r423 r424  
    44
    55uses
    6   Classes, SysUtils, Forms, ExtCtrls, Controls, fgl, LazFileUtils, LazUTF8,
     6  Classes, SysUtils, Forms, ExtCtrls, Controls, LazFileUtils, LazUTF8,
    77  Translations, TypInfo, Dialogs, FileUtil, LCLProc, ULanguages, LCLType,
    8   LCLVersion;
     8  LCLVersion, Generics.Collections;
    99
    1010type
    1111  THandleStringEvent = function (AValue: string): string of object;
    1212
    13   TPoFiles = class(TFPGObjectList<TPOFile>)
     13  TPoFiles = class(TObjectList<TPOFile>)
    1414  end;
    1515
     
    2525  { TComponentExcludesList }
    2626
    27   TComponentExcludesList = class(TFPGObjectList<TComponentExcludes>)
     27  TComponentExcludesList = class(TObjectList<TComponentExcludes>)
    2828    function FindByClassType(AClassType: TClass): TComponentExcludes;
    2929    procedure DumpToStrings(Strings: TStrings);
     
    288288  Item := Component.ClassType;
    289289  while Assigned(Item) do begin
    290     //ShowMessage(Component.Name + ', ' + Component.ClassName + ', ' + Item.ClassName + ', ' + PropertyName);
    291290    Excludes := ComponentExcludes.FindByClassType(Item.ClassType);
    292291    if Assigned(Excludes) then begin
  • trunk/Settings.pas

    r423 r424  
    55uses
    66  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    7   LCLProc, ScreenTools, Messg, ButtonA, Registry, fgl, Directories, DrawDlg,
    8   ButtonC, UKeyBindings, ULanguages;
     7  LCLProc, ScreenTools, Messg, ButtonA, Registry, Directories, DrawDlg, ButtonC,
     8  UKeyBindings, ULanguages;
    99
    1010type
  • trunk/Start.pas

    r423 r424  
    77  GameServer, Messg, ButtonBase, ButtonA, ButtonC, ButtonB, Area, Types,
    88  LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, StdCtrls,
    9   Menus, Registry, DrawDlg, fgl, Protocol, UMiniMap, UBrain, UTranslator;
     9  Menus, Registry, DrawDlg, Generics.Collections, Protocol, UMiniMap, UBrain,
     10  UTranslator;
    1011
    1112type
     
    2021  end;
    2122
    22   TPlayerSlots = class(TFPGObjectList<TPlayerSlot>)
     23  TPlayerSlots = class(TObjectList<TPlayerSlot>)
    2324  end;
    2425
  • trunk/UBrain.pas

    r423 r424  
    44
    55uses
    6   Classes, SysUtils, fgl, Graphics, Protocol, LazFileUtils, dynlibs, Types;
     6  Classes, SysUtils, Generics.Collections, Graphics, Protocol, LazFileUtils,
     7  dynlibs, Types;
    78
    89const
     
    4142  { TBrains }
    4243
    43   TBrains = class(TFPGObjectList<TBrain>)
     44  TBrains = class(TObjectList<TBrain>)
    4445    function AddNew: TBrain;
    4546    function GetKindCount(Kind: TBrainType): Integer;
Note: See TracChangeset for help on using the changeset viewer.