- Timestamp:
- Aug 1, 2016, 1:10:13 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r69 r70 136 136 public 137 137 AcronymDb: TAcronymDb; 138 StartOnLogon: Boolean; 139 StartMinimizedToTray: Boolean; 138 140 function CompareStrings(Strings1, Strings2: TStrings): Boolean; 139 141 property AlwaysOnTop: Boolean read FAlwaysOnTop write SetAlwaysOnTop; … … 165 167 DefaultFileName = 'Acronyms' + ProjectExt; 166 168 DefaultRegKey = '\Software\Acronym Decoder'; 169 RegistryRunKey = '\Software\Microsoft\Windows\CurrentVersion\Run'; 170 ExampleFile = 'Example acronyms.adp'; 167 171 168 172 { TFormMain } … … 305 309 begin 306 310 FormSettings.Load; 307 if FormSettings.ShowModal = mrOk then 311 if FormSettings.ShowModal = mrOk then begin 308 312 FormSettings.Save; 313 SaveConfig; 314 end; 309 315 end; 310 316 … … 456 462 LoadConfig; 457 463 464 if StartMinimizedToTray then Visible := False; 465 458 466 if ParamCount > 0 then begin 459 467 // Open file specified as command line parameter … … 466 474 end else begin 467 475 // Open default database with examples if no item is in recent openned history 468 ProjectOpen(ExtractFileDir(Application.ExeName) + DirectorySeparator + 'Example Acronyms.adp');476 ProjectOpen(ExtractFileDir(Application.ExeName) + DirectorySeparator + ExampleFile); 469 477 end; 470 478 UpdateAcronymsList; … … 590 598 else CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(''); 591 599 AlwaysOnTop := ReadBoolWithDefault('AlwaysOnTop', False); 600 StartMinimizedToTray := ReadBoolWithDefault('StartMinimizedToTray', False); 592 601 CheckBoxExactMath.Checked := ReadBoolWithDefault('ExactMatch', False); 593 602 MenuItemToolbar.Checked := ReadBoolWithDefault('ToolBarVisible', True); 603 finally 604 Free; 605 end; 606 607 with TRegistryEx.Create do 608 try 609 RootKey := HKEY_CURRENT_USER; 610 OpenKey(RegistryRunKey, True); 611 StartOnLogon := ValueExists('Acronym Decoder'); 594 612 finally 595 613 Free; … … 610 628 else DeleteValue('LanguageCode'); 611 629 WriteBool('AlwaysOnTop', AlwaysOnTop); 630 WriteBool('StartMinimizedToTray', StartMinimizedToTray); 612 631 WriteBool('ExactMatch', CheckBoxExactMath.Checked); 613 632 WriteBool('ToolBarVisible', MenuItemToolbar.Checked); … … 615 634 Free; 616 635 end; 636 637 with TRegistryEx.Create do 638 try 639 RootKey := HKEY_CURRENT_USER; 640 OpenKey(RegistryRunKey, True); 641 if StartOnLogon then WriteString('Acronym Decoder', Application.ExeName) 642 else DeleteValue('Acronym Decoder'); 643 finally 644 Free; 645 end; 617 646 end; 618 647 -
trunk/Forms/UFormSettings.lfm
r69 r70 56 56 TabOrder = 1 57 57 end 58 object CheckBoxStartOnLogon: TCheckBox 59 Left = 16 60 Height = 24 61 Top = 96 62 Width = 150 63 Caption = 'Start on user logon' 64 TabOrder = 4 65 end 66 object CheckBoxStartMinimizedToTray: TCheckBox 67 Left = 16 68 Height = 24 69 Top = 128 70 Width = 176 71 Caption = 'Start minimized to tray' 72 TabOrder = 5 73 end 58 74 end -
trunk/Forms/UFormSettings.lrt
r16 r70 4 4 TFORMSETTINGS.BUTTONCANCEL.CAPTION=Cancel 5 5 TFORMSETTINGS.CHECKBOXALWAYSONTOP.CAPTION=Always on top 6 TFORMSETTINGS.CHECKBOXSTARTONLOGON.CAPTION=Start on user logon 7 TFORMSETTINGS.CHECKBOXSTARTMINIMIZEDTOTRAY.CAPTION=Start minimized to tray -
trunk/Forms/UFormSettings.pas
r16 r70 16 16 ButtonOk: TButton; 17 17 ButtonCancel: TButton; 18 CheckBoxStartMinimizedToTray: TCheckBox; 19 CheckBoxStartOnLogon: TCheckBox; 18 20 CheckBoxAlwaysOnTop: TCheckBox; 19 21 ComboBoxLanguage: TComboBox; … … 56 58 begin 57 59 CheckBoxAlwaysOnTop.Checked := FormMain.AlwaysOnTop; 60 CheckBoxStartOnLogon.Checked := FormMain.StartOnLogon; 61 CheckBoxStartMinimizedToTray.Checked := FormMain.StartMinimizedToTray; 58 62 end; 59 63 … … 61 65 begin 62 66 FormMain.AlwaysOnTop := CheckBoxAlwaysOnTop.Checked; 67 FormMain.StartOnLogon := CheckBoxStartOnLogon.Checked; 68 FormMain.StartMinimizedToTray := CheckBoxStartMinimizedToTray.Checked; 63 69 end; 64 70 -
trunk/Languages/AcronymDecoder.cs.po
r65 r70 612 612 msgstr "Okno vždy navrchu" 613 613 614 #: tformsettings.checkboxstartminimizedtotray.caption 615 msgid "Start minimized to tray" 616 msgstr "Startovat schovaný v oznamovací oblasti" 617 618 #: tformsettings.checkboxstartonlogon.caption 619 msgid "Start on user logon" 620 msgstr "Startovat při přihlášení uživatele" 621 614 622 #: tformsettings.label1.caption 615 623 msgid "Language:" … … 816 824 msgid "Process import sources" 817 825 msgstr "Zpracovat zdroje importu" 818 -
trunk/Languages/AcronymDecoder.po
r57 r70 602 602 msgstr "" 603 603 604 #: tformsettings.checkboxstartminimizedtotray.caption 605 msgid "Start minimized to tray" 606 msgstr "" 607 608 #: tformsettings.checkboxstartonlogon.caption 609 msgid "Start on user logon" 610 msgstr "" 611 604 612 #: tformsettings.label1.caption 605 613 msgid "Language:"
Note:
See TracChangeset
for help on using the changeset viewer.