From 2b5b69cc4d87b448e6e32c551daebc27820a340c Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Fri, 28 Dec 2012 20:09:28 +0000 Subject: [PATCH] Preparation for issue #3002: Move startup script and local time zone options together with SSL settings to a new "Advanced" tab. --- source/connections.dfm | 82 +++++++++++++++++++++--------------------- source/connections.pas | 12 +++---- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/source/connections.dfm b/source/connections.dfm index 15c29856..4ad46e9f 100644 --- a/source/connections.dfm +++ b/source/connections.dfm @@ -219,14 +219,6 @@ object connform: Tconnform DesignSize = ( 295 287) - object lblStartupScript: TLabel - Left = 3 - Top = 264 - Width = 69 - Height = 13 - Caption = 'Startup script:' - FocusControl = editStartupScript - end object lblPort: TLabel Left = 3 Top = 168 @@ -268,25 +260,11 @@ object connform: Tconnform end object lblDatabase: TLabel Left = 3 - Top = 239 + Top = 216 Width = 55 Height = 13 Caption = 'Databases:' end - object editStartupScript: TButtonedEdit - Left = 120 - Top = 261 - Width = 172 - Height = 21 - Anchors = [akLeft, akTop, akRight] - Images = MainForm.ImageListMain - RightButton.ImageIndex = 51 - RightButton.Visible = True - TabOrder = 11 - OnChange = Modification - OnDblClick = PickFile - OnRightButtonClick = PickFile - end object chkCompressed: TCheckBox Left = 120 Top = 190 @@ -364,11 +342,11 @@ object connform: Tconnform end object comboDatabases: TComboBox Left = 120 - Top = 236 + Top = 213 Width = 172 Height = 21 Anchors = [akLeft, akTop, akRight] - TabOrder = 10 + TabOrder = 9 TextHint = 'Separated by semicolon' OnChange = Modification OnDropDown = comboDatabasesDropDown @@ -394,19 +372,6 @@ object connform: Tconnform TabOrder = 3 OnClick = chkLoginPromptClick end - object chkLocalTimeZone: TCheckBox - Left = 120 - Top = 213 - Width = 172 - Height = 17 - Hint = - 'Use your client time zone in date/time SQL functions, e.g. NOW()' + - ', for MySQL 4.1.3+' - Anchors = [akLeft, akTop, akRight] - Caption = 'Set client time zone' - TabOrder = 9 - OnClick = Modification - end end object tabSSHtunnel: TTabSheet Caption = 'SSH tunnel' @@ -590,9 +555,9 @@ object connform: Tconnform Wrap = True end end - object tabSSLOptions: TTabSheet - Caption = 'SSL options' - ImageIndex = 144 + object tabAdvanced: TTabSheet + Caption = 'Advanced' + ImageIndex = 98 DesignSize = ( 295 287) @@ -620,6 +585,14 @@ object connform: Tconnform Caption = 'SSL certificate:' FocusControl = editSSLCertificate end + object lblStartupScript: TLabel + Left = 3 + Top = 156 + Width = 69 + Height = 13 + Caption = 'Startup script:' + FocusControl = editStartupScript + end object editSSLPrivateKey: TButtonedEdit Left = 120 Top = 36 @@ -672,6 +645,33 @@ object connform: Tconnform TabOrder = 0 OnClick = Modification end + object chkLocalTimeZone: TCheckBox + Left = 120 + Top = 130 + Width = 172 + Height = 17 + Hint = + 'Use your client time zone in date/time SQL functions, e.g. NOW()' + + ', for MySQL 4.1.3+' + Anchors = [akLeft, akTop, akRight] + Caption = 'Set client time zone' + TabOrder = 4 + OnClick = Modification + end + object editStartupScript: TButtonedEdit + Left = 120 + Top = 153 + Width = 172 + Height = 21 + Anchors = [akLeft, akTop, akRight] + Images = MainForm.ImageListMain + RightButton.ImageIndex = 51 + RightButton.Visible = True + TabOrder = 5 + OnChange = Modification + OnDblClick = PickFile + OnRightButtonClick = PickFile + end end object tabStatistics: TTabSheet Caption = 'Statistics' diff --git a/source/connections.pas b/source/connections.pas index 1122bfeb..baf83bc0 100644 --- a/source/connections.pas +++ b/source/connections.pas @@ -28,20 +28,18 @@ type TimerStatistics: TTimer; PageControlDetails: TPageControl; tabSettings: TTabSheet; - lblStartupScript: TLabel; lblPort: TLabel; lblPassword: TLabel; lblHost: TLabel; lblUsername: TLabel; lblNetworkType: TLabel; - editStartupScript: TButtonedEdit; chkCompressed: TCheckBox; editPort: TEdit; updownPort: TUpDown; editPassword: TEdit; editUsername: TEdit; editHost: TEdit; - tabSSLOptions: TTabSheet; + tabAdvanced: TTabSheet; lblSSLPrivateKey: TLabel; lblSSLCACertificate: TLabel; lblSSLCertificate: TLabel; @@ -84,7 +82,6 @@ type chkWantSSL: TCheckBox; btnImportSettings: TButton; timerSettingsImport: TTimer; - chkLocalTimeZone: TCheckBox; popupNew: TPopupMenu; menuNewSessionInRoot: TMenuItem; menuNewFolderInRoot: TMenuItem; @@ -92,6 +89,9 @@ type menuContextNewSessionInFolder: TMenuItem; menuNewSessionInFolder: TMenuItem; menuNewFolderInFolder: TMenuItem; + chkLocalTimeZone: TCheckBox; + editStartupScript: TButtonedEdit; + lblStartupScript: TLabel; procedure FormCreate(Sender: TObject); procedure btnOpenClick(Sender: TObject); procedure FormShow(Sender: TObject); @@ -700,7 +700,7 @@ begin tabStart.TabVisible := not SessionFocused; tabSettings.TabVisible := SessionFocused; tabSSHtunnel.TabVisible := SessionFocused; - tabSSLoptions.TabVisible := SessionFocused; + tabAdvanced.TabVisible := SessionFocused; tabStatistics.TabVisible := SessionFocused; menuNewSessionInFolder.Enabled := InFolder; menuNewFolderInFolder.Enabled := InFolder; @@ -999,7 +999,7 @@ begin lblPort.Enabled := False; // Named instance without port editPort.Enabled := lblPort.Enabled; updownPort.Enabled := lblPort.Enabled; - tabSSLoptions.TabVisible := Params.NetType = ntMySQL_TCPIP; + chkWantSSL.Enabled := Params.NetType = ntMySQL_TCPIP; lblSSLPrivateKey.Enabled := Params.WantSSL; editSSLPrivateKey.Enabled := Params.WantSSL; lblSSLCACertificate.Enabled := Params.WantSSL;