Skip to content

Commit a6fa055

Browse files
committed
feat: enable connection port visible in a column of the session tree
1 parent 6a0e238 commit a6fa055

2 files changed

Lines changed: 17 additions & 10 deletions

File tree

source/connections.dfm

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -992,29 +992,35 @@ object connform: Tconnform
992992
Text = 'Host'
993993
end
994994
item
995-
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coAllowFocus]
995+
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible, coAllowFocus]
996996
Position = 2
997-
Text = 'User'
997+
Text = 'Port'
998+
Width = 10
998999
end
9991000
item
10001001
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coAllowFocus]
10011002
Position = 3
1003+
Text = 'User'
1004+
end
1005+
item
1006+
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coAllowFocus]
1007+
Position = 4
10021008
Text = 'Version'
10031009
end
10041010
item
10051011
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible, coAllowFocus]
1006-
Position = 4
1012+
Position = 5
10071013
Text = 'Last connect'
10081014
end
10091015
item
10101016
Alignment = taRightJustify
10111017
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coAllowFocus]
1012-
Position = 5
1018+
Position = 6
10131019
Text = 'Counter'
10141020
end
10151021
item
10161022
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible, coAllowFocus]
1017-
Position = 6
1023+
Position = 7
10181024
Text = 'Comment'
10191025
Width = 10
10201026
end>

source/connections.pas

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -813,14 +813,15 @@ procedure Tconnform.ListSessionsGetText(Sender: TBaseVirtualTree;
813813
CellText := CellText + ' *';
814814
end;
815815
1: CellText := Sess.Hostname;
816-
2: CellText := Sess.Username;
817-
3: CellText := Sess.ServerVersion;
818-
4: if Sess.LastConnect>0 then
816+
2: CellText := Sess.Port.ToString;
817+
3: CellText := Sess.Username;
818+
4: CellText := Sess.ServerVersion;
819+
5: if Sess.LastConnect>0 then
819820
CellText := DateTimeToStr(Sess.LastConnect)
820821
else
821822
CellText := '';
822-
5: CellText := FormatNumber(Sess.Counter);
823-
6: CellText := Sess.Comment;
823+
6: CellText := FormatNumber(Sess.Counter);
824+
7: CellText := Sess.Comment;
824825
end;
825826
end;
826827
end;

0 commit comments

Comments
 (0)