Skip to content

Commit a140b19

Browse files
committed
fix: bad anchors on "start" tab of session manager, plus add an info label for portable users
1 parent c528c5d commit a140b19

3 files changed

Lines changed: 44 additions & 15 deletions

File tree

source/apphelpers.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3704,7 +3704,7 @@ constructor TAppSettings.Create;
37043704
InitSetting(asUsermanagerListWidth, 'Usermanager_ListWidth', 180);
37053705
InitSetting(asSelectDBOWindowWidth, 'SelectDBO_WindowWidth', 250);
37063706
InitSetting(asSelectDBOWindowHeight, 'SelectDBO_WindowHeight', 350);
3707-
InitSetting(asSessionManagerListWidth, 'SessionManager_ListWidth', 220);
3707+
InitSetting(asSessionManagerListWidth, 'SessionManager_ListWidth', 300);
37083708
InitSetting(asSessionManagerListFoldersAtTop, 'SessionManager_ListFoldersAtTop', 0, True);
37093709
InitSetting(asSessionManagerWindowWidth, 'SessionManager_WindowWidth', 700);
37103710
InitSetting(asSessionManagerWindowHeight, 'SessionManager_WindowHeight', 490);

source/connections.lfm

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,50 @@ object connform: Tconnform
4545
ClientWidth = 648
4646
ImageIndex = 112
4747
object lblHelp: TLabel
48-
Left = 0
49-
Height = 201
50-
Top = 0
51-
Width = 648
52-
Align = alTop
53-
AutoSize = False
48+
AnchorSideLeft.Control = tabStart
49+
AnchorSideTop.Control = tabStart
50+
AnchorSideRight.Control = tabStart
51+
AnchorSideRight.Side = asrBottom
52+
Left = 6
53+
Height = 20
54+
Top = 6
55+
Width = 636
56+
Anchors = [akTop, akLeft, akRight]
57+
BorderSpacing.Around = 6
5458
Caption = 'lblHelp'
5559
WordWrap = True
5660
end
5761
object btnImportSettings: TSpeedButton
58-
Left = 12
59-
Height = 31
60-
Top = 230
61-
Width = 597
62-
Anchors = [akTop, akLeft, akRight]
62+
AnchorSideLeft.Control = tabStart
63+
AnchorSideTop.Control = lblHelp
64+
AnchorSideTop.Side = asrBottom
65+
Left = 6
66+
Height = 30
67+
Top = 32
68+
Width = 143
69+
AutoSize = True
70+
BorderSpacing.Around = 6
6371
Caption = 'Import settings ...'
6472
Images = MainForm.ImageListMain
6573
ImageIndex = 101
6674
OnClick = btnImportSettingsClick
6775
end
76+
object lblHelpPortable: TLabel
77+
AnchorSideLeft.Control = tabStart
78+
AnchorSideTop.Control = btnImportSettings
79+
AnchorSideTop.Side = asrBottom
80+
AnchorSideRight.Control = tabStart
81+
AnchorSideRight.Side = asrBottom
82+
Left = 6
83+
Height = 40
84+
Top = 68
85+
Width = 636
86+
Anchors = [akTop, akLeft, akRight]
87+
BorderSpacing.Around = 6
88+
Caption = 'Previous portable settings must be imported once in this version. To do this, click on the button above and open your old .txt file.'
89+
Visible = False
90+
WordWrap = True
91+
end
6892
end
6993
object tabSettings: TTabSheet
7094
Caption = 'Settings'

source/connections.pas

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Tconnform = class(TExtForm)
2626
btnSave: TBitBtn;
2727
btnNew: TBitBtn;
2828
btnDelete: TBitBtn;
29+
lblHelpPortable: TLabel;
2930
lblSshPassHint: TLabel;
3031
pnlBottom: TPanel;
3132
popupSessions: TPopupMenu;
@@ -1029,12 +1030,16 @@ procedure Tconnform.ListSessionsFocusChanged(Sender: TBaseVirtualTree;
10291030

10301031
if not SessionFocused then begin
10311032
PageControlDetails.ActivePage := tabStart;
1032-
if ListSessions.RootNodeCount = 0 then
1033+
if ListSessions.RootNodeCount = 0 then begin
10331034
lblHelp.Caption := f_('New here? In order to connect to a server, you have to create a so called '+
10341035
'"session" at first. Just click the "New" button on the bottom left to create your first session. '+
1035-
'Give it a friendly name (e.g. "Local DB server") so you''ll recall it the next time you start %s.', [APPNAME])
1036-
else
1036+
'Give it a friendly name (e.g. "Local DB server") so you''ll recall it the next time you start %s.', [APPNAME]);
1037+
lblHelpPortable.Visible := AppSettings.PortableMode;
1038+
end
1039+
else begin
10371040
lblHelp.Caption := _('Please click a session on the left list to edit parameters, doubleclick to open it.');
1041+
lblHelpPortable.Visible := False;
1042+
end;
10381043
end else begin
10391044
PageControlDetails.ActivePage := tabSettings;
10401045

0 commit comments

Comments
 (0)