Ignore:
Timestamp:
Dec 8, 2021, 10:00:45 PM (3 years ago)
Author:
chronos
Message:
  • Added: Social tab in contact form.
  • Added: Allow to specify alternative property name for contact field definition to support various non-standard properties.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormContact.pas

    r57 r58  
    2323    ButtonPrevious: TButton;
    2424    EditAim: TEdit;
     25    EditMatrix: TEdit;
     26    EditYouTube: TEdit;
     27    EditGender: TEdit;
     28    EditLinkedIn: TEdit;
     29    EditFacebook: TEdit;
     30    EditInstagram: TEdit;
     31    EditMySpace: TEdit;
     32    EditTwitter: TEdit;
     33    EditReddit: TEdit;
     34    EditMastodon: TEdit;
    2535    EditWindowsLive: TEdit;
     36    EditSnapchat: TEdit;
    2637    EditYahoo: TEdit;
    2738    EditGoogleTalk: TEdit;
     
    7687    EditWorkPhone: TEdit;
    7788    EditQq: TEdit;
     89    EditPeerTube: TEdit;
    7890    GroupBox1: TGroupBox;
    7991    GroupBox2: TGroupBox;
     
    122134    Label47: TLabel;
    123135    Label48: TLabel;
     136    Label49: TLabel;
    124137    Label5: TLabel;
     138    Label50: TLabel;
     139    Label51: TLabel;
     140    Label52: TLabel;
     141    Label53: TLabel;
     142    Label54: TLabel;
     143    Label55: TLabel;
    125144    Label6: TLabel;
    126145    Label7: TLabel;
     
    129148    LabelOrganization: TLabel;
    130149    LabelOrganization1: TLabel;
     150    LabelOrganization10: TLabel;
     151    LabelOrganization11: TLabel;
    131152    LabelOrganization2: TLabel;
    132153    LabelOrganization3: TLabel;
     
    134155    LabelOrganization5: TLabel;
    135156    LabelOrganization6: TLabel;
     157    LabelOrganization7: TLabel;
     158    LabelOrganization8: TLabel;
     159    LabelOrganization9: TLabel;
    136160    MemoNotes: TMemo;
    137161    MenuItem1: TMenuItem;
     
    142166    PopupMenuPhoto: TPopupMenu;
    143167    SavePictureDialog1: TSavePictureDialog;
     168    TabSheetSocial: TTabSheet;
    144169    TabSheetChat: TTabSheet;
    145170    TabSheetOthers: TTabSheet;
     
    166191    procedure TabSheetOthersHide(Sender: TObject);
    167192    procedure TabSheetOthersShow(Sender: TObject);
     193    procedure TabSheetSocialHide(Sender: TObject);
     194    procedure TabSheetSocialShow(Sender: TObject);
    168195    procedure TabSheetWorkHide(Sender: TObject);
    169196    procedure TabSheetWorkShow(Sender: TObject);
     
    225252procedure TFormContact.TabSheetChatHide(Sender: TObject);
    226253begin
     254  Contact.Fields[cfMatrix] := EditMatrix.Text;
    227255  Contact.Fields[cfJabber] := EditJabber.Text;
    228256  Contact.Fields[cfIcq] := EditIcq.Text;
     
    234262  Contact.Fields[cfYahoo] := EditYahoo.Text;
    235263  Contact.Fields[cfAim] := EditAim.Text;
    236   Contact.Fields[cfIrc] := EditIrc.Text
     264  Contact.Fields[cfIrc] := EditIrc.Text;
     265
     266  ReloadAllPropertiesTab;
    237267end;
    238268
    239269procedure TFormContact.TabSheetChatShow(Sender: TObject);
    240270begin
     271  EditMatrix.Text := Contact.Fields[cfMatrix];
    241272  EditJabber.Text := Contact.Fields[cfJabber];
    242273  EditIcq.Text := Contact.Fields[cfIcq];
     
    274305  Contact.Fields[cfAnniversary] := EditAniversary.Text;
    275306  Contact.Fields[cfUrl] := EditWeb.Text;
     307  Contact.Fields[cfGender] := EditGender.Text;
    276308
    277309  // Photo
     
    358390  EditAniversary.Text := Contact.Fields[cfAnniversary];
    359391  EditWeb.Text := Contact.Fields[cfUrl];
     392  EditGender.Text := Contact.Fields[cfGender];
    360393
    361394  // Photo
     
    466499end;
    467500
     501procedure TFormContact.TabSheetSocialHide(Sender: TObject);
     502begin
     503  Contact.Fields[cfFacebook] := EditFacebook.Text;
     504  Contact.Fields[cfTwitter] := EditTwitter.Text;
     505  Contact.Fields[cfInstagram] := EditInstagram.Text;
     506  Contact.Fields[cfYouTube] := EditYouTube.Text;
     507  Contact.Fields[cfPeerTube] := EditPeerTube.Text;
     508  Contact.Fields[cfMastodon] := EditMastodon.Text;
     509  Contact.Fields[cfLinkedIn] := EditLinkedIn.Text;
     510  Contact.Fields[cfSnapchat] := EditSnapchat.Text;
     511  Contact.Fields[cfReddit] := EditReddit.Text;
     512  Contact.Fields[cfMySpace] := EditMySpace.Text;
     513
     514  ReloadAllPropertiesTab;
     515end;
     516
     517procedure TFormContact.TabSheetSocialShow(Sender: TObject);
     518begin
     519  EditFacebook.Text := Contact.Fields[cfFacebook];
     520  EditTwitter.Text := Contact.Fields[cfTwitter];
     521  EditInstagram.Text := Contact.Fields[cfInstagram];
     522  EditYouTube.Text := Contact.Fields[cfYouTube];
     523  EditPeerTube.Text := Contact.Fields[cfPeerTube];
     524  EditMastodon.Text := Contact.Fields[cfMastodon];
     525  EditLinkedIn.Text := Contact.Fields[cfLinkedIn];
     526  EditSnapchat.Text := Contact.Fields[cfSnapchat];
     527  EditReddit.Text := Contact.Fields[cfReddit];
     528  EditMySpace.Text := Contact.Fields[cfMySpace];
     529end;
     530
    468531procedure TFormContact.TabSheetWorkHide(Sender: TObject);
    469532begin
Note: See TracChangeset for help on using the changeset viewer.