Changeset 54


Ignore:
Timestamp:
Dec 24, 2022, 7:17:24 PM (17 months ago)
Author:
chronos
Message:
  • Modified: Updated Common package to latest version.
  • Modified: Build with Lazarus 2.2.4.
Location:
trunk
Files:
18 added
12 deleted
42 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        66Tunneler.dbg
        77tunneler.lps
         8*.res
        89heaptrclog.trc
        910Components/Common/Languages/*.mo
        10 Components/CoolTranslator/Demo/lib
         11
  • trunk/Languages/Tunneler.cs.po

    r53 r54  
    167167
    168168#: uformmain.sround
    169 #, fuzzy
     169#, object-pascal-format, fuzzy
    170170msgctxt "uformmain.sround"
    171171msgid "%0:s of %1:s"
    172172msgstr "%0:s z %1:s"
     173
  • trunk/Packages/Common/Common.lpk

    r53 r54  
    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"/>
    44     <Files Count="29">
     43    <Version Minor="10"/>
     44    <Files Count="32">
    4545      <Item1>
    4646        <Filename Value="StopWatch.pas"/>
     
    171171        <UnitName Value="UPixelPointer"/>
    172172      </Item29>
     173      <Item30>
     174        <Filename Value="UDataFile.pas"/>
     175        <UnitName Value="UDataFile"/>
     176      </Item30>
     177      <Item31>
     178        <Filename Value="UTestCase.pas"/>
     179        <UnitName Value="UTestCase"/>
     180      </Item31>
     181      <Item32>
     182        <Filename Value="UGenerics.pas"/>
     183        <UnitName Value="UGenerics"/>
     184      </Item32>
    173185    </Files>
     186    <CompatibilityMode Value="True"/>
    174187    <i18n>
    175188      <EnableI18N Value="True"/>
  • trunk/Packages/Common/Common.pas

    r51 r54  
    1414  UPersistentForm, UFindFile, UScaleDPI, UTheme, UStringTable, UMetaCanvas,
    1515  UGeometric, UTranslator, ULanguages, UFormAbout, UAboutDialog,
    16   UPixelPointer, LazarusPackageIntf;
     16  UPixelPointer, UDataFile, UTestCase, UGenerics, LazarusPackageIntf;
    1717
    1818implementation
  • trunk/Packages/Common/Languages/UJobProgressView.cs.po

    r51 r54  
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "X-Generator: Poedit 1.8.8\n"
     12"X-Generator: Poedit 2.2\n"
    1313
    1414#: ujobprogressview.sestimatedtime
     15#, object-pascal-format
    1516msgid "Estimated time: %s"
    1617msgstr "OdhadovanÜ čas: %s"
     
    3334
    3435#: ujobprogressview.stotalestimatedtime
     36#, object-pascal-format
    3537msgid "Total estimated time: %s"
    3638msgstr "CelkovÜ odhadovanÜ čas: %s"
  • trunk/Packages/Common/Languages/UScaleDPI.cs.po

    r38 r54  
    1313
    1414#: uscaledpi.swrongdpi
     15#, object-pascal-format
    1516msgid "Wrong DPI [%d,%d]"
    1617msgstr "Chybné DPI [%d,%d]"
  • trunk/Packages/Common/Languages/UThreading.cs.po

    r31 r54  
    1111
    1212#: uthreading.scurrentthreadnotfound
     13#, object-pascal-format
    1314msgid "Current thread ID %d not found in virtual thread list."
    1415msgstr "Aktuální vlákno ID %d nenalezeno v seznamu virtuálních vláken."
  • trunk/Packages/Common/StopWatch.pas

    r31 r54  
    55
    66uses
    7   {$IFDEF Windows}Windows,{$ENDIF}
     7  {$IFDEF WINDOWS}Windows,{$ENDIF}
    88  SysUtils, DateUtils;
    99
     
    3232  end;
    3333
     34
    3435implementation
    3536
     
    4041  fIsRunning := False;
    4142
    42   {$IFDEF Windows}
     43  {$IFDEF WINDOWS}
    4344  fIsHighResolution := QueryPerformanceFrequency(fFrequency) ;
    4445  {$ELSE}
  • trunk/Packages/Common/UAboutDialog.pas

    r53 r54  
    11unit UAboutDialog;
    2 
    3 {$mode delphi}
    42
    53interface
     
    75uses
    86  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
    9   StdCtrls, ExtCtrls, UApplicationInfo, UCommon, UTranslator, UTheme, UFormAbout;
     7  ExtCtrls, UApplicationInfo, UCommon, UTranslator, UTheme, UFormAbout;
    108
    119type
  • trunk/Packages/Common/UApplicationInfo.pas

    r51 r54  
    11unit UApplicationInfo;
    2 
    3 {$mode delphi}
    42
    53interface
     
    5957procedure Register;
    6058
     59
    6160implementation
    6261
  • trunk/Packages/Common/UCommon.pas

    r51 r54  
    11unit UCommon;
    22
    3 {$mode delphi}
    4 
    53interface
    64
    75uses
    8   {$ifdef Windows}Windows,{$endif}
    9   {$ifdef Linux}baseunix,{$endif}
    10   Classes, SysUtils, StrUtils, Dialogs, Process, LCLIntf,
    11   FileUtil; //, ShFolder, ShellAPI;
     6  {$IFDEF WINDOWS}Windows,{$ENDIF}
     7  {$IFDEF UNIX}baseunix,{$ENDIF}
     8  Classes, SysUtils, StrUtils, Dialogs, Process, LCLIntf, Graphics,
     9  FileUtil, Generics.Collections; //, ShFolder, ShellAPI;
    1210
    1311type
    1412  TArrayOfByte = array of Byte;
    15   TArrayOfString = array of string;
    1613  TExceptionEvent = procedure(Sender: TObject; E: Exception) of object;
    1714
     
    3532  DLLHandle1: HModule;
    3633
    37 {$IFDEF Windows}
    38   GetUserNameEx: procedure (NameFormat: DWORD;
    39     lpNameBuffer: LPSTR; nSize: PULONG); stdcall;
    40 {$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);
    4143
    4244function AddLeadingZeroes(const aNumber, Length : integer) : string;
     
    5153function ComputerName: string;
    5254procedure DeleteFiles(APath, AFileSpec: string);
     55function Explode(Separator: Char; Data: string): TStringArray;
    5356procedure ExecuteProgram(Executable: string; Parameters: array of string);
    5457procedure FileDialogUpdateFilterFileType(FileDialog: TOpenDialog);
     
    6265function GetFileFilterItemExt(Filter: string; Index: Integer): string;
    6366function IntToBin(Data: Int64; Count: Byte): string;
     67function Implode(Separator: Char; List: TList<string>): string;
    6468function LastPos(const SubStr: String; const S: String): Integer;
    6569function LoadFileToStr(const FileName: TFileName): AnsiString;
    6670function LoggedOnUserNameEx(Format: TUserNameFormat): string;
    67 function MergeArray(A, B: array of string): TArrayOfString;
     71function MergeArray(A, B: array of string): TStringArray;
    6872function OccurenceOfChar(What: Char; Where: string): Integer;
    6973procedure OpenWebPage(URL: string);
     74procedure OpenEmail(Email: string);
    7075procedure OpenFileInShell(FileName: string);
    7176function PosFromIndex(SubStr: string; Text: string;
     
    8388function SplitString(var Text: string; Count: Word): string;
    8489function StripTags(const S: string): string;
    85 function TryHexToInt(Data: string; var Value: Integer): Boolean;
    86 function TryBinToInt(Data: string; var Value: Integer): Boolean;
     90function TryHexToInt(Data: string; out Value: Integer): Boolean;
     91function TryBinToInt(Data: string; out Value: Integer): Boolean;
    8792procedure SortStrings(Strings: TStrings);
    8893
     
    246251end;
    247252
    248 function TryHexToInt(Data: string; var Value: Integer): Boolean;
     253function TryHexToInt(Data: string; out Value: Integer): Boolean;
    249254var
    250255  I: Integer;
     
    262267end;
    263268
    264 function TryBinToInt(Data: string; var Value: Integer): Boolean;
     269function TryBinToInt(Data: string; out Value: Integer): Boolean;
    265270var
    266271  I: Integer;
     
    290295end;
    291296
    292 function Explode(Separator: char; Data: string): TArrayOfString;
    293 begin
    294   SetLength(Result, 0);
    295   while Pos(Separator, Data) > 0 do begin
     297function Explode(Separator: Char; Data: string): TStringArray;
     298var
     299  Index: Integer;
     300begin
     301  Result := Default(TStringArray);
     302  repeat
     303    Index := Pos(Separator, Data);
     304    if Index > 0 then begin
     305      SetLength(Result, Length(Result) + 1);
     306      Result[High(Result)] := Copy(Data, 1, Index - 1);
     307      Delete(Data, 1, Index);
     308    end else Break;
     309  until False;
     310  if Data <> '' then begin
    296311    SetLength(Result, Length(Result) + 1);
    297     Result[High(Result)] := Copy(Data, 1, Pos(Separator, Data) - 1);
    298     Delete(Data, 1, Pos(Separator, Data));
    299   end;
    300   SetLength(Result, Length(Result) + 1);
    301   Result[High(Result)] := Data;
    302 end;
    303 
    304 {$IFDEF Windows}
     312    Result[High(Result)] := Data;
     313  end;
     314end;
     315
     316function Implode(Separator: Char; List: TList<string>): string;
     317var
     318  I: Integer;
     319begin
     320  Result := '';
     321  for I := 0 to List.Count - 1 do begin
     322    Result := Result + List[I];
     323    if I < List.Count - 1 then Result := Result + Separator;
     324  end;
     325end;
     326
     327{$IFDEF WINDOWS}
    305328function GetUserName: string;
    306329const
     
    310333begin
    311334  L := MAX_USERNAME_LENGTH + 2;
     335  Result := Default(string);
    312336  SetLength(Result, L);
    313337  if Windows.GetUserName(PChar(Result), L) and (L > 0) then begin
     
    323347  end;
    324348end;
    325 {$endif}
     349{$ENDIF}
    326350
    327351function ComputerName: string;
    328 {$ifdef mswindows}
     352{$IFDEF WINDOWS}
    329353const
    330354 INFO_BUFFER_SIZE = 32767;
     
    341365  end;
    342366end;
    343 {$endif}
    344 {$ifdef unix}
     367{$ENDIF}
     368{$IFDEF UNIX}
    345369var
    346370  Name: UtsName;
    347371begin
     372  Name := Default(UtsName);
    348373  fpuname(Name);
    349374  Result := Name.Nodename;
    350375end;
    351 {$endif}
    352 
    353 {$ifdef windows}
     376{$ENDIF}
     377
     378{$IFDEF WINDOWS}
    354379function LoggedOnUserNameEx(Format: TUserNameFormat): string;
    355380const
     
    429454procedure LoadLibraries;
    430455begin
    431   {$IFDEF Windows}
     456  {$IFDEF WINDOWS}
    432457  DLLHandle1 := LoadLibrary('secur32.dll');
    433458  if DLLHandle1 <> 0 then
     
    440465procedure FreeLibraries;
    441466begin
    442   {$IFDEF Windows}
     467  {$IFDEF WINDOWS}
    443468  if DLLHandle1 <> 0 then FreeLibrary(DLLHandle1);
    444469  {$ENDIF}
     
    473498end;
    474499
     500procedure OpenEmail(Email: string);
     501begin
     502  OpenURL('mailto:' + Email);
     503end;
     504
    475505procedure OpenFileInShell(FileName: string);
    476506begin
     
    501531end;
    502532
    503 function MergeArray(A, B: array of string): TArrayOfString;
    504 var
    505   I: Integer;
    506 begin
     533function MergeArray(A, B: array of string): TStringArray;
     534var
     535  I: Integer;
     536begin
     537  Result := Default(TStringArray);
    507538  SetLength(Result, Length(A) + Length(B));
    508539  for I := 0 to Length(A) - 1 do
  • trunk/Packages/Common/UDebugLog.pas

    r38 r54  
    11unit UDebugLog;
    2 
    3 {$mode delphi}
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, FileUtil, fgl, SyncObjs;
     6  Classes, SysUtils, FileUtil, Generics.Collections, SyncObjs;
    97
    108type
     
    1513    Group: string;
    1614    Text: string;
     15  end;
     16
     17  TDebugLogItems = class(TObjectList<TDebugLogItem>)
    1718  end;
    1819
     
    2930    procedure SetMaxCount(const AValue: Integer);
    3031  public
    31     Items: TFPGObjectList<TDebugLogItem>;
     32    Items: TDebugLogItems;
    3233    Lock: TCriticalSection;
    3334    procedure Add(Text: string; Group: string = '');
     
    4445
    4546procedure Register;
     47
    4648
    4749implementation
     
    117119begin
    118120  inherited;
    119   Items := TFPGObjectList<TDebugLogItem>.Create;
     121  Items := TDebugLogItems.Create;
    120122  Lock := TCriticalSection.Create;
    121123  MaxCount := 100;
     
    126128destructor TDebugLog.Destroy;
    127129begin
    128   Items.Free;
    129   Lock.Free;
     130  FreeAndNil(Items);
     131  FreeAndNil(Lock);
    130132  inherited;
    131133end;
  • trunk/Packages/Common/UDelay.pas

    r31 r54  
    11unit UDelay;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Packages/Common/UFindFile.pas

    r38 r54  
    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
     
    5956  FilterAll = '*.*';
    6057{$ENDIF}
    61 {$IFDEF LINUX}
     58{$IFDEF UNIX}
    6259  FilterAll = '*';
    6360{$ENDIF}
    6461
    6562procedure Register;
     63
    6664
    6765implementation
     
    8785begin
    8886  s.Free;
    89   inherited Destroy;
     87  inherited;
    9088end;
    9189
  • trunk/Packages/Common/UFormAbout.pas

    r53 r54  
    11unit UFormAbout;
    2 
    3 {$mode delphi}
    42
    53interface
     
    2220    PanelButtons: TPanel;
    2321    procedure ButtonHomePageClick(Sender: TObject);
    24     procedure FormCreate(Sender: TObject);
    2522    procedure FormShow(Sender: TObject);
    26   private
    27     { private declarations }
    2823  public
    2924    AboutDialog: TObject; //TAboutDialog
     
    7974end;
    8075
    81 procedure TFormAbout.FormCreate(Sender: TObject);
    82 begin
    83 end;
    84 
    8576end.
    8677
  • trunk/Packages/Common/UGeometric.pas

    r51 r54  
    11unit UGeometric;
    2 
    3 {$mode delphi}
    42
    53interface
     
    2624function RectEnlarge(Rect: TRect; Value: Integer): TRect;
    2725function ShiftRect(ARect: TRect; Delta: TPoint): TRect;
     26
    2827
    2928implementation
     
    9695  I: Integer;
    9796begin
     97  Result := Default(TPointArray);
    9898  SetLength(Result, Length(P));
    9999  for I := 0 to High(P) do
  • trunk/Packages/Common/UJobProgressView.lfm

    r51 r54  
    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

    r51 r54  
    11unit UJobProgressView;
    2 
    3 {$MODE Delphi}
    42
    53interface
     
    75uses
    86  SysUtils, Variants, Classes, Graphics, Controls, Forms, Syncobjs,
    9   Dialogs, ComCtrls, StdCtrls, ExtCtrls, Contnrs, UThreading, Math,
     7  Dialogs, ComCtrls, StdCtrls, ExtCtrls, Generics.Collections, UThreading, Math,
    108  DateUtils;
    119
     
    7169  end;
    7270
    73   TJobs = class(TObjectList)
     71  TJobs = class(TObjectList<TJob>)
    7472  end;
    7573
     
    105103    procedure ReloadJobList;
    106104    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    107     procedure FormDestroy(Sender: TObject);
    108105    procedure ListViewJobsData(Sender: TObject; Item: TListItem);
    109106    procedure TimerUpdateTimer(Sender: TObject);
     
    165162  SExecuted = 'Executed';
    166163
     164
    167165implementation
    168166
     
    286284end;
    287285
    288 procedure TFormJobProgressView.FormDestroy(Sender:TObject);
    289 begin
    290 end;
    291 
    292286procedure TFormJobProgressView.ListViewJobsData(Sender: TObject; Item: TListItem);
    293287begin
    294288  if (Item.Index >= 0) and (Item.Index < JobProgressView.Jobs.Count) then
    295   with TJob(JobProgressView.Jobs[Item.Index]) do begin
     289  with JobProgressView.Jobs[Item.Index] do begin
    296290    Item.Caption := Title;
    297291    if Item.Index = JobProgressView.CurrentJobIndex then Item.ImageIndex := 1
     
    405399    I := 0;
    406400    while I < Jobs.Count do
    407     with TJob(Jobs[I]) do begin
     401    with Jobs[I] do begin
    408402      CurrentJobIndex := I;
    409       CurrentJob := TJob(Jobs[I]);
     403      CurrentJob := Jobs[I];
    410404      JobProgressChange(Self);
    411405      StartTime := Now;
     
    420414        Method(CurrentJob);
    421415      end else begin
     416        Thread := TJobThread.Create(True);
    422417        try
    423           Thread := TJobThread.Create(True);
    424418          with Thread do begin
    425419            FreeOnTerminate := False;
     
    494488  if AValue = FTerminate then Exit;
    495489  for I := 0 to Jobs.Count - 1 do
    496     TJob(Jobs[I]).Terminate := AValue;
     490    Jobs[I].Terminate := AValue;
    497491  FTerminate := AValue;
    498492end;
     
    620614procedure TProgress.Increment;
    621615begin
    622   try
    623     FLock.Acquire;
     616  FLock.Acquire;
     617  try
    624618    Value := Value + 1;
    625619  finally
     
    630624procedure TProgress.Reset;
    631625begin
    632   try
    633     FLock.Acquire;
     626  FLock.Acquire;
     627  try
    634628    FValue := 0;
    635629  finally
     
    647641begin
    648642  FLock.Free;
    649   inherited Destroy;
     643  inherited;
    650644end;
    651645
     
    678672destructor TJob.Destroy;
    679673begin
    680   Progress.Free;
     674  FreeAndNil(Progress);
    681675  inherited;
    682676end;
  • trunk/Packages/Common/ULanguages.pas

    r53 r54  
    11unit ULanguages;
    22
    3 {$mode delphi}{$H+}
    4 
    53interface
    64
    75uses
    8   Classes, SysUtils, fgl;
     6  Classes, SysUtils, Generics.Collections;
    97
    108type
     
    1715  { TLanguages }
    1816
    19   TLanguages = class(TFPGObjectList<TLanguage>)
     17  TLanguages = class(TObjectList<TLanguage>)
    2018    function SearchByCode(ACode: string): TLanguage;
    2119    procedure AddNew(Code: string; Name: string);
  • trunk/Packages/Common/ULastOpenedList.pas

    r38 r54  
    11unit ULastOpenedList;
    2 
    3 {$mode delphi}
    42
    53interface
     
    8482destructor TLastOpenedList.Destroy;
    8583begin
    86   Items.Free;
     84  FreeAndNil(Items);
    8785  inherited;
    8886end;
     
    9492begin
    9593  if Assigned(MenuItem) then begin
    96     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;
    97100    for I := 0 to Items.Count - 1 do begin
    98       NewMenuItem := TMenuItem.Create(MenuItem);
    99       NewMenuItem.Caption := Items[I];
    100       NewMenuItem.OnClick := ClickAction;
    101       MenuItem.Add(NewMenuItem);
     101      MenuItem.Items[I].Caption := Items[I];
     102      MenuItem.Items[I].OnClick := ClickAction;
    102103    end;
    103104  end;
  • trunk/Packages/Common/UListViewSort.pas

    r51 r54  
    22
    33// Date: 2019-05-17
    4 
    5 {$mode delphi}
    64
    75interface
     
    97uses
    108  {$IFDEF Windows}Windows, CommCtrl, LMessages, {$ENDIF}Classes, Graphics, ComCtrls, SysUtils,
    11   Controls, DateUtils, Dialogs, fgl, Forms, Grids, StdCtrls, ExtCtrls,
    12   LclIntf, LclType, LResources;
     9  Controls, DateUtils, Dialogs, Forms, Grids, StdCtrls, ExtCtrls,
     10  LclIntf, LclType, LResources, Generics.Collections, Generics.Defaults;
    1311
    1412type
     
    1917  TCompareEvent = function (Item1, Item2: TObject): Integer of object;
    2018  TListFilterEvent = procedure (ListViewSort: TListViewSort) of object;
     19
     20  TObjects = TObjectList<TObject>;
    2121
    2222  { TListViewSort }
     
    5252    {$ENDIF}
    5353  public
    54     List: TFPGObjectList<TObject>;
    55     Source: TFPGObjectList<TObject>;
     54    Source: TObjects;
     55    List: TObjects;
    5656    constructor Create(AOwner: TComponent); override;
    5757    destructor Destroy; override;
     
    149149destructor TListViewEx.Destroy;
    150150begin
    151   inherited Destroy;
     151  inherited;
    152152end;
    153153
     
    338338  ListViewSortCompare: TCompareEvent;
    339339
    340 function ListViewCompare(const Item1, Item2: TObject): Integer;
     340function ListViewCompare(constref Item1, Item2: TObject): Integer;
    341341begin
    342342  Result := ListViewSortCompare(Item1, Item2);
     
    349349  ListViewSortCompare := Compare;
    350350  if (List.Count > 0) then
    351     List.Sort(ListViewCompare);
     351    List.Sort(TComparer<TObject>.Construct(ListViewCompare));
    352352end;
    353353
     
    355355begin
    356356  if Assigned(FOnFilter) then FOnFilter(Self)
    357   else if Assigned(Source) then
    358     List.Assign(Source) else
     357  else if Assigned(Source) then begin
    359358    List.Clear;
     359    List.AddRange(Source);
     360  end else List.Clear;
    360361  if ListView.Items.Count <> List.Count then
    361362    ListView.Items.Count := List.Count;
     
    412413begin
    413414  inherited;
    414   List := TFPGObjectList<TObject>.Create;
    415   List.FreeObjects := False;
     415  List := TObjects.Create;
     416  List.OwnsObjects := False;
    416417end;
    417418
    418419destructor TListViewSort.Destroy;
    419420begin
    420   List.Free;
     421  FreeAndNil(List);
    421422  inherited;
    422423end;
  • trunk/Packages/Common/UMemory.pas

    r51 r54  
    11unit UMemory;
    2 
    3 {$mode Delphi}{$H+}
    42
    53interface
     
    4442  end;
    4543
     44
    4645implementation
    4746
     
    5049procedure TPositionMemory.SetSize(AValue: Integer);
    5150begin
    52   inherited SetSize(AValue);
     51  inherited;
    5352  if FPosition > FSize then FPosition := FSize;
    5453end;
     
    107106begin
    108107  Size := 0;
    109   inherited Destroy;
     108  inherited;
    110109end;
    111110
  • trunk/Packages/Common/UMetaCanvas.pas

    r51 r54  
    11unit UMetaCanvas;
    22
    3 {$mode delphi}
    4 
    53interface
    64
    75uses
    8   Classes, SysUtils, Graphics, Types, fgl;
     6  Classes, SysUtils, Graphics, Types, Generics.Collections;
    97
    108type
     
    1917  end;
    2018
    21   TCanvasObjects = class(TFPGObjectList<TCanvasObject>)
     19  TCanvasObjects = class(TObjectList<TCanvasObject>)
    2220  end;
    2321
     
    142140    procedure RoundRect(const Rect: TRect; RX,RY: Integer); overload;
    143141    procedure TextOut(X,Y: Integer; const Text: String); override;
    144     procedure Polygon(Points: PPoint; NumPts: Integer; Winding: boolean = False); override;
     142    procedure Polygon(Points: PPoint; NumPts: Integer; Winding: Boolean = False); override;
    145143    procedure Ellipse(x1, y1, x2, y2: Integer); override;
    146144    procedure StretchDraw(const DestRect: TRect; SrcGraphic: TGraphic); override;
     
    502500end;
    503501
    504 procedure TMetaCanvas.Polygon(Points: PPoint; NumPts: Integer; Winding: boolean
     502procedure TMetaCanvas.Polygon(Points: PPoint; NumPts: Integer; Winding: Boolean
    505503  );
    506504var
     
    508506  I: Integer;
    509507begin
     508  APoints := nil;
    510509  SetLength(APoints, NumPts);
    511510  for I := 0 to High(APoints) do
  • trunk/Packages/Common/UPersistentForm.pas

    r51 r54  
    11unit UPersistentForm;
    2 
    3 {$mode delphi}
    42
    53// Date: 2020-11-26
  • trunk/Packages/Common/UPixelPointer.pas

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

    r38 r54  
    11unit UPool;
    22
    3 {$mode Delphi}{$H+}
    4 
    53interface
    64
    75uses
    8   Classes, SysUtils, syncobjs, fgl, UThreading;
     6  Classes, SysUtils, syncobjs, Generics.Collections, UThreading;
    97
    108type
     
    2220    function NewItemObject: TObject; virtual;
    2321  public
    24     Items: TFPGObjectList<TObject>;
    25     FreeItems: TFPGObjectList<TObject>;
     22    Items: TObjectList<TObject>;
     23    FreeItems: TObjectList<TObject>;
    2624    function Acquire: TObject; virtual;
    2725    procedure Release(Item: TObject); virtual;
     
    108106constructor TThreadedPool.Create;
    109107begin
    110   inherited Create;
     108  inherited;
    111109  Lock := TCriticalSection.Create;
    112110end;
     
    116114  TotalCount := 0;
    117115  Lock.Free;
    118   inherited Destroy;
     116  inherited;
    119117end;
    120118
     
    185183begin
    186184  inherited;
    187   Items := TFPGObjectList<TObject>.Create;
    188   FreeItems := TFPGObjectList<TObject>.Create;
    189   FreeItems.FreeObjects := False;
     185  Items := TObjectList<TObject>.Create;
     186  FreeItems := TObjectList<TObject>.Create;
     187  FreeItems.OwnsObjects := False;
    190188  FReleaseEvent := TEvent.Create(nil, False, False, '');
    191189end;
  • trunk/Packages/Common/UPrefixMultiplier.pas

    r38 r54  
    22
    33// Date: 2010-06-01
    4 
    5 {$mode delphi}
    64
    75interface
  • trunk/Packages/Common/URegistry.pas

    r50 r54  
    11unit URegistry;
    2 
    3 {$MODE delphi}
    42
    53interface
     
    4846    HKEY_CURRENT_CONFIG, HKEY_DYN_DATA);
    4947
     48
    5049implementation
    51 
    5250
    5351{ TRegistryContext }
     
    132130function TRegistryEx.OpenKey(const Key: string; CanCreate: Boolean): Boolean;
    133131begin
    134   {$IFDEF Linux}
     132  {$IFDEF UNIX}
    135133  //CloseKey;
    136134  {$ENDIF}
     
    140138function TRegistryEx.GetCurrentContext: TRegistryContext;
    141139begin
    142   Result.Key := CurrentPath;
     140  Result.Key := String(CurrentPath);
    143141  Result.RootKey := RootKey;
    144142end;
  • trunk/Packages/Common/UResetableThread.pas

    r38 r54  
    11unit UResetableThread;
    2 
    3 {$mode Delphi}{$H+}
    42
    53interface
     
    167165  FreeAndNil(FStopEvent);
    168166  FreeAndNil(FLock);
    169   inherited Destroy;
     167  inherited;
    170168end;
    171169
     
    286284constructor TThreadPool.Create;
    287285begin
    288   inherited Create;
     286  inherited;
    289287end;
    290288
     
    293291  TotalCount := 0;
    294292  WaitForEmpty;
    295   inherited Destroy;
     293  inherited;
    296294end;
    297295
  • trunk/Packages/Common/UScaleDPI.pas

    r51 r54  
    33{ See: http://wiki.lazarus.freepascal.org/High_DPI }
    44
    5 {$mode delphi}{$H+}
    6 
    75interface
    86
    97uses
    10   Classes, Forms, Graphics, Controls, ComCtrls, LCLType, SysUtils, StdCtrls,
    11   Contnrs;
     8  Classes, Forms, Graphics, Controls, ComCtrls, LCLType, SysUtils,
     9  Generics.Collections;
    1210
    1311type
     12  TControlDimensions = class;
    1413
    1514  { TControlDimension }
     
    1817    BoundsRect: TRect;
    1918    FontHeight: Integer;
    20     Controls: TObjectList; // TList<TControlDimension>
     19    Controls: TControlDimensions;
    2120    // Class specifics
    2221    ButtonSize: TPoint; // TToolBar
     
    2625    constructor Create;
    2726    destructor Destroy; override;
     27  end;
     28
     29  TControlDimensions = class(TObjectList<TControlDimension>)
    2830  end;
    2931
     
    7375constructor TControlDimension.Create;
    7476begin
    75   Controls := TObjectList.Create;
     77  Controls := TControlDimensions.Create;
    7678end;
    7779
     
    7981begin
    8082  FreeAndNil(Controls);
    81   inherited Destroy;
     83  inherited;
    8284end;
    8385
     
    212214  TempBmp: TBitmap;
    213215  Temp: array of TBitmap;
    214   NewWidth, NewHeight: integer;
     216  NewWidth: Integer;
     217  NewHeight: Integer;
    215218  I: Integer;
    216219begin
    217220  ImgList.BeginUpdate;
    218   NewWidth := ScaleX(ImgList.Width, FromDPI.X);
    219   NewHeight := ScaleY(ImgList.Height, FromDPI.Y);
    220 
    221   SetLength(Temp, ImgList.Count);
    222   for I := 0 to ImgList.Count - 1 do
    223   begin
    224     TempBmp := TBitmap.Create;
    225     TempBmp.PixelFormat := pf32bit;
    226     ImgList.GetBitmap(I, TempBmp);
    227     Temp[I] := TBitmap.Create;
    228     Temp[I].SetSize(NewWidth, NewHeight);
    229     {$IFDEF Linux}
    230     Temp[I].PixelFormat := pf24bit;
    231     {$ELSE}
    232     Temp[I].PixelFormat := pf32bit;
    233     {$ENDIF}
    234     Temp[I].TransparentColor := TempBmp.TransparentColor;
    235     //Temp[I].TransparentMode := TempBmp.TransparentMode;
    236     Temp[I].Transparent := True;
    237     Temp[I].Canvas.Brush.Style := bsSolid;
    238     Temp[I].Canvas.Brush.Color := Temp[I].TransparentColor;
    239     Temp[I].Canvas.FillRect(0, 0, Temp[I].Width, Temp[I].Height);
    240 
    241     if (Temp[I].Width = 0) or (Temp[I].Height = 0) then Continue;
    242     Temp[I].Canvas.StretchDraw(Rect(0, 0, Temp[I].Width, Temp[I].Height), TempBmp);
    243     TempBmp.Free;
    244   end;
    245 
    246   ImgList.Clear;
    247   ImgList.Width := NewWidth;
    248   ImgList.Height := NewHeight;
    249 
    250   for I := 0 to High(Temp) do
    251   begin
    252     ImgList.Add(Temp[I], nil);
    253     Temp[i].Free;
    254   end;
    255   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;
    256266end;
    257267
     
    331341  with TCoolBar(Control) do begin
    332342    BeginUpdate;
    333     for I := 0 to Bands.Count - 1 do
    334       with Bands[I] do begin
    335         MinWidth := ScaleX(MinWidth, FromDPI.X);
    336         MinHeight := ScaleY(MinHeight, FromDPI.Y);
    337         // Workaround to bad band width auto sizing
    338         //Width := ScaleX(Width, FromDPI.X);
    339         Width := ScaleX(Control.Width + 28, FromDPI.X);
    340         //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;
    341358      end;
    342     // Workaround for bad autosizing of coolbar
    343     if AutoSize then begin
    344       AutoSize := False;
    345       Height := ScaleY(Height, FromDPI.Y);
    346       AutoSize := True;
    347     end;
    348     EndUpdate;
     359    finally
     360      EndUpdate;
     361    end;
    349362  end;
    350363
  • trunk/Packages/Common/UStringTable.pas

    r38 r54  
    11unit UStringTable;
    2 
    3 {$mode objfpc}{$H+}
    42
    53interface
  • trunk/Packages/Common/USyncCounter.pas

    r34 r54  
    11unit USyncCounter;
    2 
    3 {$mode delphi}
    42
    53interface
     
    2523    procedure Assign(Source: TSyncCounter);
    2624  end;
     25
    2726
    2827implementation
     
    6968begin
    7069  Lock.Free;
    71   inherited Destroy;
     70  inherited;
    7271end;
    7372
  • trunk/Packages/Common/UTheme.pas

    r51 r54  
    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

    r51 r54  
    11unit UThreading;
    22
    3 {$mode delphi}
    4 
    53interface
    64
    75uses
    8   Classes, SysUtils, Forms, fgl, SyncObjs;
     6  Classes, SysUtils, Forms, Generics.Collections, SyncObjs;
    97
    108type
    119  TExceptionEvent = procedure (Sender: TObject; E: Exception) of object;
    1210  TMethodCall = procedure of object;
    13 
    1411
    1512  { TVirtualThread }
     
    10299  { TThreadList }
    103100
    104   TThreadList = class(TFPGObjectList<TVirtualThread>)
     101  TThreadList = class(TObjectList<TVirtualThread>)
    105102    function FindById(Id: TThreadID): TVirtualThread;
    106103    constructor Create; virtual;
     
    295292  end;
    296293  FThread.Free;
    297   inherited Destroy;
     294  inherited;
    298295end;
    299296
     
    361358ThreadListLock := TCriticalSection.Create;
    362359ThreadList := TThreadList.Create;
    363 ThreadList.FreeObjects := False;
     360ThreadList.OwnsObjects := False;
    364361
    365362finalization
  • trunk/Packages/Common/UTranslator.pas

    r53 r54  
    11unit UTranslator;
    22
    3 {$mode delphi}{$H+}
    4 
    53interface
    64
    75uses
    8   Classes, SysUtils, Forms, ExtCtrls, Controls, fgl, LazFileUtils, LazUTF8,
     6  Classes, SysUtils, Forms, ExtCtrls, Controls, LazFileUtils, LazUTF8,
    97  Translations, TypInfo, Dialogs, FileUtil, LCLProc, ULanguages, LCLType,
    10   LCLVersion;
     8  LCLVersion, Generics.Collections;
    119
    1210type
    1311  THandleStringEvent = function (AValue: string): string of object;
    1412
    15   TPoFiles = class(TFPGObjectList<TPOFile>)
     13  TPoFiles = class(TObjectList<TPOFile>)
    1614  end;
    1715
     
    2725  { TComponentExcludesList }
    2826
    29   TComponentExcludesList = class(TFPGObjectList<TComponentExcludes>)
     27  TComponentExcludesList = class(TObjectList<TComponentExcludes>)
    3028    function FindByClassType(AClassType: TClass): TComponentExcludes;
    3129    procedure DumpToStrings(Strings: TStrings);
     
    290288  Item := Component.ClassType;
    291289  while Assigned(Item) do begin
    292     //ShowMessage(Component.Name + ', ' + Component.ClassName + ', ' + Item.ClassName + ', ' + PropertyName);
    293290    Excludes := ComponentExcludes.FindByClassType(Item.ClassType);
    294291    if Assigned(Excludes) then begin
  • trunk/Packages/Common/UURI.pas

    r38 r54  
    22
    33// Date: 2011-04-04
    4 
    5 {$mode delphi}
    64
    75interface
     
    8583  end;
    8684
     85
    8786implementation
    8887
     
    183182begin
    184183  Items.Free;
    185   inherited Destroy;
     184  inherited;
    186185end;
    187186
     
    232231begin
    233232  Path.Free;
    234   inherited Destroy;
     233  inherited;
    235234end;
    236235
     
    243242    Fragment := TURI(Source).Fragment;
    244243    Query := TURI(Source).Query;
    245   end else inherited Assign(Source);
     244  end else inherited;
    246245end;
    247246
     
    291290destructor TURL.Destroy;
    292291begin
    293   inherited Destroy;
     292  inherited;
    294293end;
    295294
     
    344343begin
    345344  Directory.Free;
    346   inherited Destroy;
    347 end;
    348 
     345  inherited;
     346end;
    349347
    350348end.
  • trunk/Packages/Common/UXMLUtils.pas

    r38 r54  
    11unit UXMLUtils;
    2 
    3 {$mode delphi}
    42
    53interface
  • trunk/Packages/CoolAudio/UCoolAudioConfig.inc

    r51 r54  
    11{$IFDEF Linux}
    2   {$DEFINE AudioSystemDSP}
     2//  {$DEFINE AudioSystemDSP}
    33//  {$DEFINE AudioSystemMAD}
    44{$ENDIF}
  • trunk/Read me.txt

    r51 r54  
    1 Developed using Lazarus 2.0.12 (http://www.lazarus-ide.org/)
     1Developed using Lazarus 2.2.4 (http://www.lazarus-ide.org/)
  • trunk/UCore.lfm

    r51 r54  
    11object Core: TCore
    22  OldCreateOrder = False
    3   Height = 779
    4   HorizontalOffset = 1103
    5   VerticalOffset = 603
    6   Width = 1044
    7   PPI = 144
     3  Height = 676
     4  HorizontalOffset = 564
     5  VerticalOffset = 226
     6  Width = 906
     7  PPI = 125
    88  object ThemeManager1: TThemeManager
    9     Left = 258
    10     Top = 266
     9    Left = 224
     10    Top = 231
    1111  end
    1212  object ApplicationInfo: TApplicationInfo
     
    541541      0000000000000000000000000000000000000000000000000000
    542542    }
    543     Left = 264
    544     Top = 432
     543    Left = 229
     544    Top = 375
    545545  end
    546546  object Translator1: TTranslator
    547547    POFilesFolder = 'Languages'
    548     Left = 660
    549     Top = 266
     548    Left = 573
     549    Top = 231
    550550  end
    551551end
  • trunk/UCore.pas

    r51 r54  
    66
    77uses
    8   Classes, SysUtils, UTheme, UApplicationInfo, UTranslator;
     8  Classes, SysUtils, UTheme, UApplicationInfo, UTranslator, UAboutDialog;
    99
    1010type
  • trunk/tunneler.lpi

    r53 r54  
    22<CONFIG>
    33  <ProjectOptions>
    4     <Version Value="11"/>
     4    <Version Value="12"/>
    55    <General>
     6      <Flags>
     7        <CompatibilityMode Value="True"/>
     8      </Flags>
    69      <SessionStorage Value="InProjectDir"/>
    7       <MainUnit Value="0"/>
    810      <Scaled Value="True"/>
    911      <ResourceType Value="res"/>
Note: See TracChangeset for help on using the changeset viewer.