Changeset 151
- Timestamp:
- Oct 16, 2017, 2:31:46 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AcronymDecoder.lpi
r135 r151 2 2 <CONFIG> 3 3 <ProjectOptions> 4 <Version Value=" 9"/>4 <Version Value="10"/> 5 5 <PathDelim Value="\"/> 6 6 <General> -
trunk/Forms/UFormMain.lfm
r149 r151 14 14 OnHide = FormHide 15 15 OnShow = FormShow 16 LCLVersion = '1.6. 2.0'16 LCLVersion = '1.6.4.0' 17 17 object PanelMain: TPanel 18 18 Left = 0 -
trunk/Forms/UFormMain.pas
r150 r151 689 689 RootKey := HKEY_CURRENT_USER; 690 690 OpenKey(DefaultRegKey, True); 691 if ValueExists('LanguageCode') then692 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);696 691 AFilterSameLength.Checked := ReadBoolWithDefault('SameLength', False); 697 692 AFilterSameLetterCase.Checked := ReadBoolWithDefault('SameLetterCase', False); … … 722 717 RootKey := HKEY_CURRENT_USER; 723 718 OpenKey(DefaultRegKey, True); 724 if Assigned(Core.CoolTranslator1.Language) and (Core.CoolTranslator1.Language.Code <> '') then725 WriteString('LanguageCode', Core.CoolTranslator1.Language.Code)726 else DeleteValue('LanguageCode');727 WriteBool('AlwaysOnTop', Core.AlwaysOnTop);728 WriteBool('StartMinimizedToTray', Core.StartMinimizedToTray);729 719 WriteBool('SameLength', AFilterSameLength.Checked); 730 720 WriteBool('SameLetterCase', AFilterSameLetterCase.Checked); -
trunk/Forms/UFormSettings.lfm
r105 r151 10 10 OnShow = FormShow 11 11 Position = poScreenCenter 12 LCLVersion = '1.6. 0.4'12 LCLVersion = '1.6.4.0' 13 13 object ComboBoxLanguage: TComboBox 14 14 Left = 184 … … 104 104 Visible = False 105 105 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 106 114 end -
trunk/Forms/UFormSettings.lrt
r105 r151 8 8 TFORMSETTINGS.CHECKBOXAUTOMATICDPI.CAPTION=Automatic DPI 9 9 TFORMSETTINGS.LABEL2.CAPTION=DPI: 10 TFORMSETTINGS.CHECKBOXREOPENLASTFILEONSTART.CAPTION=Reopen last file on start -
trunk/Forms/UFormSettings.pas
r105 r151 16 16 ButtonOk: TButton; 17 17 ButtonCancel: TButton; 18 CheckBoxReopenLastFileOnStart: TCheckBox; 18 19 CheckBoxAutomaticDPI: TCheckBox; 19 20 CheckBoxStartMinimizedToTray: TCheckBox; … … 84 85 CheckBoxAutomaticDPI.Checked := Core.ScaleDPI1.AutoDetect; 85 86 SpinEditDPI.Value := Core.ScaleDPI1.DPI.X; 87 CheckBoxReopenLastFileOnStart.Checked := Core.ReopenLastFileOnStart; 86 88 UpdateInterface; 87 89 end; … … 94 96 Core.ScaleDPI1.AutoDetect := CheckBoxAutomaticDPI.Checked; 95 97 Core.ScaleDPI1.DPI := Point(SpinEditDPI.Value, SpinEditDPI.Value); 98 Core.ReopenLastFileOnStart := CheckBoxReopenLastFileOnStart.Checked; 96 99 end; 97 100 -
trunk/Languages/AcronymDecoder.cs.po
r149 r151 693 693 msgstr "Automatické DPI" 694 694 695 #: tformsettings.checkboxreopenlastfileonstart.caption 696 msgid "Reopen last file on start" 697 msgstr "Při startu znovu otevřít poslední soubor" 698 695 699 #: tformsettings.checkboxstartminimizedtotray.caption 696 700 msgid "Start minimized to tray" -
trunk/Languages/AcronymDecoder.po
r149 r151 683 683 msgstr "" 684 684 685 #: tformsettings.checkboxreopenlastfileonstart.caption 686 msgid "Reopen last file on start" 687 msgstr "" 688 685 689 #: tformsettings.checkboxstartminimizedtotray.caption 686 690 msgid "Start minimized to tray" -
trunk/UCore.pas
r148 r151 44 44 StartOnLogon: Boolean; 45 45 StartMinimizedToTray: Boolean; 46 ReopenLastFileOnStart: Boolean; 46 47 InitializeStarted: Boolean; 47 48 InitializeFinished: Boolean; … … 107 108 var 108 109 FileNameOption: string; 110 ExampleFileName: string; 109 111 begin 110 112 if not InitializeStarted then begin … … 126 128 end; 127 129 130 ExampleFileName := ExtractFileDir(Application.ExeName) + DirectorySeparator + ExampleFile; 128 131 FileNameOption := FindFirstNonOption; 129 132 if FileNameOption <> '' then begin … … 131 134 FormMain.ProjectOpen(FileNameOption); 132 135 end else 133 if (FormMain.LastOpenedList1.Items.Count > 0) and FileExists(FormMain.LastOpenedList1.Items[0]) then begin 136 if ReopenLastFileOnStart and (FormMain.LastOpenedList1.Items.Count > 0) and 137 FileExists(FormMain.LastOpenedList1.Items[0]) then begin 134 138 // Open last opened file 135 139 FormMain.ProjectOpen(FormMain.LastOpenedList1.Items[0]) 136 end else begin 140 end else 141 if FileExists(ExampleFileName) then begin 137 142 // Open default database with examples if no item is in recent openned history 138 143 FileNameOption := ExtractFileDir(Application.ExeName) + DirectorySeparator + ExampleFile; … … 143 148 {$ENDIF} 144 149 FormMain.ProjectOpen(FileNameOption); 150 end else begin 151 // Create empty file 152 FormMain.AFileNew.Execute; 145 153 end; 146 154 … … 164 172 ScaleDPI1.DPI := Point(ReadIntegerWithDefault('DPIX', 96), ReadIntegerWithDefault('DPIY', 96)); 165 173 ScaleDPI1.AutoDetect := ReadBoolWithDefault('DPIAuto', True); 174 if ValueExists('LanguageCode') then 175 CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', '')) 176 else CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(''); 177 AlwaysOnTop := ReadBoolWithDefault('AlwaysOnTop', False); 178 StartMinimizedToTray := ReadBoolWithDefault('StartMinimizedToTray', False); 179 ReopenLastFileOnStart := ReadBoolWithDefault('ReopenLastFileOnStart', True); 166 180 finally 167 181 Free; … … 180 194 WriteInteger('DPIY', ScaleDPI1.DPI.Y); 181 195 WriteBool('DPIAuto', ScaleDPI1.AutoDetect); 196 if Assigned(CoolTranslator1.Language) and (CoolTranslator1.Language.Code <> '') then 197 WriteString('LanguageCode', CoolTranslator1.Language.Code) 198 else DeleteValue('LanguageCode'); 199 WriteBool('AlwaysOnTop', AlwaysOnTop); 200 WriteBool('StartMinimizedToTray', StartMinimizedToTray); 201 WriteBool('ReopenLastFileOnStart', ReopenLastFileOnStart); 182 202 finally 183 203 Free;
Note:
See TracChangeset
for help on using the changeset viewer.