Changeset 209 for trunk/Forms/UFormMain.pas
- Timestamp:
- Sep 20, 2021, 12:25:22 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r208 r209 735 735 if Title <> '' then Title := Title + ' - '; 736 736 Title := Title + Core.ApplicationInfo1.AppName; 737 {$IFDEF WINDOWS} 738 // Under Linux title would affect reg.xml path for storing registry settings 737 739 Application.Title := Title; 740 {$ENDIF} 738 741 Caption := Title; 739 742 if Assigned(Core.AcronymDb) then begin … … 750 753 procedure TFormMain.LoadConfig; 751 754 begin 752 RegistryContext := TRegistryContext.Create(HKEY_CURRENT_USER, DefaultRegKey);753 Core.PersistentForm1.RegistryContext := RegistryContext;754 RegistryContext := TRegistryContext.Create(HKEY_CURRENT_USER, DefaultRegKey + '\RecentFiles');755 Core.PersistentForm1.RegistryContext := Core.ApplicationInfo1.GetRegistryContext; 756 RegistryContext := TRegistryContext.Create(Core.ApplicationInfo1.RegistryRoot, 757 Core.ApplicationInfo1.RegistryKey + '\RecentFiles'); 755 758 LastOpenedList1.LoadFromRegistry(RegistryContext); 756 759 … … 763 766 with TRegistryEx.Create do 764 767 try 765 RootKey := HKEY_CURRENT_USER;766 OpenKey( DefaultRegKey, True);768 RootKey := RegistryRootHKEY[Core.ApplicationInfo1.RegistryRoot]; 769 OpenKey(Core.ApplicationInfo1.RegistryKey, True); 767 770 AFilterSameLength.Checked := ReadBoolWithDefault('SameLength', False); 768 771 AFilterSameLetterCase.Checked := ReadBoolWithDefault('SameLetterCase', False); … … 789 792 procedure TFormMain.SaveConfig; 790 793 begin 791 RegistryContext := TRegistryContext.Create(HKEY_CURRENT_USER, DefaultRegKey + '\RecentFiles'); 794 RegistryContext := TRegistryContext.Create(Core.ApplicationInfo1.RegistryRoot, 795 Core.ApplicationInfo1.RegistryKey + '\RecentFiles'); 792 796 LastOpenedList1.SaveToRegistry(RegistryContext); 793 797 794 798 with TRegistryEx.Create do 795 799 try 796 RootKey := HKEY_CURRENT_USER;797 OpenKey( DefaultRegKey, True);800 RootKey := RegistryRootHKEY[Core.ApplicationInfo1.RegistryRoot]; 801 OpenKey(Core.ApplicationInfo1.RegistryKey, True); 798 802 WriteBool('SameLength', AFilterSameLength.Checked); 799 803 WriteBool('SameLetterCase', AFilterSameLetterCase.Checked);
Note:
See TracChangeset
for help on using the changeset viewer.