Move some of the hints to a separate tab. Logically uglier but visually prettier.

This commit is contained in:
rosenfield
2008-05-13 12:10:12 +00:00
parent 8ab35a23a5
commit 6b1f0d1bfb
2 changed files with 46 additions and 23 deletions

View File

@@ -77,7 +77,7 @@ object UserManagerForm: TUserManagerForm
end
object comboObjects: TComboBoxEx
Left = 8
Top = 260
Top = 231
Width = 355
Height = 22
ItemsEx = <>
@@ -90,9 +90,9 @@ object UserManagerForm: TUserManagerForm
end
object boxPrivs: TCheckListBox
Left = 8
Top = 289
Top = 261
Width = 408
Height = 157
Height = 185
OnClickCheck = boxPrivsClickCheck
Anchors = [akLeft, akTop, akRight, akBottom]
Columns = 3
@@ -113,7 +113,7 @@ object UserManagerForm: TUserManagerForm
Left = 8
Top = 36
Width = 407
Height = 217
Height = 189
ActivePage = tabSettings
Anchors = [akLeft, akTop, akRight]
TabOrder = 6
@@ -121,7 +121,7 @@ object UserManagerForm: TUserManagerForm
Caption = 'Settings'
DesignSize = (
399
189)
161)
object lblFromHost: TLabel
Left = 10
Top = 62
@@ -147,10 +147,10 @@ object UserManagerForm: TUserManagerForm
end
object lblWarning: TLabel
Left = 10
Top = 168
Top = 140
Width = 386
Height = 20
Anchors = [akLeft, akTop, akRight]
Anchors = [akLeft, akRight, akBottom]
AutoSize = False
Caption = 'Security warning'
Font.Charset = DEFAULT_CHARSET
@@ -161,15 +161,17 @@ object UserManagerForm: TUserManagerForm
ParentFont = False
WordWrap = True
end
object lblHints: TLabel
object lblHostHints: TLabel
Left = 10
Top = 86
Width = 382
Height = 78
Height = 51
Alignment = taRightJustify
Anchors = [akLeft, akTop, akRight]
AutoSize = False
Caption = 'lblHints'
Caption =
'(Host: % and _ wildcards allowed)'#10'(Host: <ip>/<full netmask> syn' +
'tax ok)'#10'(Host: server skips name resolve?: $SNR)'
Enabled = False
WordWrap = True
end
@@ -221,7 +223,7 @@ object UserManagerForm: TUserManagerForm
ImageIndex = 1
DesignSize = (
399
189)
161)
object lblMaxQuestions: TLabel
Left = 10
Top = 10
@@ -353,7 +355,7 @@ object UserManagerForm: TUserManagerForm
TabVisible = False
DesignSize = (
399
189)
161)
object lblFullName: TLabel
Left = 10
Top = 10
@@ -425,6 +427,31 @@ object UserManagerForm: TUserManagerForm
TabOrder = 3
end
end
object tabHints: TTabSheet
Caption = 'Hints'
ImageIndex = 3
object lblHints: TLabel
AlignWithMargins = True
Left = 5
Top = 10
Width = 389
Height = 146
Margins.Left = 5
Margins.Top = 10
Margins.Right = 5
Margins.Bottom = 5
Align = alClient
AutoSize = False
Caption =
'When no account match during login, the Everybody account is tri' +
'ed with the user name ignored, if the account exists.'#10#10'If multip' +
'le accounts match host+user during login, the first account in s' +
'orted order is tried.'#10#10'After login, privileges are given based o' +
'n ALL accounts that match host+user, rather than just those priv' +
'ileges that apply to the authenticated account.'
WordWrap = True
end
end
end
object panelVista1: TPanel
Left = 369
@@ -468,7 +495,7 @@ object UserManagerForm: TUserManagerForm
end
object panelVista2: TPanel
Left = 369
Top = 259
Top = 231
Width = 48
Height = 24
Anchors = [akTop, akRight]

View File

@@ -162,12 +162,14 @@ type
editUsername: TEdit;
lblLimitHint: TLabel;
lblWarning: TLabel;
lblHints: TLabel;
lblHostHints: TLabel;
panelVista1: TPanel;
tlbUsers: TToolBar;
btnAddUser: TToolButton;
btnDeleteUser: TToolButton;
panelVista2: TPanel;
tabHints: TTabSheet;
lblHints: TLabel;
procedure boxPrivsClickCheck(Sender: TObject);
procedure btnAddObjectClick(Sender: TObject);
procedure FormDestroy(Sender: TObject);
@@ -264,7 +266,7 @@ end;
}
procedure TUserManagerForm.FormShow(Sender: TObject);
var
test_result, snr, Hints: String;
test_result, snr: String;
begin
// Test if we can access the privileges database and tables by
// A. Using the mysql-DB
@@ -285,15 +287,9 @@ begin
end;
// Set hints text
Hints := '(Host: % and _ wildcards allowed)'+CRLF+
'(Host: <ip>/<full netmask> syntax ok)'+CRLF+
'(Host: server skips name resolve?: $SNR)'+CRLF+
'(Note: When no account match during login, the Everybody account is tried.)'+CRLF+
'(Note: If multiple accounts match, the first account in sorted order is tried.)'+CRLF+
'(Note: After login, privileges are given based on ALL accounts that match.)';
snr := Mainform.Childwin.GetVar('SHOW VARIABLES LIKE ' + esc('skip_name_resolve'), 0, True, False);
if snr = '' then snr := 'Unknown';
lblHints.Caption := StringReplace(Hints, '$SNR', snr, []);
lblHostHints.Caption := StringReplace(lblHostHints.Caption, '$SNR', snr, []);
// Load users into memory
Users := TUsers.Create;
@@ -476,7 +472,7 @@ begin
editPassword.Enabled := Enable;
lblFromHost.Enabled := Enable;
editFromHost.Enabled := Enable;
lblHints.Enabled := Enable;
lblHostHints.Enabled := Enable;
chkDisabled.Enabled := Enable;
// Update controls in Limitations tab
lblMaxQuestions.Enabled := Enable;