Changeset 151 for trunk/Forms


Ignore:
Timestamp:
Oct 16, 2017, 2:31:46 PM (7 years ago)
Author:
chronos
Message:
  • Added: Option to disable auto reopen last file on start.
Location:
trunk/Forms
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.lfm

    r149 r151  
    1414  OnHide = FormHide
    1515  OnShow = FormShow
    16   LCLVersion = '1.6.2.0'
     16  LCLVersion = '1.6.4.0'
    1717  object PanelMain: TPanel
    1818    Left = 0
  • trunk/Forms/UFormMain.pas

    r150 r151  
    689689    RootKey := HKEY_CURRENT_USER;
    690690    OpenKey(DefaultRegKey, True);
    691     if ValueExists('LanguageCode') then
    692       Core.CoolTranslator1.Language := Core.CoolTranslator1.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', ''))
    693       else Core.CoolTranslator1.Language := Core.CoolTranslator1.Languages.SearchByCode('');
    694     Core.AlwaysOnTop := ReadBoolWithDefault('AlwaysOnTop', False);
    695     Core.StartMinimizedToTray := ReadBoolWithDefault('StartMinimizedToTray', False);
    696691    AFilterSameLength.Checked := ReadBoolWithDefault('SameLength', False);
    697692    AFilterSameLetterCase.Checked := ReadBoolWithDefault('SameLetterCase', False);
     
    722717    RootKey := HKEY_CURRENT_USER;
    723718    OpenKey(DefaultRegKey, True);
    724     if Assigned(Core.CoolTranslator1.Language) and (Core.CoolTranslator1.Language.Code <> '') then
    725       WriteString('LanguageCode', Core.CoolTranslator1.Language.Code)
    726       else DeleteValue('LanguageCode');
    727     WriteBool('AlwaysOnTop', Core.AlwaysOnTop);
    728     WriteBool('StartMinimizedToTray', Core.StartMinimizedToTray);
    729719    WriteBool('SameLength', AFilterSameLength.Checked);
    730720    WriteBool('SameLetterCase', AFilterSameLetterCase.Checked);
  • trunk/Forms/UFormSettings.lfm

    r105 r151  
    1010  OnShow = FormShow
    1111  Position = poScreenCenter
    12   LCLVersion = '1.6.0.4'
     12  LCLVersion = '1.6.4.0'
    1313  object ComboBoxLanguage: TComboBox
    1414    Left = 184
     
    104104    Visible = False
    105105  end
     106  object CheckBoxReopenLastFileOnStart: TCheckBox
     107    Left = 360
     108    Height = 24
     109    Top = 64
     110    Width = 181
     111    Caption = 'Reopen last file on start'
     112    TabOrder = 8
     113  end
    106114end
  • trunk/Forms/UFormSettings.lrt

    r105 r151  
    88TFORMSETTINGS.CHECKBOXAUTOMATICDPI.CAPTION=Automatic DPI
    99TFORMSETTINGS.LABEL2.CAPTION=DPI:
     10TFORMSETTINGS.CHECKBOXREOPENLASTFILEONSTART.CAPTION=Reopen last file on start
  • trunk/Forms/UFormSettings.pas

    r105 r151  
    1616    ButtonOk: TButton;
    1717    ButtonCancel: TButton;
     18    CheckBoxReopenLastFileOnStart: TCheckBox;
    1819    CheckBoxAutomaticDPI: TCheckBox;
    1920    CheckBoxStartMinimizedToTray: TCheckBox;
     
    8485  CheckBoxAutomaticDPI.Checked := Core.ScaleDPI1.AutoDetect;
    8586  SpinEditDPI.Value := Core.ScaleDPI1.DPI.X;
     87  CheckBoxReopenLastFileOnStart.Checked := Core.ReopenLastFileOnStart;
    8688  UpdateInterface;
    8789end;
     
    9496  Core.ScaleDPI1.AutoDetect := CheckBoxAutomaticDPI.Checked;
    9597  Core.ScaleDPI1.DPI := Point(SpinEditDPI.Value, SpinEditDPI.Value);
     98  Core.ReopenLastFileOnStart := CheckBoxReopenLastFileOnStart.Checked;
    9699end;
    97100
Note: See TracChangeset for help on using the changeset viewer.