Changeset 49 for trunk/UCore.pas


Ignore:
Timestamp:
Dec 3, 2021, 6:52:12 PM (3 years ago)
Author:
chronos
Message:
  • Added: Context menu action to clear profile image.
  • Fixed: Correctly show contact profile image.
  • Added: Remember last selected tab index in contact form.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r48 r49  
    8181    FileClosed: Boolean;
    8282    ReopenLastFileOnStart: Boolean;
     83    LastContactTabIndex: Integer;
    8384    ToolbarVisible: Boolean;
    8485    function GetProfileImage: TImage;
     
    278279
    279280procedure TCore.DataModuleCreate(Sender: TObject);
     281{$IFDEF Linux}
    280282const
    281283  LinuxLanguagesDir = '/usr/share/vCardStudio/Languages';
     284{$ENDIF}
    282285begin
    283286  {$IFDEF Linux}
     
    427430    FormMain.MenuItemToolbar.Checked := ReadBoolWithDefault('ToolBarVisible', True);
    428431    ReopenLastFileOnStart := ReadBoolWithDefault('ReopenLastFileOnStart', True);
     432    LastContactTabIndex := ReadIntegerWithDefault('LastContactTabIndex', 0);
    429433  finally
    430434    Free;
     
    448452    WriteBool('ToolBarVisible', FormMain.MenuItemToolbar.Checked);
    449453    WriteBool('ReopenLastFileOnStart', ReopenLastFileOnStart);
     454    WriteInteger('LastContactTabIndex', LastContactTabIndex);
    450455  finally
    451456    Free;
     
    464469  if not Assigned(ProfileImage) then begin
    465470    ProfileImage := TImage.Create(nil);
    466     ProfileImage.Picture.LoadFromFile(ProfilePhotoFileName);
    467471    if FileExists(ProfilePhotoFileName) then
    468472      ProfileImage.Picture.LoadFromFile(ProfilePhotoFileName);
Note: See TracChangeset for help on using the changeset viewer.