Changeset 66 for trunk/UCore.pas


Ignore:
Timestamp:
Dec 10, 2021, 12:17:46 AM (3 years ago)
Author:
chronos
Message:
  • Fixed: Missing Version field definition causing error in contacts generation form.
  • Fixed: Default profile image location detection under Linux.
  • Fixed: Languages were not loaded in snap and deb Linux packages.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r63 r66  
    7474    ProfileImage: TImage;
    7575    LastSplitDir: string;
     76    ProfilePhotoFileName: string;
    7677    procedure FileModified(Sender: TObject);
    7778    function FindFirstNonOption: string;
     
    322323{$IFDEF Linux}
    323324const
    324   LinuxLanguagesDir = '/usr/share/vCardStudio/Languages';
     325  LinuxDataFilesDir = '/usr/share/vCardStudio';
     326  LinuxLanguagesDir = LinuxDataFilesDir + '/Languages';
     327  LinuxImagesDir = LinuxDataFilesDir + '/Images';
    325328{$ENDIF}
    326329begin
     330  ProfilePhotoFileName := 'Images/Profile.png';
    327331  {$IFDEF Linux}
    328332  // If installed in Linux system then use installation directory for po files
    329   if not DirectoryExists(Translator.POFilesFolder) and DirectoryExists(LinuxLanguagesDir) then
     333  if not DirectoryExists(Translator.POFilesFolder) and DirectoryExists(LinuxLanguagesDir) then begin
    330334    Translator.POFilesFolder := LinuxLanguagesDir;
     335  end;
     336  // If installed in Linux system then use installation directory for images files
     337  if not DirectoryExists('Images') and DirectoryExists(LinuxImagesDir) then begin
     338    ProfilePhotoFileName := LinuxImagesDir + DirectorySeparator + 'Profile.png';
     339  end;
    331340  {$ENDIF}
    332341
     
    510519
    511520function TCore.GetProfileImage: TImage;
    512 const
    513   ProfilePhotoFileName = 'Images/Profile.png';
    514521begin
    515522  if not Assigned(ProfileImage) then begin
Note: See TracChangeset for help on using the changeset viewer.