Changeset 115 for trunk/Packages


Ignore:
Timestamp:
Oct 13, 2020, 8:05:14 PM (4 years ago)
Author:
chronos
Message:
  • Fixed: Build with Lazarus 2.0.10.
  • Modified: CoolTranslator package replaced by Translator in Common package.
  • Modified: About dialog moved to Common package.
Location:
trunk/Packages
Files:
6 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/Common.lpk

    r102 r115  
    4040    <License Value="GNU/GPL"/>
    4141    <Version Minor="7"/>
    42     <Files Count="22">
     42    <Files Count="26">
    4343      <Item1>
    4444        <Filename Value="StopWatch.pas"/>
     
    139139        <UnitName Value="UStringTable"/>
    140140      </Item22>
     141      <Item23>
     142        <Filename Value="UTranslator.pas"/>
     143        <HasRegisterProc Value="True"/>
     144        <UnitName Value="UTranslator"/>
     145      </Item23>
     146      <Item24>
     147        <Filename Value="ULanguages.pas"/>
     148        <UnitName Value="ULanguages"/>
     149      </Item24>
     150      <Item25>
     151        <Filename Value="UFormAbout.pas"/>
     152        <UnitName Value="UFormAbout"/>
     153      </Item25>
     154      <Item26>
     155        <Filename Value="UAboutDialog.pas"/>
     156        <HasRegisterProc Value="True"/>
     157        <UnitName Value="UAboutDialog"/>
     158      </Item26>
    141159    </Files>
    142160    <i18n>
  • trunk/Packages/Common/Common.pas

    r102 r115  
    1212  UMemory, UResetableThread, UPool, ULastOpenedList, URegistry,
    1313  UJobProgressView, UXMLUtils, UApplicationInfo, USyncCounter, UListViewSort,
    14   UPersistentForm, UFindFile, UScaleDPI, UTheme, UStringTable,
    15   LazarusPackageIntf;
     14  UPersistentForm, UFindFile, UScaleDPI, UTheme, UStringTable, UAboutDialog,
     15  UTranslator, ULanguages, UFormAbout, LazarusPackageIntf;
    1616
    1717implementation
     
    2929  RegisterUnit('UScaleDPI', @UScaleDPI.Register);
    3030  RegisterUnit('UTheme', @UTheme.Register);
     31  RegisterUnit('UAboutDialog', @UAboutDialog.Register);
     32  RegisterUnit('UTranslator', @UTranslator.Register);
    3133end;
    3234
  • trunk/Packages/Common/UApplicationInfo.pas

    r93 r115  
    66
    77uses
    8   SysUtils, Classes, Forms, URegistry, Controls;
     8  SysUtils, Classes, Forms, URegistry, Controls, Graphics;
    99
    1010type
     
    1515  private
    1616    FDescription: TCaption;
     17    FIcon: TBitmap;
    1718    FIdentification: Byte;
    1819    FLicense: string;
     
    3334  public
    3435    constructor Create(AOwner: TComponent); override;
     36    destructor Destroy; override;
    3537    property Version: string read GetVersion;
    3638    function GetRegistryContext: TRegistryContext;
     
    5254    property RegistryRoot: TRegistryRoot read FRegistryRoot write FRegistryRoot;
    5355    property License: string read FLicense write FLicense;
     56    property Icon: TBitmap read FIcon write FIcon;
    5457  end;
    5558
     
    8083  FRegistryKey := '\Software\' + FAppName;
    8184  FRegistryRoot := rrKeyCurrentUser;
     85  FIcon := TBitmap.Create;
     86end;
     87
     88destructor TApplicationInfo.Destroy;
     89begin
     90  FreeAndNil(FIcon);
     91  inherited Destroy;
    8292end;
    8393
  • trunk/Packages/Common/URegistry.pas

    r102 r115  
    11unit URegistry;
    22
    3 {$MODE Delphi}
     3{$MODE delphi}
    44
    55interface
     
    1717    RootKey: HKEY;
    1818    Key: string;
     19    class function Create(RootKey: TRegistryRoot; Key: string): TRegistryContext; static; overload;
     20    class function Create(RootKey: HKEY; Key: string): TRegistryContext; static; overload;
    1921    class operator Equal(A, B: TRegistryContext): Boolean;
    20     function Create(RootKey: TRegistryRoot; Key: string): TRegistryContext; overload;
    21     function Create(RootKey: HKEY; Key: string): TRegistryContext; overload;
    2222  end;
    2323
     
    5858end;
    5959
    60 function TRegistryContext.Create(RootKey: TRegistryRoot; Key: string): TRegistryContext;
     60class function TRegistryContext.Create(RootKey: TRegistryRoot; Key: string): TRegistryContext;
    6161begin
    6262  Result.RootKey := RegistryRootHKEY[RootKey];
     
    6464end;
    6565
    66 function TRegistryContext.Create(RootKey: HKEY; Key: string): TRegistryContext;
     66class function TRegistryContext.Create(RootKey: HKEY; Key: string): TRegistryContext;
    6767begin
    6868  Result.RootKey := RootKey;
     
    133133begin
    134134  {$IFDEF Linux}
    135   CloseKey;
     135  //CloseKey;
    136136  {$ENDIF}
    137137  Result := inherited OpenKey(Key, CanCreate);
Note: See TracChangeset for help on using the changeset viewer.