@@ -26,6 +26,7 @@ Tconnform = class(TExtForm)
2626 btnSave: TBitBtn;
2727 btnNew: TBitBtn;
2828 btnDelete: TBitBtn;
29+ chkForceUnicode: TCheckBox;
2930 lblHelpPortable: TLabel;
3031 lblSshPassHint: TLabel;
3132 pnlBottom: TPanel;
@@ -495,6 +496,7 @@ procedure Tconnform.btnSaveClick(Sender: TObject);
495496 Sess.LoginPrompt := chkLoginPrompt.Checked;
496497 Sess.WindowsAuth := chkWindowsAuth.Checked;
497498 Sess.CleartextPluginEnabled := chkCleartextPluginEnabled.Checked;
499+ Sess.ForceUnicode := chkForceUnicode.Checked;
498500 Sess.Port := spinPort.Value ;
499501 Sess.NetType := SelectedNetType;
500502 Sess.Compressed := chkCompressed.Checked;
@@ -724,6 +726,7 @@ function Tconnform.CurrentParams: TConnectionParameters;
724726 Result.LoginPrompt := chkLoginPrompt.Checked;
725727 Result.WindowsAuth := chkWindowsAuth.Checked;
726728 Result.CleartextPluginEnabled := chkCleartextPluginEnabled.Checked;
729+ Result.ForceUnicode := chkForceUnicode.Checked;
727730 if spinPort.Enabled then
728731 Result.Port := spinPort.Value
729732 else
@@ -1040,6 +1043,7 @@ procedure Tconnform.ListSessionsFocusChanged(Sender: TBaseVirtualTree;
10401043 chkLoginPrompt.Checked := Sess.LoginPrompt;
10411044 chkWindowsAuth.Checked := Sess.WindowsAuth;
10421045 chkCleartextPluginEnabled.Checked := Sess.CleartextPluginEnabled;
1046+ chkForceUnicode.Checked := Sess.ForceUnicode;
10431047 spinPort.Value := Sess.Port;
10441048 chkCompressed.Checked := Sess.Compressed;
10451049 spinQueryTimeout.Value := Sess.QueryTimeout;
@@ -1474,6 +1478,7 @@ procedure Tconnform.Modification(Sender: TObject);
14741478 or (Sess.LoginPrompt <> chkLoginPrompt.Checked)
14751479 or (Sess.WindowsAuth <> chkWindowsAuth.Checked)
14761480 or (Sess.CleartextPluginEnabled <> chkCleartextPluginEnabled.Checked)
1481+ or (Sess.ForceUnicode <> chkForceUnicode.Checked)
14771482 or (Sess.Port <> spinPort.Value )
14781483 or (Sess.Compressed <> chkCompressed.Checked)
14791484 or (Sess.QueryTimeout <> spinQueryTimeout.Value )
@@ -1511,7 +1516,8 @@ procedure Tconnform.Modification(Sender: TObject);
15111516 FSessionModified := FSessionModified or PasswordModified;
15121517 if (Sender=editHost) or (Sender=editUsername) or (Sender=editPassword) or
15131518 (Sender=comboNetType) or (Sender=chkWindowsAuth) or (Sender=spinPort) or
1514- (Sender=chkCleartextPluginEnabled) then begin
1519+ (Sender=chkCleartextPluginEnabled) or (Sender=chkForceUnicode)
1520+ then begin
15151521 // Be sure to use the modified connection params next time the user clicks the "Databases" pulldown
15161522 FreeAndNil(FPopupDatabases);
15171523 end ;
@@ -1629,6 +1635,14 @@ procedure Tconnform.ValidateControls;
16291635 lblSSHLocalPort.Enabled := Params.SSHActive;
16301636 spinSSHlocalport.Enabled := Params.SSHActive;
16311637 // Advanced tab:
1638+ lblQueryTimeout.Enabled := True;
1639+ spinQueryTimeout.Enabled := lblQueryTimeout.Enabled;
1640+ chkLocalTimeZone.Enabled := Params.NetTypeGroup = ngMySQL;
1641+ chkFullTableStatus.Enabled := (Params.NetTypeGroup in [ngMySQL, ngPgSQL, ngSQLite]) and (Params.NetType <> ntMySQL_ProxySQLAdmin);
1642+ chkCleartextPluginEnabled.Enabled := Params.NetTypeGroup = ngMySQL;
1643+ chkForceUnicode.Enabled := Params.NetTypeGroup = ngMySQL;
1644+ editLogFilePath.Enabled := Params.LogFileDdl or Params.LogFileDml;
1645+ // SSL tab:
16321646 chkWantSSL.Enabled := Params.NetType in [ntMySQL_TCPIP, ntMySQL_SSHtunnel, ntMySQL_ProxySQLAdmin, ntMySQL_RDS, ntPgSQL_TCPIP, ntPgSQL_SSHtunnel];
16331647 lblSSLPrivateKey.Enabled := Params.WantSSL;
16341648 editSSLPrivateKey.Enabled := Params.WantSSL;
@@ -1640,12 +1654,6 @@ procedure Tconnform.ValidateControls;
16401654 editSSLcipher.Enabled := Params.WantSSL;
16411655 lblSSLVerification.Enabled := Params.WantSSL;
16421656 comboSSLVerification.Enabled := Params.WantSSL;
1643- lblQueryTimeout.Enabled := True;
1644- spinQueryTimeout.Enabled := lblQueryTimeout.Enabled;
1645- chkLocalTimeZone.Enabled := Params.NetTypeGroup = ngMySQL;
1646- chkFullTableStatus.Enabled := (Params.NetTypeGroup in [ngMySQL, ngPgSQL, ngSQLite]) and (Params.NetType <> ntMySQL_ProxySQLAdmin);
1647- chkCleartextPluginEnabled.Enabled := Params.NetTypeGroup = ngMySQL;
1648- editLogFilePath.Enabled := Params.LogFileDdl or Params.LogFileDml;
16491657
16501658 Params.Free;
16511659 end ;
0 commit comments