浏览代码

Removing log window (from GUI only, will remove the code, once we see that users says about this)

Source commit: b04ce9f564681a997cb069aa9b530924e18a03e9
Martin Prikryl 9 年之前
父节点
当前提交
6c55730f10

+ 1 - 0
source/forms/NonVisual.dfm

@@ -660,6 +660,7 @@ object NonVisualDataModule: TNonVisualDataModule
       HelpKeyword = 'ui_log'
       Hint = 'Show/hide log window'
       ImageIndex = 24
+      Visible = False
     end
     object NewSessionAction: TAction
       Tag = 15

+ 0 - 30
source/forms/Preferences.cpp

@@ -575,24 +575,6 @@ void __fastcall TPreferencesDialog::LoadConfiguration()
     {
       LogFileOverwriteButton->Checked = true;
     }
-    LogShowWindowCheck->Checked = (CustomWinConfiguration->LogView == lvWindow);
-    if (Configuration->LogWindowComplete)
-    {
-      LogWindowCompleteButton->Checked = true;
-    }
-    else
-    {
-      LogWindowLinesButton->Checked = true;
-    }
-
-    if (!Configuration->LogWindowComplete)
-    {
-      LogWindowLinesEdit->AsInteger = Configuration->LogWindowLines;
-    }
-    else
-    {
-      LogWindowLinesEdit->AsInteger = 500;
-    }
     BOOLPROP(LogSensitive);
 
     EnableActionsLoggingCheck->Checked = Configuration->LogActions;
@@ -874,12 +856,6 @@ void __fastcall TPreferencesDialog::SaveConfiguration()
     Configuration->LogProtocol = LogProtocolCombo->ItemIndex;
     Configuration->LogFileName = LogToFileCheck->Checked ? LogFileNameEdit3->Text : UnicodeString();
     Configuration->LogFileAppend = LogFileAppendButton->Checked;
-    CustomWinConfiguration->LogView = LogShowWindowCheck->Checked ? lvWindow : lvNone;
-    Configuration->LogWindowComplete = LogWindowCompleteButton->Checked;
-    if (!LogWindowCompleteButton->Checked)
-    {
-      Configuration->LogWindowLines = LogWindowLinesEdit->AsInteger;
-    }
     BOOLPROP(LogSensitive);
 
     Configuration->LogActions = EnableActionsLoggingCheck->Checked;
@@ -1255,12 +1231,6 @@ void __fastcall TPreferencesDialog::UpdateControls()
     EnableControl(LogFileAppendButton, LogFileNameEdit3->Enabled);
     EnableControl(LogFileOverwriteButton, LogFileNameEdit3->Enabled);
 
-    EnableControl(LogShowWindowCheck, LogProtocolCombo->Enabled);
-    EnableControl(LogWindowCompleteButton, LogShowWindowCheck->Enabled && LogShowWindowCheck->Checked);
-    EnableControl(LogWindowLinesButton, LogWindowCompleteButton->Enabled);
-    EnableControl(LogWindowLinesEdit, LogWindowLinesButton->Enabled && LogWindowLinesButton->Checked);
-    EnableControl(LogWindowLinesText, LogWindowLinesEdit->Enabled);
-
     EnableControl(LogSensitiveCheck, LogProtocolCombo->Enabled);
 
     EnableControl(ActionsLogFileNameEdit, EnableActionsLoggingCheck->Checked);

+ 5 - 55
source/forms/Preferences.dfm

@@ -264,21 +264,13 @@ object PreferencesDialog: TPreferencesDialog
           Left = 8
           Top = 8
           Width = 389
-          Height = 214
+          Height = 147
           Anchors = [akLeft, akTop, akRight]
           Caption = 'Session log'
           TabOrder = 0
           DesignSize = (
             389
-            214)
-          object LogWindowLinesText: TLabel
-            Left = 327
-            Top = 163
-            Width = 21
-            Height = 13
-            Anchors = [akTop, akRight]
-            Caption = 'lines'
-          end
+            147)
           object LogToFileCheck: TCheckBox
             Left = 16
             Top = 47
@@ -308,48 +300,6 @@ object PreferencesDialog: TPreferencesDialog
             Text = 'LogFileNameEdit3'
             OnChange = ControlChange
           end
-          object LogShowWindowCheck: TCheckBox
-            Left = 16
-            Top = 120
-            Width = 327
-            Height = 17
-            Caption = 'Show log &window:'
-            TabOrder = 6
-            OnClick = ControlChange
-          end
-          object LogWindowCompleteButton: TRadioButton
-            Left = 40
-            Top = 140
-            Width = 303
-            Height = 17
-            Caption = 'Display &complete session'
-            TabOrder = 7
-            OnClick = ControlChange
-          end
-          object LogWindowLinesButton: TRadioButton
-            Left = 40
-            Top = 163
-            Width = 186
-            Height = 17
-            Anchors = [akLeft, akTop, akRight]
-            Caption = 'Display only &last '
-            TabOrder = 8
-            OnClick = ControlChange
-          end
-          object LogWindowLinesEdit: TUpDownEdit
-            Left = 232
-            Top = 159
-            Width = 89
-            Height = 21
-            Alignment = taRightJustify
-            Increment = 50.000000000000000000
-            MaxValue = 10000.000000000000000000
-            MinValue = 50.000000000000000000
-            Value = 50.000000000000000000
-            Anchors = [akTop, akRight]
-            TabOrder = 9
-            OnChange = ControlChange
-          end
           object LogFilePanel: TPanel
             Left = 40
             Top = 93
@@ -415,18 +365,18 @@ object PreferencesDialog: TPreferencesDialog
           end
           object LogSensitiveCheck: TCheckBox
             Left = 16
-            Top = 187
+            Top = 120
             Width = 359
             Height = 17
             Anchors = [akLeft, akTop, akRight]
             Caption = 'Log passwor&ds and other sensitive information'
-            TabOrder = 10
+            TabOrder = 6
             OnClick = ControlChange
           end
         end
         object ActionsLoggingGroup: TGroupBox
           Left = 8
-          Top = 227
+          Top = 160
           Width = 389
           Height = 86
           Anchors = [akLeft, akTop, akRight]

+ 0 - 5
source/forms/Preferences.h

@@ -252,13 +252,8 @@ __published:
   TLabel *LanguageChangeLabel;
   TButton *LanguagesGetMoreButton;
   TGroupBox *LoggingGroup;
-  TLabel *LogWindowLinesText;
   TCheckBox *LogToFileCheck;
   TFilenameEdit *LogFileNameEdit3;
-  TCheckBox *LogShowWindowCheck;
-  TRadioButton *LogWindowCompleteButton;
-  TRadioButton *LogWindowLinesButton;
-  TUpDownEdit *LogWindowLinesEdit;
   TPanel *LogFilePanel;
   TRadioButton *LogFileAppendButton;
   TRadioButton *LogFileOverwriteButton;

+ 0 - 40
source/windows/TerminalManager.cpp

@@ -286,19 +286,6 @@ bool __fastcall TTerminalManager::ConnectActiveTerminalImpl(bool Reopen)
     try
     {
       DebugAssert(ActiveTerminal);
-      bool ShowLogPending = false;
-
-      if (Configuration->Logging && (WinConfiguration->LogView == lvWindow))
-      {
-        if (WinConfiguration->LogWindowOnStartup)
-        {
-          RequireLogForm(LogMemo);
-        }
-        else
-        {
-          ShowLogPending = true;
-        }
-      }
 
       ConnectTerminal(ActiveTerminal, Reopen);
 
@@ -310,16 +297,6 @@ bool __fastcall TTerminalManager::ConnectActiveTerminalImpl(bool Reopen)
 
       WinConfiguration->ClearTemporaryLoginData();
 
-      if (LogForm && (WinConfiguration->LogView != lvWindow))
-      {
-        FreeLogForm();
-      }
-
-      if (ShowLogPending)
-      {
-        RequireLogForm(LogMemo);
-      }
-
       Result = true;
     }
     catch(Exception & E)
@@ -622,10 +599,6 @@ void __fastcall TTerminalManager::DoSetActiveTerminal(TTerminal * value, bool Au
     }
     else
     {
-      if (LogForm)
-      {
-        FreeLogForm();
-      }
       FreeLogMemo();
       if (OnLastTerminalClosed)
       {
@@ -1196,19 +1169,6 @@ void __fastcall TTerminalManager::ConfigurationChange(TObject * /*Sender*/)
   DebugAssert(Configuration);
   DebugAssert(Configuration == WinConfiguration);
 
-  if (!Application->Terminated && Configuration->Logging &&
-      (WinConfiguration->LogView == lvWindow))
-  {
-    if (ActiveTerminal)
-    {
-      RequireLogForm(LogMemo);
-    }
-  }
-    else
-  {
-    FreeLogForm();
-  }
-
   TTerminalQueue * Queue;
   for (int Index = 0; Index < Count; Index++)
   {