Changeset 23


Ignore:
Timestamp:
Aug 19, 2021, 11:47:56 AM (3 years ago)
Author:
chronos
Message:
  • Added: Snap package definition file.
  • Fixed: Selected theme in settings also changed language.
  • Modified: Load correctly language files if installed on Linux.
Location:
trunk
Files:
7 added
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormContact.lfm

    r21 r23  
    1111  OnCreate = FormCreate
    1212  OnShow = FormShow
    13   LCLVersion = '2.0.0.4'
     13  LCLVersion = '2.0.12.0'
    1414  object PageControlContact: TPageControl
    1515    Left = 10
     
    483483  object ActionList1: TActionList
    484484    Images = Core.ImageList1
    485     left = 380
    486     top = 188
     485    Left = 380
     486    Top = 188
    487487    object AEditField: TAction
    488488      Caption = 'Edit'
     
    492492  object PopupMenu1: TPopupMenu
    493493    Images = Core.ImageList1
    494     left = 206
    495     top = 191
     494    Left = 206
     495    Top = 191
    496496    object MenuItem1: TMenuItem
    497497      Action = AEditField
  • trunk/Forms/UFormContact.pas

    r15 r23  
    145145procedure TFormContact.FormCreate(Sender: TObject);
    146146begin
    147   Core.CoolTranslator1.TranslateComponentRecursive(Self);
     147  Core.Translator.TranslateComponentRecursive(Self);
    148148  Core.ThemeManager1.UseTheme(Self);
    149149  Contact := nil;
  • trunk/Forms/UFormContacts.lfm

    r21 r23  
    1111  OnCreate = FormCreate
    1212  OnShow = FormShow
    13   LCLVersion = '2.0.0.4'
     13  LCLVersion = '2.0.12.0'
    1414  object ListView1: TListView
    1515    Left = 0
     
    8282  object PopupMenuContact: TPopupMenu
    8383    Images = Core.ImageList1
    84     left = 435
    85     top = 263
     84    Left = 435
     85    Top = 263
    8686    object MenuItem1: TMenuItem
    8787      Action = AAdd
     
    9999  object ActionList1: TActionList
    100100    Images = Core.ImageList1
    101     left = 732
    102     top = 257
     101    Left = 732
     102    Top = 257
    103103    object AAdd: TAction
    104104      Caption = 'Add'
  • trunk/Forms/UFormContacts.pas

    r19 r23  
    104104  Core.PersistentForm1.Load(Self);
    105105  Core.ThemeManager1.UseTheme(Self);
    106   Core.CoolTranslator1.TranslateComponentRecursive(Self);
     106  Core.Translator.TranslateComponentRecursive(Self);
    107107  ReloadList;
    108108  UpdateInterface;
  • trunk/Forms/UFormFindDuplicity.lfm

    r21 r23  
    1212  OnDestroy = FormDestroy
    1313  OnShow = FormShow
    14   LCLVersion = '2.0.0.4'
     14  LCLVersion = '2.0.12.0'
    1515  object ListView1: TListView
    1616    Left = 5
     
    5656    object ComboBoxField: TComboBox
    5757      Left = 173
    58       Height = 42
     58      Height = 41
    5959      Top = 14
    6060      Width = 326
     
    6767    object Label1: TLabel
    6868      Left = 13
    69       Height = 26
     69      Height = 24
    7070      Top = 19
    71       Width = 113
     71      Width = 111
    7272      Caption = 'Contact field:'
    7373      ParentColor = False
     
    7676  end
    7777  object ActionList1: TActionList
    78     left = 262
    79     top = 154
     78    Left = 262
     79    Top = 154
    8080    object AShowContacts: TAction
    8181      Caption = 'Show contacts'
     
    8484  end
    8585  object PopupMenu1: TPopupMenu
    86     left = 90
    87     top = 149
     86    Left = 90
     87    Top = 149
    8888    object MenuItem1: TMenuItem
    8989      Action = AShowContacts
  • trunk/Forms/UFormFindDuplicity.pas

    r18 r23  
    151151begin
    152152  FoundItems := TFoundItems.Create;
    153   Core.CoolTranslator1.TranslateComponentRecursive(Self);
     153  Core.Translator.TranslateComponentRecursive(Self);
    154154  Core.ThemeManager1.UseTheme(Self);
    155155  ContactField := cfTelCell;
  • trunk/Forms/UFormGenerate.lfm

    r21 r23  
    1111  OnCreate = FormCreate
    1212  OnShow = FormShow
    13   LCLVersion = '2.0.0.4'
     13  LCLVersion = '2.0.12.0'
    1414  object Label1: TLabel
    1515    Left = 19
    16     Height = 26
     16    Height = 24
    1717    Top = 19
    18     Width = 56
     18    Width = 55
    1919    Caption = 'Count:'
    2020    ParentColor = False
     
    2323  object SpinEditCount: TSpinEdit
    2424    Left = 155
    25     Height = 43
     25    Height = 42
    2626    Top = 18
    2727    Width = 152
  • trunk/Forms/UFormGenerate.pas

    r18 r23  
    6464procedure TFormGenerate.FormCreate(Sender: TObject);
    6565begin
    66   Core.CoolTranslator1.TranslateComponentRecursive(Self);
     66  Core.Translator.TranslateComponentRecursive(Self);
    6767  Core.ThemeManager1.UseTheme(Self);
    6868end;
  • trunk/Forms/UFormSettings.lfm

    r21 r23  
    1414  OnShow = FormShow
    1515  Position = poScreenCenter
    16   LCLVersion = '2.0.0.4'
     16  LCLVersion = '2.0.12.0'
    1717  object ComboBoxLanguage: TComboBox
    1818    Left = 192
    19     Height = 42
     19    Height = 41
    2020    Top = 36
    2121    Width = 312
     
    2727  object Label1: TLabel
    2828    Left = 24
    29     Height = 26
     29    Height = 24
    3030    Top = 36
    3131    Width = 88
     
    6161    Height = 30
    6262    Top = 125
    63     Width = 150
     63    Width = 148
    6464    Caption = 'Automatic DPI'
    6565    OnChange = CheckBoxAutomaticDPIChange
     
    7070  object SpinEditDPI: TSpinEdit
    7171    Left = 192
    72     Height = 43
     72    Height = 42
    7373    Top = 173
    7474    Width = 145
     
    8282  object LabelDPI: TLabel
    8383    Left = 96
    84     Height = 26
     84    Height = 24
    8585    Top = 182
    8686    Width = 35
     
    9494    Height = 30
    9595    Top = 86
    96     Width = 229
     96    Width = 226
    9797    Caption = 'Reopen last file on start'
    9898    ParentFont = False
     
    108108  object Label2: TLabel
    109109    Left = 24
    110     Height = 26
     110    Height = 24
    111111    Top = 221
    112112    Width = 63
     
    117117  object ComboBoxTheme: TComboBox
    118118    Left = 192
    119     Height = 42
     119    Height = 41
    120120    Top = 221
    121121    Width = 312
  • trunk/Forms/UFormSettings.pas

    r16 r23  
    5656  Core.PersistentForm1.Load(Self);
    5757
    58   Core.CoolTranslator1.LanguageListToStrings(ComboBoxLanguage.Items);
    59   ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.CoolTranslator1.Language);
     58  Core.Translator.LanguageListToStrings(ComboBoxLanguage.Items);
     59  ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.Translator.Language);
    6060  if ComboBoxLanguage.ItemIndex = -1 then ComboBoxLanguage.ItemIndex := 0;
    6161
     
    6868begin
    6969  if ComboBoxLanguage.ItemIndex <> -1 then
    70     Core.CoolTranslator1.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxTheme.ItemIndex]);
     70    Core.Translator.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]);
    7171  if ComboBoxTheme.ItemIndex <> -1 then
    7272    Core.ThemeManager1.Theme := TTheme(ComboBoxTheme.Items.Objects[ComboBoxTheme.ItemIndex]);
     
    9191procedure TFormSettings.FormCreate(Sender: TObject);
    9292begin
    93   Core.CoolTranslator1.TranslateComponentRecursive(Self);
     93  Core.Translator.TranslateComponentRecursive(Self);
    9494  Core.ThemeManager1.UseTheme(Self);
    9595end;
  • trunk/UCore.lfm

    r22 r23  
    87108710    Top = 125
    87118711  end
    8712   object CoolTranslator1: TTranslator
     8712  object Translator: TTranslator
    87138713    POFilesFolder = 'Languages'
    87148714    Left = 115
     
    87258725  end
    87268726  object AboutDialog1: TAboutDialog
    8727     CoolTranslator = CoolTranslator1
     8727    CoolTranslator = Translator
    87288728    ThemeManager = ThemeManager1
    87298729    ApplicationInfo = ApplicationInfo1
  • trunk/UCore.pas

    r22 r23  
    4141    ActionList1: TActionList;
    4242    ApplicationInfo1: TApplicationInfo;
    43     CoolTranslator1: TTranslator;
     43    Translator: TTranslator;
    4444    ImageList1: TImageList;
    4545    LastOpenedList1: TLastOpenedList;
     
    273273
    274274procedure TCore.DataModuleCreate(Sender: TObject);
    275 begin
     275const
     276  LinuxLanguagesDir = '/usr/share/vCardStudio/Languages';
     277begin
     278  {$IFDEF Linux}
     279  // If installed in Linux system then use installation directory for po files
     280  if not DirectoryExists(Translator.POFilesFolder) and DirectoryExists(LinuxLanguagesDir) then
     281    Translator.POFilesFolder := LinuxLanguagesDir;
     282  {$ENDIF}
     283
    276284  DataFile := nil;
    277285  DefaultDataFileClass := TContactsFile;
     
    396404    CurrentContext := ApplicationInfo1.GetRegistryContext;
    397405    if ValueExists('LanguageCode') then
    398       CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', ''))
    399       else CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode('');
     406      Translator.Language := Translator.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', ''))
     407      else Translator.Language := Translator.Languages.SearchByCode('');
    400408    if ValueExists('Theme') then
    401409      ThemeManager1.Theme := ThemeManager1.Themes.FindByName(ReadStringWithDefault('Theme', 'System'))
     
    416424  try
    417425    CurrentContext := ApplicationInfo1.GetRegistryContext;
    418     if Assigned(CoolTranslator1.Language) and (CoolTranslator1.Language.Code <> '') then
    419       WriteString('LanguageCode', CoolTranslator1.Language.Code)
     426    if Assigned(Translator.Language) and (Translator.Language.Code <> '') then
     427      WriteString('LanguageCode', Translator.Language.Code)
    420428      else DeleteValue('LanguageCode');
    421429    if Assigned(ThemeManager1.Theme) and (ThemeManager1.Theme.Name <> '') then
  • trunk/vCardStudio.lpr

    r22 r23  
    44
    55uses
    6   {$IFDEF UNIX}{$IFDEF UseCThreads}
    7   cthreads,
    8   {$ENDIF}{$ENDIF}
     6  {$IFDEF UNIX}
     7  cthreads, clocale,
     8  {$ENDIF}
    99  Interfaces, // this includes the LCL widgetset
    1010  Forms, UFormMain, UCore, Common, UDataFile,
Note: See TracChangeset for help on using the changeset viewer.