- Timestamp:
- Sep 20, 2021, 12:25:22 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormCheck.pas
r207 r209 724 724 with TRegistryEx.Create do 725 725 try 726 RootKey := HKEY_CURRENT_USER;727 OpenKey( DefaultRegKey, True);726 RootKey := RegistryRootHKEY[Core.ApplicationInfo1.RegistryRoot]; 727 OpenKey(Core.ApplicationInfo1.RegistryKey, True); 728 728 EditSummaryStart.Text := ReadStringWithDefault('SummaryStart', 'ACRONYMS AND ABBREVIATIONS'); 729 729 EditSummaryEnd.Text := ReadStringWithDefault('SummaryEnd', 'Appendix'); … … 739 739 with TRegistryEx.Create do 740 740 try 741 RootKey := HKEY_CURRENT_USER;742 OpenKey( DefaultRegKey, True);741 RootKey := RegistryRootHKEY[Core.ApplicationInfo1.RegistryRoot]; 742 OpenKey(Core.ApplicationInfo1.RegistryKey, True); 743 743 WriteString('SummaryStart', EditSummaryStart.Text); 744 744 WriteString('SummaryEnd', EditSummaryEnd.Text); -
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); -
trunk/Packages/Common/Languages/UFormAbout.cs.po
r207 r209 24 24 msgstr "Verze" 25 25 26 #: tformabout.buttonhomepage.caption 27 msgid "Home page" 28 msgstr "Domovská stránka" 29 30 #: tformabout.buttonclose.caption 31 msgid "Close" 32 msgstr "Zavřít" -
trunk/Packages/Common/Languages/UFormAbout.po
r207 r209 14 14 msgstr "" 15 15 16 #: tformabout.buttonhomepage.caption 17 msgid "Home page" 18 msgstr "" 19 20 #: tformabout.buttonclose.caption 21 msgid "Close" 22 msgstr "" 23 -
trunk/Packages/Common/Languages/UJobProgressView.po
r204 r209 14 14 msgstr "" 15 15 16 #: ujobprogressview.soperations 17 msgid "Operations:" 18 msgstr "" 19 16 20 #: ujobprogressview.spleasewait 17 21 msgid "Please wait..." -
trunk/Packages/Common/Languages/UThreading.po
r203 r209 3 3 4 4 #: uthreading.scurrentthreadnotfound 5 #, fuzzy,badformat6 5 msgid "Current thread ID %d not found in virtual thread list." 7 6 msgstr "Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8Content-Type: text/plain; charset=UTF-8" -
trunk/UCore.lfm
r207 r209 3477 3477 Description = 'A simple tool for quick searching of meaning for various acronyms and abbreviations.' 3478 3478 ReleaseDate = 44322 3479 RegistryKey = '\Software\Chronosoft\Acronym Decoder'3479 RegistryKey = '\Software\Chronosoft\Acronym Decoder' 3480 3480 RegistryRoot = rrKeyCurrentUser 3481 3481 License = 'CC0' -
trunk/UCore.pas
r208 r209 49 49 InitializeStarted: Boolean; 50 50 InitializeFinished: Boolean; 51 function GetAppShareDir(Dir: string): string; 51 52 procedure Initialize; 52 53 procedure LoadConfig; … … 59 60 Core: TCore; 60 61 61 const62 DefaultRegKey = '\Software\Chronosoft\Acronym Decoder';63 64 62 65 63 implementation … … 82 80 83 81 procedure TCore.DataModuleCreate(Sender: TObject); 84 const 85 LinuxLanguagesDir = '/usr/share/AcronymDecoder/Languages'; 86 begin 87 {$IFDEF Linux} 88 // If installed in Linux system then use installation directory for po files 89 if not DirectoryExists(Translator.POFilesFolder) and DirectoryExists(LinuxLanguagesDir) then 90 Translator.POFilesFolder := LinuxLanguagesDir; 91 {$ENDIF} 82 begin 83 Translator.POFilesFolder := GetAppShareDir('Languages'); 92 84 93 85 AcronymDb := nil; … … 131 123 {$ENDIF} 132 124 WriteLn(Text); 125 end; 126 127 function TCore.GetAppShareDir(Dir: string): string; 128 var 129 NewDir: string; 130 begin 131 Result := ExtractFileDir(Application.ExeName) + DirectorySeparator + Dir; 132 {$IFDEF Linux} 133 // If installed in Linux system then try to use different installation directory 134 if not DirectoryExists(Result) then begin 135 NewDir := '/usr/share/' + ExtractFileNameOnly(Application.ExeName) + DirectorySeparator + Dir; 136 if DirectoryExists(NewDir) then Result := NewDir; 137 end; 138 {$ENDIF} 133 139 end; 134 140 … … 159 165 end; 160 166 161 ExamplesDir := ExtractFileDir(Application.ExeName) + DirectorySeparator + 162 'Examples'; 163 {$IFDEF Linux} 164 // If installed in Linux system then use installation directory for po files 165 if Application.ExeName = '/usr/bin/' + ExtractFileNameOnly(Application.ExeName) then 166 ExamplesDir := '/usr/share/' + ExtractFileNameOnly(Application.ExeName) + 167 DirectorySeparator + 'Examples'; 168 {$ENDIF} 167 ExamplesDir := GetAppShareDir('Examples'); 169 168 ExampleFileName := ExamplesDir + DirectorySeparator + ExampleFile; 170 169 … … 212 211 with TRegistryEx.Create do 213 212 try 214 RootKey := HKEY_CURRENT_USER;215 OpenKey( DefaultRegKey, True);213 RootKey := RegistryRootHKEY[ApplicationInfo1.RegistryRoot]; 214 OpenKey(ApplicationInfo1.RegistryKey, True); 216 215 ScaleDPI1.DPI := Point(ReadIntegerWithDefault('DPIX', 96), ReadIntegerWithDefault('DPIY', 96)); 217 216 ScaleDPI1.AutoDetect := ReadBoolWithDefault('DPIAuto', True); … … 234 233 with TRegistryEx.Create do 235 234 try 236 RootKey := HKEY_CURRENT_USER;237 OpenKey( DefaultRegKey, True);235 RootKey := RegistryRootHKEY[ApplicationInfo1.RegistryRoot]; 236 OpenKey(ApplicationInfo1.RegistryKey, True); 238 237 WriteInteger('DPIX', ScaleDPI1.DPI.X); 239 238 WriteInteger('DPIY', ScaleDPI1.DPI.Y);
Note:
See TracChangeset
for help on using the changeset viewer.