Browse Source

Add option to turn off Compiler Output colorization. Also turn on identation guides by default.

Martijn Laan 6 years ago
parent
commit
2ef5d021d2
4 changed files with 60 additions and 37 deletions
  1. 7 2
      Projects/CompForm.pas
  2. 49 30
      Projects/CompOptions.dfm
  3. 2 3
      Projects/CompOptions.pas
  4. 2 2
      whatsnew.htm

+ 7 - 2
Projects/CompForm.pas

@@ -268,6 +268,7 @@ type
       RunAsDifferentUser: Boolean;
       AutoComplete: Boolean;
       UseSyntaxHighlighting: Boolean;
+      ColorizeCompilerOutput: Boolean;
       UnderlineErrors: Boolean;
       CursorPastEOL: Boolean;
       TabWidth: Integer;
@@ -735,13 +736,14 @@ constructor TCompileForm.Create(AOwner: TComponent);
       FOptions.RunAsDifferentUser := Ini.ReadBool('Options', 'RunAsDifferentUser', False);
       FOptions.AutoComplete := Ini.ReadBool('Options', 'AutoComplete', True);
       FOptions.UseSyntaxHighlighting := Ini.ReadBool('Options', 'UseSynHigh', True);
+      FOptions.ColorizeCompilerOutput := Ini.ReadBool('Options', 'ColorizeCompilerOutput', True);
       FOptions.UnderlineErrors := Ini.ReadBool('Options', 'UnderlineErrors', True);
       FOptions.CursorPastEOL := Ini.ReadBool('Options', 'EditorCursorPastEOL', True);
       FOptions.TabWidth := Ini.ReadInteger('Options', 'TabWidth', 2);
       FOptions.UseTabCharacter := Ini.ReadBool('Options', 'UseTabCharacter', False);
       FOptions.WordWrap := Ini.ReadBool('Options', 'WordWrap', False);
       FOptions.AutoIndent := Ini.ReadBool('Options', 'AutoIndent', True);
-      FOptions.IndentationGuides := Ini.ReadBool('Options', 'IndentationGuides', False);
+      FOptions.IndentationGuides := Ini.ReadBool('Options', 'IndentationGuides', True);
       FOptions.GutterLineNumbers := Ini.ReadBool('Options', 'GutterLineNumbers', False);
       if GetACP = 932 then begin
         { Default to MS Gothic font on CP 932 (Japanese), as Courier New is
@@ -2522,6 +2524,7 @@ begin
     OptionsForm.RunAsDifferentUserCheck.Checked := FOptions.RunAsDifferentUser;
     OptionsForm.AutoCompleteCheck.Checked := FOptions.AutoComplete;
     OptionsForm.UseSynHighCheck.Checked := FOptions.UseSyntaxHighlighting;
+    OptionsForm.ColorizeCompilerOutputCheck.Checked := FOptions.ColorizeCompilerOutput;
     OptionsForm.UnderlineErrorsCheck.Checked := FOptions.UnderlineErrors;
     OptionsForm.CursorPastEOLCheck.Checked := FOptions.CursorPastEOL;
     OptionsForm.TabWidthEdit.Text := IntToStr(FOptions.TabWidth);
@@ -2545,6 +2548,7 @@ begin
     FOptions.RunAsDifferentUser := OptionsForm.RunAsDifferentUserCheck.Checked;
     FOptions.AutoComplete := OptionsForm.AutoCompleteCheck.Checked;
     FOptions.UseSyntaxHighlighting := OptionsForm.UseSynHighCheck.Checked;
+    FOptions.ColorizeCompilerOutput := OptionsForm.ColorizeCompilerOutputCheck.Checked;
     FOptions.UnderlineErrors := OptionsForm.UnderlineErrorsCheck.Checked;
     FOptions.CursorPastEOL := OptionsForm.CursorPastEOLCheck.Checked;
     FOptions.TabWidth := StrToInt(OptionsForm.TabWidthEdit.Text);
@@ -2574,6 +2578,7 @@ begin
       Ini.WriteBool('Options', 'RunAsDifferentUser', FOptions.RunAsDifferentUser);
       Ini.WriteBool('Options', 'AutoComplete', FOptions.AutoComplete);
       Ini.WriteBool('Options', 'UseSynHigh', FOptions.UseSyntaxHighlighting);
+      Ini.WriteBool('Options', 'ColorizeCompilerOutput', FOptions.ColorizeCompilerOutput);
       Ini.WriteBool('Options', 'UnderlineErrors', FOptions.UnderlineErrors);
       Ini.WriteBool('Options', 'EditorCursorPastEOL', FOptions.CursorPastEOL);
       Ini.WriteInteger('Options', 'TabWidth', FOptions.TabWidth);
@@ -3963,7 +3968,7 @@ begin
 
   Canvas.FillRect(Rect);
   Inc(Rect.Left, 2);
-  if not (odSelected in State) then
+  if FOptions.ColorizeCompilerOutput and not (odSelected in State) then
     Canvas.Font.Color := Color;
   Canvas.TextOut(Rect.Left, Rect.Top, S);
 end;

+ 49 - 30
Projects/CompOptions.dfm

@@ -4,7 +4,7 @@ object OptionsForm: TOptionsForm
   BorderIcons = [biSystemMenu]
   BorderStyle = bsDialog
   Caption = 'Options'
-  ClientHeight = 317
+  ClientHeight = 337
   ClientWidth = 589
   Color = clBtnFace
   Font.Charset = DEFAULT_CHARSET
@@ -15,13 +15,17 @@ object OptionsForm: TOptionsForm
   OldCreateOrder = True
   Position = poScreenCenter
   OnCreate = FormCreate
+  DesignSize = (
+    589
+    337)
   PixelsPerInch = 96
   TextHeight = 13
   object GroupBox1: TGroupBox
     Left = 8
     Top = 8
     Width = 281
-    Height = 201
+    Height = 221
+    Anchors = [akLeft, akTop, akBottom]
     Caption = ' Miscellaneous '
     TabOrder = 0
     object StartupCheck: TCheckBox
@@ -91,11 +95,13 @@ object OptionsForm: TOptionsForm
   end
   object GroupBox2: TGroupBox
     Left = 8
-    Top = 216
+    Top = 236
     Width = 281
     Height = 57
+    Anchors = [akLeft, akBottom]
     Caption = ' File Associations '
     TabOrder = 1
+    ExplicitTop = 216
     object AssocButton: TButton
       Left = 40
       Top = 20
@@ -110,7 +116,8 @@ object OptionsForm: TOptionsForm
     Left = 300
     Top = 8
     Width = 281
-    Height = 265
+    Height = 285
+    Anchors = [akLeft, akTop, akBottom]
     Caption = ' Editor '
     TabOrder = 2
     object AutoCompleteCheck: TCheckBox
@@ -131,124 +138,136 @@ object OptionsForm: TOptionsForm
     end
     object UnderlineErrorsCheck: TCheckBox
       Left = 8
-      Top = 56
+      Top = 76
       Width = 265
       Height = 17
       Caption = 'U&nderline syntax errors'
-      TabOrder = 2
+      TabOrder = 3
     end
     object CursorPastEOLCheck: TCheckBox
       Left = 8
-      Top = 76
+      Top = 96
       Width = 265
       Height = 17
       Caption = 'Allow cursor to move beyond &end of lines'
-      TabOrder = 3
+      TabOrder = 4
     end
     object WordWrapCheck: TCheckBox
       Left = 8
-      Top = 96
+      Top = 116
       Width = 265
       Height = 17
       Caption = 'W&ord wrap'
-      TabOrder = 4
+      TabOrder = 5
     end
     object UseTabCharacterCheck: TCheckBox
       Left = 8
-      Top = 116
+      Top = 136
       Width = 265
       Height = 17
       Caption = 'Use tab cha&racter'
-      TabOrder = 5
+      TabOrder = 6
     end
     object AutoIndentCheck: TCheckBox
       Left = 8
-      Top = 136
+      Top = 156
       Width = 265
       Height = 17
       Caption = 'Auto &indent mode'
-      TabOrder = 6
+      TabOrder = 7
     end
     object IndentationGuidesCheck: TCheckBox
       Left = 8
-      Top = 156
+      Top = 176
       Width = 265
       Height = 17
       Caption = 'Show indentation &guides'
-      TabOrder = 7
+      TabOrder = 8
     end
     object Label1: TNewStaticText
       Left = 8
-      Top = 205
+      Top = 225
       Width = 55
       Height = 14
       Caption = 'Editor Font:'
-      TabOrder = 9
+      TabOrder = 10
     end
     object FontPanel: TPanel
       Left = 72
-      Top = 196
+      Top = 216
       Width = 121
       Height = 32
       BevelKind = bkFlat
       BevelOuter = bvNone
       Caption = 'AaBbXxZz'
-      TabOrder = 10
+      TabOrder = 11
     end
     object ChangeFontButton: TButton
       Left = 200
-      Top = 201
+      Top = 221
       Width = 73
       Height = 23
       Caption = '&Change...'
-      TabOrder = 11
+      TabOrder = 12
       OnClick = ChangeFontButtonClick
     end
     object Label2: TNewStaticText
       Left = 8
-      Top = 239
+      Top = 259
       Width = 54
       Height = 14
       Caption = '&Tab Width:'
       FocusControl = TabWidthEdit
-      TabOrder = 12
+      TabOrder = 13
     end
     object TabWidthEdit: TEdit
       Left = 72
-      Top = 236
+      Top = 256
       Width = 41
       Height = 21
-      TabOrder = 13
+      TabOrder = 14
       OnChange = TabWidthEditChange
     end
     object GutterLineNumbersCheck: TCheckBox
       Left = 8
-      Top = 176
+      Top = 196
       Width = 265
       Height = 17
       Caption = 'Show &line numbers in gutter'
-      TabOrder = 8
+      TabOrder = 9
+    end
+    object ColorizeCompilerOutputCheck: TCheckBox
+      Left = 8
+      Top = 56
+      Width = 265
+      Height = 17
+      Caption = 'Colori&ze "Compiler Output" view'
+      TabOrder = 2
     end
   end
   object OKButton: TButton
     Left = 428
-    Top = 285
+    Top = 305
     Width = 73
     Height = 23
+    Anchors = [akLeft, akBottom]
     Caption = 'OK'
     Default = True
     ModalResult = 1
     TabOrder = 3
+    ExplicitTop = 285
   end
   object CancelButton: TButton
     Left = 508
-    Top = 285
+    Top = 305
     Width = 73
     Height = 23
+    Anchors = [akLeft, akBottom]
     Cancel = True
     Caption = 'Cancel'
     ModalResult = 2
     TabOrder = 4
+    ExplicitTop = 285
   end
   object FontDialog: TFontDialog
     Font.Charset = DEFAULT_CHARSET

+ 2 - 3
Projects/CompOptions.pas

@@ -2,13 +2,11 @@ unit CompOptions;
 
 {
   Inno Setup
-  Copyright (C) 1997-2010 Jordan Russell
+  Copyright (C) 1997-2018 Jordan Russell
   Portions by Martijn Laan
   For conditions of distribution and use, see LICENSE.TXT.
 
   Compiler Options form
-
-  $jrsoftware: issrc/Projects/CompOptions.pas,v 1.26 2010/10/30 04:29:19 jr Exp $
 }
 
 interface
@@ -48,6 +46,7 @@ type
     AutoCompleteCheck: TCheckBox;
     UnderlineErrorsCheck: TCheckBox;
     GutterLineNumbersCheck: TCheckBox;
+    ColorizeCompilerOutputCheck: TCheckBox;
     procedure AssocButtonClick(Sender: TObject);
     procedure ChangeFontButtonClick(Sender: TObject);
     procedure FormCreate(Sender: TObject);

+ 2 - 2
whatsnew.htm

@@ -90,9 +90,9 @@ For conditions of distribution and use, see <a href="http://www.jrsoftware.org/f
   <li>Compiler IDE changes:
   <ul>
     <li>Options button <i>Associate .iss files with this compiler</i> can now associate for the current user instead of displaying an error if administrative privileges are not available.</li>
-    <li>Option <i>Allow Undo after save</i> is now on by default for new installations.</li>
+    <li>Options <i>Allow Undo after save</i> and <i>Show indentation guides</i> are now on by default for new installations.</li>
     <li>Updated all icons and flattened the interface for a more modern look.</li>
-    <li>The "Compiler Output" view is now colorized.</li>
+    <li>The "Compiler Output" view is now colorized. This can be turned off in the options.</li>
     <li>The "Debug Output" view now uses bold text for any entry lines such as '-- File entry --'.</li>
   </ul>
   </li>