Changeset 115 for trunk/UCore.pas


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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r110 r115  
    77uses
    88  Classes, SysUtils, FileUtil, UApplicationInfo, ULastOpenedList, UProject,
    9   UCoolTranslator, UTarget, URegistry, Registry, Graphics, Controls, UScaleDPI,
    10   UPersistentForm, UTheme, UBFTarget;
     9  UTranslator, UTarget, URegistry, Registry, Graphics, Controls, UScaleDPI,
     10  UPersistentForm, UTheme, UAboutDialog, UBFTarget;
    1111
    1212type
     
    1515
    1616  TCore = class(TDataModule)
     17    AboutDialog: TAboutDialog;
    1718    ApplicationInfo: TApplicationInfo;
    18     CoolTranslator1: TCoolTranslator;
     19    Translator: TTranslator;
    1920    ImageListMain: TImageList;
    2021    LastOpenedList: TLastOpenedList;
     
    8283  // If installed in Linux system then use installation directory for po files
    8384  if Application.ExeName = '/usr/bin/' + ExtractFileNameOnly(Application.ExeName) then
    84     CoolTranslator1.POFilesFolder := '/usr/share/' + ExtractFileNameOnly(Application.ExeName) + '/languages';
     85    Translator.POFilesFolder := '/usr/share/' + ExtractFileNameOnly(Application.ExeName) + '/languages';
    8586  {$ENDIF}
    8687
     
    103104    OpenProjectOnStart := ReadBoolWithDefault('OpenProjectOnStart', True);
    104105    if ValueExists('LanguageCode') then
    105       CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', ''))
    106       else CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode('');
     106      Translator.Language := Translator.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', ''))
     107      else Translator.Language := Translator.Languages.SearchByCode('');
    107108    ScaleDPI1.DPI := Point(ReadIntegerWithDefault('DPIX', 96),
    108109      ReadIntegerWithDefault('DPIY', 96));
     
    134135    WriteInteger('MemorySize', MemorySize);
    135136    WriteInteger('CellSize', CellSize);
    136     if Assigned(CoolTranslator1.Language) and (CoolTranslator1.Language.Code <> '') then
    137       WriteString('LanguageCode', CoolTranslator1.Language.Code)
     137    if Assigned(Translator.Language) and (Translator.Language.Code <> '') then
     138      WriteString('LanguageCode', Translator.Language.Code)
    138139      else DeleteValue('LanguageCode');
    139140    WriteString('Theme', ThemeManager.Theme.Name);
     
    191192begin
    192193  ScaleDPI;
    193   CoolTranslator1.Translate;
     194  Translator.Translate;
    194195end;
    195196
Note: See TracChangeset for help on using the changeset viewer.