Skip to content

Commit 7cfdb97

Browse files
committed
feat: enable connection port visible in a column of the session tree
1 parent b97122c commit 7cfdb97

2 files changed

Lines changed: 15 additions & 9 deletions

File tree

source/connections.lfm

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,27 +1115,32 @@ object connform: Tconnform
11151115
item
11161116
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coAllowFocus]
11171117
Position = 2
1118-
Text = 'User'
1118+
Text = 'Port'
11191119
end
11201120
item
11211121
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coAllowFocus]
11221122
Position = 3
1123+
Text = 'User'
1124+
end
1125+
item
1126+
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coAllowFocus]
1127+
Position = 4
11231128
Text = 'Version'
11241129
end
11251130
item
11261131
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible, coAllowFocus]
1127-
Position = 4
1132+
Position = 5
11281133
Text = 'Last connect'
11291134
end
11301135
item
11311136
Alignment = taRightJustify
11321137
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coAllowFocus]
1133-
Position = 5
1138+
Position = 6
11341139
Text = 'Counter'
11351140
end
11361141
item
11371142
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible, coAllowFocus]
1138-
Position = 6
1143+
Position = 7
11391144
Text = 'Comment'
11401145
Width = 10
11411146
end>

source/connections.pas

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

0 commit comments

Comments
 (0)