Преглед изворни кода

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

Martijn Laan пре 6 година
родитељ
комит
2ef5d021d2
4 измењених фајлова са 60 додато и 37 уклоњено
  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;
       RunAsDifferentUser: Boolean;
       AutoComplete: Boolean;
       AutoComplete: Boolean;
       UseSyntaxHighlighting: Boolean;
       UseSyntaxHighlighting: Boolean;
+      ColorizeCompilerOutput: Boolean;
       UnderlineErrors: Boolean;
       UnderlineErrors: Boolean;
       CursorPastEOL: Boolean;
       CursorPastEOL: Boolean;
       TabWidth: Integer;
       TabWidth: Integer;
@@ -735,13 +736,14 @@ constructor TCompileForm.Create(AOwner: TComponent);
       FOptions.RunAsDifferentUser := Ini.ReadBool('Options', 'RunAsDifferentUser', False);
       FOptions.RunAsDifferentUser := Ini.ReadBool('Options', 'RunAsDifferentUser', False);
       FOptions.AutoComplete := Ini.ReadBool('Options', 'AutoComplete', True);
       FOptions.AutoComplete := Ini.ReadBool('Options', 'AutoComplete', True);
       FOptions.UseSyntaxHighlighting := Ini.ReadBool('Options', 'UseSynHigh', True);
       FOptions.UseSyntaxHighlighting := Ini.ReadBool('Options', 'UseSynHigh', True);
+      FOptions.ColorizeCompilerOutput := Ini.ReadBool('Options', 'ColorizeCompilerOutput', True);
       FOptions.UnderlineErrors := Ini.ReadBool('Options', 'UnderlineErrors', True);
       FOptions.UnderlineErrors := Ini.ReadBool('Options', 'UnderlineErrors', True);
       FOptions.CursorPastEOL := Ini.ReadBool('Options', 'EditorCursorPastEOL', True);
       FOptions.CursorPastEOL := Ini.ReadBool('Options', 'EditorCursorPastEOL', True);
       FOptions.TabWidth := Ini.ReadInteger('Options', 'TabWidth', 2);
       FOptions.TabWidth := Ini.ReadInteger('Options', 'TabWidth', 2);
       FOptions.UseTabCharacter := Ini.ReadBool('Options', 'UseTabCharacter', False);
       FOptions.UseTabCharacter := Ini.ReadBool('Options', 'UseTabCharacter', False);
       FOptions.WordWrap := Ini.ReadBool('Options', 'WordWrap', False);
       FOptions.WordWrap := Ini.ReadBool('Options', 'WordWrap', False);
       FOptions.AutoIndent := Ini.ReadBool('Options', 'AutoIndent', True);
       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);
       FOptions.GutterLineNumbers := Ini.ReadBool('Options', 'GutterLineNumbers', False);
       if GetACP = 932 then begin
       if GetACP = 932 then begin
         { Default to MS Gothic font on CP 932 (Japanese), as Courier New is
         { Default to MS Gothic font on CP 932 (Japanese), as Courier New is
@@ -2522,6 +2524,7 @@ begin
     OptionsForm.RunAsDifferentUserCheck.Checked := FOptions.RunAsDifferentUser;
     OptionsForm.RunAsDifferentUserCheck.Checked := FOptions.RunAsDifferentUser;
     OptionsForm.AutoCompleteCheck.Checked := FOptions.AutoComplete;
     OptionsForm.AutoCompleteCheck.Checked := FOptions.AutoComplete;
     OptionsForm.UseSynHighCheck.Checked := FOptions.UseSyntaxHighlighting;
     OptionsForm.UseSynHighCheck.Checked := FOptions.UseSyntaxHighlighting;
+    OptionsForm.ColorizeCompilerOutputCheck.Checked := FOptions.ColorizeCompilerOutput;
     OptionsForm.UnderlineErrorsCheck.Checked := FOptions.UnderlineErrors;
     OptionsForm.UnderlineErrorsCheck.Checked := FOptions.UnderlineErrors;
     OptionsForm.CursorPastEOLCheck.Checked := FOptions.CursorPastEOL;
     OptionsForm.CursorPastEOLCheck.Checked := FOptions.CursorPastEOL;
     OptionsForm.TabWidthEdit.Text := IntToStr(FOptions.TabWidth);
     OptionsForm.TabWidthEdit.Text := IntToStr(FOptions.TabWidth);
@@ -2545,6 +2548,7 @@ begin
     FOptions.RunAsDifferentUser := OptionsForm.RunAsDifferentUserCheck.Checked;
     FOptions.RunAsDifferentUser := OptionsForm.RunAsDifferentUserCheck.Checked;
     FOptions.AutoComplete := OptionsForm.AutoCompleteCheck.Checked;
     FOptions.AutoComplete := OptionsForm.AutoCompleteCheck.Checked;
     FOptions.UseSyntaxHighlighting := OptionsForm.UseSynHighCheck.Checked;
     FOptions.UseSyntaxHighlighting := OptionsForm.UseSynHighCheck.Checked;
+    FOptions.ColorizeCompilerOutput := OptionsForm.ColorizeCompilerOutputCheck.Checked;
     FOptions.UnderlineErrors := OptionsForm.UnderlineErrorsCheck.Checked;
     FOptions.UnderlineErrors := OptionsForm.UnderlineErrorsCheck.Checked;
     FOptions.CursorPastEOL := OptionsForm.CursorPastEOLCheck.Checked;
     FOptions.CursorPastEOL := OptionsForm.CursorPastEOLCheck.Checked;
     FOptions.TabWidth := StrToInt(OptionsForm.TabWidthEdit.Text);
     FOptions.TabWidth := StrToInt(OptionsForm.TabWidthEdit.Text);
@@ -2574,6 +2578,7 @@ begin
       Ini.WriteBool('Options', 'RunAsDifferentUser', FOptions.RunAsDifferentUser);
       Ini.WriteBool('Options', 'RunAsDifferentUser', FOptions.RunAsDifferentUser);
       Ini.WriteBool('Options', 'AutoComplete', FOptions.AutoComplete);
       Ini.WriteBool('Options', 'AutoComplete', FOptions.AutoComplete);
       Ini.WriteBool('Options', 'UseSynHigh', FOptions.UseSyntaxHighlighting);
       Ini.WriteBool('Options', 'UseSynHigh', FOptions.UseSyntaxHighlighting);
+      Ini.WriteBool('Options', 'ColorizeCompilerOutput', FOptions.ColorizeCompilerOutput);
       Ini.WriteBool('Options', 'UnderlineErrors', FOptions.UnderlineErrors);
       Ini.WriteBool('Options', 'UnderlineErrors', FOptions.UnderlineErrors);
       Ini.WriteBool('Options', 'EditorCursorPastEOL', FOptions.CursorPastEOL);
       Ini.WriteBool('Options', 'EditorCursorPastEOL', FOptions.CursorPastEOL);
       Ini.WriteInteger('Options', 'TabWidth', FOptions.TabWidth);
       Ini.WriteInteger('Options', 'TabWidth', FOptions.TabWidth);
@@ -3963,7 +3968,7 @@ begin
 
 
   Canvas.FillRect(Rect);
   Canvas.FillRect(Rect);
   Inc(Rect.Left, 2);
   Inc(Rect.Left, 2);
-  if not (odSelected in State) then
+  if FOptions.ColorizeCompilerOutput and not (odSelected in State) then
     Canvas.Font.Color := Color;
     Canvas.Font.Color := Color;
   Canvas.TextOut(Rect.Left, Rect.Top, S);
   Canvas.TextOut(Rect.Left, Rect.Top, S);
 end;
 end;

+ 49 - 30
Projects/CompOptions.dfm

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

+ 2 - 3
Projects/CompOptions.pas

@@ -2,13 +2,11 @@ unit CompOptions;
 
 
 {
 {
   Inno Setup
   Inno Setup
-  Copyright (C) 1997-2010 Jordan Russell
+  Copyright (C) 1997-2018 Jordan Russell
   Portions by Martijn Laan
   Portions by Martijn Laan
   For conditions of distribution and use, see LICENSE.TXT.
   For conditions of distribution and use, see LICENSE.TXT.
 
 
   Compiler Options form
   Compiler Options form
-
-  $jrsoftware: issrc/Projects/CompOptions.pas,v 1.26 2010/10/30 04:29:19 jr Exp $
 }
 }
 
 
 interface
 interface
@@ -48,6 +46,7 @@ type
     AutoCompleteCheck: TCheckBox;
     AutoCompleteCheck: TCheckBox;
     UnderlineErrorsCheck: TCheckBox;
     UnderlineErrorsCheck: TCheckBox;
     GutterLineNumbersCheck: TCheckBox;
     GutterLineNumbersCheck: TCheckBox;
+    ColorizeCompilerOutputCheck: TCheckBox;
     procedure AssocButtonClick(Sender: TObject);
     procedure AssocButtonClick(Sender: TObject);
     procedure ChangeFontButtonClick(Sender: TObject);
     procedure ChangeFontButtonClick(Sender: TObject);
     procedure FormCreate(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:
   <li>Compiler IDE changes:
   <ul>
   <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>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>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>
     <li>The "Debug Output" view now uses bold text for any entry lines such as '-- File entry --'.</li>
   </ul>
   </ul>
   </li>
   </li>