Changeset 32 for trunk/UContact.pas


Ignore:
Timestamp:
Nov 25, 2021, 11:32:55 AM (3 years ago)
Author:
chronos
Message:
  • Added: Bottom column filter bar in contacts list.
  • Added: Allow to sort columns in contacts list.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UContact.pas

    r31 r32  
    8787  TContacts = class(TFPGObjectList<TContact>)
    8888    ContactsFile: TContactsFile;
     89    procedure AssignToList(List: TFPGObjectList<TObject>);
    8990    function AddNew: TContact;
    9091    function Search(FullName: string): TContact;
     
    185186procedure TContactProperty.EvaluateAttributes;
    186187begin
     188  if Attributes.IndexOf('BASE64') <> -1 then
     189    Encoding := 'BASE64'
     190  else
    187191  if Attributes.IndexOfName('ENCODING') <> -1 then
    188192    Encoding := Attributes.Values['ENCODING']
    189193    else Encoding := '';
     194
    190195  if Attributes.IndexOfName('CHARSET') <> -1 then
    191196    Charset := Attributes.Values['CHARSET']
     
    245250
    246251{ TContacts }
     252
     253procedure TContacts.AssignToList(List: TFPGObjectList<TObject>);
     254var
     255  I: Integer;
     256begin
     257  List.Clear;
     258  for I := 0 to Count - 1 do
     259    List.Add(Items[I]);
     260end;
    247261
    248262function TContacts.AddNew: TContact;
     
    419433    AddNew('TITLE', [], 'Title', cfTitle, dtString);
    420434    AddNew('CATEGORIES', [], 'Categories', cfCategories, dtString);
    421     AddNew('ORG', [], 'Organization', cfOrganization, dtString);
     435    AddNew('ORG', [], 'Organization', cfOrganization, dtString, 0);
     436    AddNew('ORG', [], 'Division', cfOrganization, dtString, 1);
    422437    AddNew('ADR', ['HOME'], 'Home Address', cfAdrHome, dtString);
    423438    AddNew('ADR', ['HOME'], 'Home Address Street', cfHomeAddressStreet, dtString, 1);
Note: See TracChangeset for help on using the changeset viewer.