Changeset 19 for trunk


Ignore:
Timestamp:
Mar 30, 2018, 12:13:24 PM (7 years ago)
Author:
chronos
Message:
  • Fixed: FormContacts was not translated if created in runtime.
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormContacts.lfm

    r17 r19  
    77  ClientHeight = 605
    88  ClientWidth = 807
    9   DesignTimePPI = 120
    109  OnClose = FormClose
    1110  OnCreate = FormCreate
    1211  OnShow = FormShow
    13   LCLVersion = '1.8.0.6'
     12  LCLVersion = '1.8.0.4'
    1413  object ListView1: TListView
    1514    Left = 0
     
    4140      item
    4241        Caption = 'Home phone'
    43         Width = 100
     42        Width = 187
    4443      end>
    4544    MultiSelect = True
     
    6867    end
    6968    object ToolButton2: TToolButton
    70       Left = 24
     69      Left = 30
    7170      Top = 2
    7271      Action = AModify
    7372    end
    7473    object ToolButton3: TToolButton
    75       Left = 47
     74      Left = 59
    7675      Top = 2
    7776      Action = ARemove
  • trunk/Forms/UFormContacts.pas

    r17 r19  
    104104  Core.PersistentForm1.Load(Self);
    105105  Core.ThemeManager1.UseTheme(Self);
     106  Core.CoolTranslator1.TranslateComponentRecursive(Self);
    106107  ReloadList;
    107108  UpdateInterface;
  • trunk/Forms/UFormMain.lfm

    r17 r19  
    55  Width = 785
    66  Caption = 'vCard Studio'
    7   ClientHeight = 506
     7  ClientHeight = 497
    88  ClientWidth = 785
    9   DesignTimePPI = 120
    109  Menu = MainMenu1
    1110  OnClose = FormClose
    1211  OnCloseQuery = FormCloseQuery
    1312  OnCreate = FormCreate
     13  OnDestroy = FormDestroy
    1414  OnShow = FormShow
    15   LCLVersion = '1.8.0.6'
     15  LCLVersion = '1.8.0.4'
    1616  object CoolBar1: TCoolBar
    1717    Left = 0
     
    105105  object StatusBar1: TStatusBar
    106106    Left = 0
    107     Height = 28
    108     Top = 478
     107    Height = 30
     108    Top = 467
    109109    Width = 785
    110110    Panels = <   
  • trunk/Forms/UFormMain.pas

    r17 r19  
    4949    procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
    5050    procedure FormCreate(Sender: TObject);
     51    procedure FormDestroy(Sender: TObject);
    5152    procedure FormShow(Sender: TObject);
    5253    procedure MenuItemToolbarClick(Sender: TObject);
     
    7778procedure TFormMain.FormClose(Sender: TObject; var CloseAction: TCloseAction);
    7879begin
     80  FormContacts.Close;
    7981  Core.PersistentForm1.Save(Self);
    8082end;
     
    9092end;
    9193
     94procedure TFormMain.FormDestroy(Sender: TObject);
     95begin
     96  FormContacts.Free;
     97end;
     98
    9299procedure TFormMain.FormShow(Sender: TObject);
    93100begin
     
    96103  Core.ThemeManager1.UseTheme(Self);
    97104  Core.PersistentForm1.Load(Self);
     105
     106  FormContacts := TFormContacts.Create(nil);
     107  FormContacts.Contacts := TContactsFile(Core.DataFile).Contacts;
    98108  FormContacts.ManualDock(Self, nil, alClient);
    99109  FormContacts.Align := alClient;
  • trunk/UCore.pas

    r18 r19  
    383383  UpdateInterface;
    384384  FormMain.UpdateInterface;
    385   if Assigned(DataFile) then
    386     FormContacts.Contacts := TContactsFile(DataFile).Contacts
    387     else FormContacts.Contacts := nil;
    388   FormContacts.ReloadList;
     385  if Assigned(FormContacts) then begin
     386    if Assigned(DataFile) then
     387      FormContacts.Contacts := TContactsFile(DataFile).Contacts
     388      else FormContacts.Contacts := nil;
     389    FormContacts.ReloadList;
     390  end;
    389391end;
    390392
  • trunk/vCardStudio.lpr

    r17 r19  
    3030  Application.CreateForm(TFormMain, FormMain);
    3131  Application.CreateForm(TCore, Core);
    32   Application.CreateForm(TFormContacts, FormContacts);
    3332  Application.Run;
    3433end.
Note: See TracChangeset for help on using the changeset viewer.