Ignore:
Timestamp:
Aug 22, 2016, 9:31:44 AM (8 years ago)
Author:
chronos
Message:
  • Fixed: Dynamically created forms were not translated.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r95 r96  
    3434    ActionList1: TActionList;
    3535    CheckBoxExactMath: TCheckBox;
    36     CoolTranslator1: TCoolTranslator;
    3736    ImageList1: TImageList;
    3837    JobProgressView1: TJobProgressView;
     
    7170    OpenDialog1: TOpenDialog;
    7271    Panel1: TPanel;
    73     PersistentForm1: TPersistentForm;
    7472    PopupMenuOpenRecent: TPopupMenu;
    7573    PopupMenuTryIcon: TPopupMenu;
     
    184182procedure TFormMain.FormHide(Sender: TObject);
    185183begin
    186   if Core.InitializeFinished then PersistentForm1.Save(Self);
     184  if Core.InitializeFinished then Core.PersistentForm1.Save(Self);
    187185end;
    188186
    189187procedure TFormMain.FormClose(Sender: TObject; var CloseAction: TCloseAction);
    190188begin
    191   PersistentForm1.Save(Self);
     189  Core.PersistentForm1.Save(Self);
    192190  Core.SaveConfig;
    193191end;
     
    421419
    422420  if Visible then begin
    423     PersistentForm1.Load(Self);
     421    Core.PersistentForm1.Load(Self);
    424422    UpdateInterface;
    425423    ListViewFilter1.StringGrid.Col := 1;
     
    612610begin
    613611  RegistryContext := RegContext(HKEY_CURRENT_USER, DefaultRegKey);
    614   PersistentForm1.RegistryContext := RegistryContext;
     612  Core.PersistentForm1.RegistryContext := RegistryContext;
    615613  RegistryContext := RegContext(HKEY_CURRENT_USER, DefaultRegKey + '\RecentFiles');
    616614  LastOpenedList1.LoadFromRegistry(RegistryContext);
     
    627625    OpenKey(DefaultRegKey, True);
    628626    if ValueExists('LanguageCode') then
    629       CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', ''))
    630       else CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode('');
     627      Core.CoolTranslator1.Language := Core.CoolTranslator1.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', ''))
     628      else Core.CoolTranslator1.Language := Core.CoolTranslator1.Languages.SearchByCode('');
    631629    Core.AlwaysOnTop := ReadBoolWithDefault('AlwaysOnTop', False);
    632630    Core.StartMinimizedToTray := ReadBoolWithDefault('StartMinimizedToTray', False);
     
    656654    RootKey := HKEY_CURRENT_USER;
    657655    OpenKey(DefaultRegKey, True);
    658     if Assigned(CoolTranslator1.Language) and (CoolTranslator1.Language.Code <> '') then
    659       WriteString('LanguageCode', CoolTranslator1.Language.Code)
     656    if Assigned(Core.CoolTranslator1.Language) and (Core.CoolTranslator1.Language.Code <> '') then
     657      WriteString('LanguageCode', Core.CoolTranslator1.Language.Code)
    660658      else DeleteValue('LanguageCode');
    661659    WriteBool('AlwaysOnTop', Core.AlwaysOnTop);
Note: See TracChangeset for help on using the changeset viewer.