Changeset 133 for trunk/UCore.pas


Ignore:
Timestamp:
Apr 10, 2022, 1:39:35 PM (2 years ago)
Author:
chronos
Message:
  • Modified: Show number of removed duplicates.
  • Fixed: Set document as modified only if data are really changed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r130 r133  
    127127  SCombinedContacts = 'Combined %d contact files.';
    128128  SLine = 'Line %d: %s';
     129  SRemovedDuplicates = 'Removed %d duplicates.';
    129130
    130131{ TCore }
     
    298299
    299300procedure TCore.ARemoveExactDuplicatesExecute(Sender: TObject);
    300 begin
    301   TVCardFile(DataFile).VCard.Contacts.RemoveExactDuplicates;
    302   UpdateFile;
     301var
     302  RemovedCount: Integer;
     303begin
     304  RemovedCount := TVCardFile(DataFile).VCard.Contacts.RemoveExactDuplicates;
     305  ShowMessage(Format(SRemovedDuplicates, [RemovedCount]));
     306  if RemovedCount > 0 then begin
     307    DataFile.Modified := True;
     308    UpdateFile;
     309  end;
    303310end;
    304311
Note: See TracChangeset for help on using the changeset viewer.