Ignore:
Timestamp:
Feb 3, 2022, 11:39:12 PM (3 years ago)
Author:
chronos
Message:
  • Added: URLs and emails can be opened in default applications.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormContact.pas

    r93 r95  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   ComCtrls, ActnList, Menus, ExtCtrls, ExtDlgs, UContact, UFormProperties;
     9  ComCtrls, ActnList, Menus, ExtCtrls, ExtDlgs, Buttons, UContact, LCLIntf,
     10  UFormProperties;
    1011
    1112type
     
    172173    PopupMenuPhoto: TPopupMenu;
    173174    SavePictureDialog1: TSavePictureDialog;
     175    SpeedButtonHomeEmail: TSpeedButton;
     176    SpeedButtonEmail: TSpeedButton;
     177    SpeedButtonWorkEmail: TSpeedButton;
     178    SpeedButtonWorkWeb: TSpeedButton;
     179    SpeedButtonWeb: TSpeedButton;
     180    SpeedButtonHomeWeb: TSpeedButton;
    174181    TabSheetSocial: TTabSheet;
    175182    TabSheetChat: TTabSheet;
     
    188195    procedure FormDestroy(Sender: TObject);
    189196    procedure FormShow(Sender: TObject);
     197    procedure peedButtonHomeWebClick(Sender: TObject);
     198    procedure SpeedButtonEmailClick(Sender: TObject);
     199    procedure SpeedButtonHomeEmailClick(Sender: TObject);
     200    procedure SpeedButtonWebClick(Sender: TObject);
     201    procedure SpeedButtonWorkEmailClick(Sender: TObject);
     202    procedure SpeedButtonWorkWebClick(Sender: TObject);
    190203    procedure TabSheetAllShow(Sender: TObject);
    191204    procedure TabSheetChatHide(Sender: TObject);
     
    231244
    232245uses
    233   UCore;
     246  UCore, UCommon;
    234247
    235248{ TFormContact }
     
    251264  PageControlContact.TabIndex := Core.LastContactTabIndex;
    252265  UpdateInterface;
     266end;
     267
     268procedure TFormContact.peedButtonHomeWebClick(Sender: TObject);
     269begin
     270  if EditHomeWeb.Text <> '' then OpenURL(EditHomeWeb.Text);
     271end;
     272
     273procedure TFormContact.SpeedButtonEmailClick(Sender: TObject);
     274begin
     275  if EditEmail.Text <> '' then OpenEmail(EditEmail.Text);
     276end;
     277
     278procedure TFormContact.SpeedButtonHomeEmailClick(Sender: TObject);
     279begin
     280  if EditHomeEmail.Text <> '' then OpenEmail(EditHomeEmail.Text);
     281end;
     282
     283procedure TFormContact.SpeedButtonWebClick(Sender: TObject);
     284begin
     285  if EditWeb.Text <> '' then OpenURL(EditWeb.Text);
     286end;
     287
     288procedure TFormContact.SpeedButtonWorkEmailClick(Sender: TObject);
     289begin
     290  if EditWorkEmail.Text <> '' then OpenEmail(EditWorkEmail.Text);
     291end;
     292
     293procedure TFormContact.SpeedButtonWorkWebClick(Sender: TObject);
     294begin
     295  if EditWorkWeb.Text <> '' then OpenURL(EditWorkWeb.Text);
    253296end;
    254297
Note: See TracChangeset for help on using the changeset viewer.