@@ -22,6 +22,7 @@ Tconnform = class(TExtForm)
2222 btnSave: TButton;
2323 btnNew: TButton;
2424 btnDelete: TButton;
25+ chkForceUnicode: TCheckBox;
2526 popupSessions: TPopupMenu;
2627 menuSave: TMenuItem;
2728 menuDelete: TMenuItem;
@@ -496,6 +497,7 @@ procedure Tconnform.btnSaveClick(Sender: TObject);
496497 Sess.LoginPrompt := chkLoginPrompt.Checked;
497498 Sess.WindowsAuth := chkWindowsAuth.Checked;
498499 Sess.CleartextPluginEnabled := chkCleartextPluginEnabled.Checked;
500+ Sess.ForceUnicode := chkForceUnicode.Checked;
499501 Sess.Port := updownPort.Position;
500502 Sess.NetType := SelectedNetType;
501503 Sess.Compressed := chkCompressed.Checked;
@@ -725,6 +727,7 @@ function Tconnform.CurrentParams: TConnectionParameters;
725727 Result.LoginPrompt := chkLoginPrompt.Checked;
726728 Result.WindowsAuth := chkWindowsAuth.Checked;
727729 Result.CleartextPluginEnabled := chkCleartextPluginEnabled.Checked;
730+ Result.ForceUnicode := chkForceUnicode.Checked;
728731 if updownPort.Enabled then
729732 Result.Port := updownPort.Position
730733 else
@@ -1036,6 +1039,7 @@ procedure Tconnform.ListSessionsFocusChanged(Sender: TBaseVirtualTree;
10361039 chkLoginPrompt.Checked := Sess.LoginPrompt;
10371040 chkWindowsAuth.Checked := Sess.WindowsAuth;
10381041 chkCleartextPluginEnabled.Checked := Sess.CleartextPluginEnabled;
1042+ chkForceUnicode.Checked := Sess.ForceUnicode;
10391043 updownPort.Position := Sess.Port;
10401044 chkCompressed.Checked := Sess.Compressed;
10411045 updownQueryTimeout.Position := Sess.QueryTimeout;
@@ -1462,6 +1466,7 @@ procedure Tconnform.Modification(Sender: TObject);
14621466 or (Sess.LoginPrompt <> chkLoginPrompt.Checked)
14631467 or (Sess.WindowsAuth <> chkWindowsAuth.Checked)
14641468 or (Sess.CleartextPluginEnabled <> chkCleartextPluginEnabled.Checked)
1469+ or (Sess.ForceUnicode <> chkForceUnicode.Checked)
14651470 or (Sess.Port <> updownPort.Position)
14661471 or (Sess.Compressed <> chkCompressed.Checked)
14671472 or (Sess.QueryTimeout <> updownQueryTimeout.Position)
@@ -1499,7 +1504,8 @@ procedure Tconnform.Modification(Sender: TObject);
14991504 FSessionModified := FSessionModified or PasswordModified;
15001505 if (Sender=editHost) or (Sender=editUsername) or (Sender=editPassword) or
15011506 (Sender=comboNetType) or (Sender=chkWindowsAuth) or (Sender=editPort) or
1502- (Sender=chkCleartextPluginEnabled) then begin
1507+ (Sender=chkCleartextPluginEnabled) or (Sender=chkForceUnicode)
1508+ then begin
15031509 // Be sure to use the modified connection params next time the user clicks the "Databases" pulldown
15041510 FreeAndNil(FPopupDatabases);
15051511 end ;
@@ -1616,6 +1622,15 @@ procedure Tconnform.ValidateControls;
16161622 lblSSHLocalPort.Enabled := Params.SSHActive;
16171623 editSSHlocalport.Enabled := Params.SSHActive;
16181624 // Advanced tab:
1625+ lblQueryTimeout.Enabled := True;
1626+ editQueryTimeout.Enabled := lblQueryTimeout.Enabled;
1627+ updownQueryTimeout.Enabled := lblQueryTimeout.Enabled;
1628+ chkLocalTimeZone.Enabled := Params.NetTypeGroup = ngMySQL;
1629+ chkFullTableStatus.Enabled := (Params.NetTypeGroup in [ngMySQL, ngPgSQL, ngSQLite]) and (Params.NetType <> ntMySQL_ProxySQLAdmin);
1630+ chkCleartextPluginEnabled.Enabled := Params.NetTypeGroup = ngMySQL;
1631+ chkForceUnicode.Enabled := Params.NetTypeGroup = ngMySQL;
1632+ editLogFilePath.Enabled := Params.LogFileDdl or Params.LogFileDml;
1633+ // SSL tab:
16191634 chkWantSSL.Enabled := Params.NetType in [ntMySQL_TCPIP, ntMySQL_SSHtunnel, ntMySQL_ProxySQLAdmin, ntMySQL_RDS, ntPgSQL_TCPIP, ntPgSQL_SSHtunnel];
16201635 lblSSLPrivateKey.Enabled := Params.WantSSL;
16211636 editSSLPrivateKey.Enabled := Params.WantSSL;
@@ -1627,13 +1642,6 @@ procedure Tconnform.ValidateControls;
16271642 editSSLcipher.Enabled := Params.WantSSL;
16281643 lblSSLVerification.Enabled := Params.WantSSL;
16291644 comboSSLVerification.Enabled := Params.WantSSL;
1630- lblQueryTimeout.Enabled := True;
1631- editQueryTimeout.Enabled := lblQueryTimeout.Enabled;
1632- updownQueryTimeout.Enabled := lblQueryTimeout.Enabled;
1633- chkLocalTimeZone.Enabled := Params.NetTypeGroup = ngMySQL;
1634- chkFullTableStatus.Enabled := (Params.NetTypeGroup in [ngMySQL, ngPgSQL, ngSQLite]) and (Params.NetType <> ntMySQL_ProxySQLAdmin);
1635- chkCleartextPluginEnabled.Enabled := Params.NetTypeGroup = ngMySQL;
1636- editLogFilePath.Enabled := Params.LogFileDdl or Params.LogFileDml;
16371645
16381646 Params.Free;
16391647 end ;
0 commit comments