Skip to content

Commit

Permalink
toolkit upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
Grahame Grieve committed May 12, 2022
1 parent 590e792 commit cb217eb
Show file tree
Hide file tree
Showing 5 changed files with 232 additions and 210 deletions.
50 changes: 31 additions & 19 deletions toolkit2/dialogs/dlg_igpub_github.lfm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
object IgGitHubDialog: TIgGitHubDialog
Left = 778
Height = 485
Top = -650
Top = 25
Width = 504
BorderIcons = [biSystemMenu]
BorderStyle = bsDialog
Expand All @@ -14,7 +14,7 @@ object IgGitHubDialog: TIgGitHubDialog
LCLVersion = '2.3.0.0'
object edtGitOrg: TEdit
Left = 8
Height = 23
Height = 21
Top = 85
Width = 480
Anchors = [akTop, akLeft, akRight]
Expand Down Expand Up @@ -56,31 +56,43 @@ object IgGitHubDialog: TIgGitHubDialog
Height = 25
Hint = 'Paste a GitHub URL, or a build.fhir.org URL'
Top = 6
Width = 136
Width = 96
Caption = 'Paste'
OnClick = btnPasteClick
ParentShowHint = False
ShowHint = True
TabOrder = 2
end
object btnCopyGHUrl: TButton
Left = 112
Height = 25
Hint = 'Paste a GitHub URL, or a build.fhir.org URL'
Top = 6
Width = 96
Caption = 'Copy GH'
OnClick = btnCopyGHUrlClick
ParentShowHint = False
ShowHint = True
TabOrder = 3
end
end
object Label1: TLabel
Left = 8
Height = 15
Height = 16
Top = 64
Width = 139
Width = 158
Caption = 'GitHub Repo Organization'
end
object Label3: TLabel
Left = 8
Height = 15
Height = 16
Top = 8
Width = 95
Width = 107
Caption = 'Containing Folder'
end
object edtFolder: TEdit
Left = 8
Height = 23
Height = 21
Top = 26
Width = 448
Anchors = [akTop, akLeft, akRight]
Expand All @@ -89,14 +101,14 @@ object IgGitHubDialog: TIgGitHubDialog
end
object Label2: TLabel
Left = 8
Height = 15
Height = 16
Top = 176
Width = 37
Width = 43
Caption = 'Branch'
end
object edtBranch: TEdit
Left = 8
Height = 23
Height = 21
Top = 192
Width = 480
Anchors = [akTop, akLeft, akRight]
Expand Down Expand Up @@ -139,39 +151,39 @@ object IgGitHubDialog: TIgGitHubDialog
end
object Label4: TLabel
Left = 8
Height = 15
Height = 16
Top = 120
Width = 103
Width = 116
Caption = 'GitHub Repo Name'
end
object edtGitRepoName: TEdit
Left = 8
Height = 23
Height = 21
Top = 141
Width = 480
Anchors = [akTop, akLeft, akRight]
TabOrder = 4
end
object Label5: TLabel
Left = 8
Height = 15
Height = 16
Top = 232
Width = 99
Width = 113
Caption = 'Local Folder Name'
end
object edtLocalFolder: TEdit
Left = 8
Height = 23
Height = 21
Top = 248
Width = 480
Anchors = [akTop, akLeft, akRight]
TabOrder = 5
end
object Label6: TLabel
Left = 8
Height = 15
Height = 16
Top = 284
Width = 45
Width = 54
Caption = 'Progress'
end
object Memo1: TMemo
Expand Down
13 changes: 10 additions & 3 deletions toolkit2/dialogs/dlg_igpub_github.pas
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ TIgGitHubDialog = class(TForm)
btnCancel: TButton;
btnOk: TButton;
btnPaste: TButton;
btnCopyGHUrl: TButton;
edtLocalFolder: TEdit;
edtGitOrg: TEdit;
edtBranch: TEdit;
Expand All @@ -64,6 +65,7 @@ TIgGitHubDialog = class(TForm)
Timer1: TTimer;
procedure btnCancelClick(Sender: TObject);
procedure btnOkClick(Sender: TObject);
procedure btnCopyGHUrlClick(Sender: TObject);
procedure btnPasteClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
Expand Down Expand Up @@ -115,6 +117,11 @@ procedure TIgGitHubDialog.btnOkClick(Sender: TObject);
ModalResult := mrOk;
end;

procedure TIgGitHubDialog.btnCopyGHUrlClick(Sender: TObject);
begin
Clipboard.AsText:= 'https://github.com/'+edtGitOrg.text+'/'+edtGitRepoName.text;
end;

procedure TIgGitHubDialog.btnCancelClick(Sender: TObject);
begin
if FGit <> nil then
Expand Down Expand Up @@ -170,10 +177,10 @@ procedure TIgGitHubDialog.doPaste(error : boolean);
repo := p[4];
if (length(p) > 6) then
begin
if ('tree' <> p[5]) then
raise EFslException.create('Unable to understand IG location '+url)
if ('tree' = p[5]) or ('blob' = p[5]) then
branch := p[6]
else
branch := p[6];
raise EFslException.create('Unable to understand IG location '+url);
end;
end;
if (org = '') or (repo = '') then
Expand Down
19 changes: 8 additions & 11 deletions toolkit2/frames/ftk_frame_igpub.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ object IgPubPageFrame: TIgPubPageFrame
Top = 46
Width = 296
Align = alLeft
Caption = 'Panel1'
ClientHeight = 318
ClientWidth = 296
TabOrder = 0
Expand Down Expand Up @@ -59,7 +58,6 @@ object IgPubPageFrame: TIgPubPageFrame
Width = 876
Align = alClient
BorderWidth = 6
Caption = 'Panel2'
ClientHeight = 318
ClientWidth = 876
TabOrder = 2
Expand Down Expand Up @@ -90,7 +88,6 @@ object IgPubPageFrame: TIgPubPageFrame
BorderSpacing.Top = 4
BorderSpacing.Bottom = 4
BevelOuter = bvNone
Caption = 'Panel7'
ClientHeight = 18
ClientWidth = 862
TabOrder = 1
Expand All @@ -110,7 +107,6 @@ object IgPubPageFrame: TIgPubPageFrame
Top = 0
Width = 1177
Align = alTop
Caption = 'Panel3'
ClientHeight = 46
ClientWidth = 1177
TabOrder = 3
Expand All @@ -126,27 +122,29 @@ object IgPubPageFrame: TIgPubPageFrame
TabOrder = 0
object cbxVersions: TComboBox
Left = 8
Height = 23
Height = 20
Hint = 'Publisher Version:'
Top = 8
Width = 56
ItemHeight = 15
ItemHeight = 26
ParentShowHint = False
ShowHint = True
Style = csDropDownList
TabOrder = 0
Text = '0'
end
object cbxTxServer: TComboBox
Left = 72
Height = 23
Height = 20
Hint = 'Terminology Server'
Top = 8
Width = 160
ItemHeight = 15
ItemHeight = 26
ParentShowHint = False
ShowHint = True
Style = csDropDownList
TabOrder = 1
Text = '0'
end
end
object Panel4: TPanel
Expand All @@ -155,7 +153,6 @@ object IgPubPageFrame: TIgPubPageFrame
Top = 1
Width = 655
Align = alLeft
Caption = 'Panel4'
ClientHeight = 44
ClientWidth = 655
TabOrder = 1
Expand Down Expand Up @@ -225,14 +222,14 @@ object IgPubPageFrame: TIgPubPageFrame
OnClick = tbQAClick
end
object ToolButton8: TToolButton
Left = 496
Left = 504
Height = 40
Top = 2
Caption = 'ToolButton8'
Style = tbsSeparator
end
object tbConfig: TToolButton
Left = 504
Left = 512
Hint = 'IG configuration'
Top = 2
Caption = 'Config'
Expand Down
Loading

0 comments on commit cb217eb

Please sign in to comment.