Ver código fonte

Add options UI.

Martijn Laan 1 mês atrás
pai
commit
aee9b00985

+ 4 - 0
Projects/Src/IDE.MainForm.pas

@@ -4522,9 +4522,11 @@ begin
     OptionsForm.StartupCheck.Checked := FOptions.ShowStartupForm;
     OptionsForm.WizardCheck.Checked := FOptions.UseWizard;
     OptionsForm.AutosaveCheck.Checked := FOptions.Autosave;
+    OptionsForm.AutoreloadCheck.Checked := FOptions.Autoreload;
     OptionsForm.BackupCheck.Checked := FOptions.MakeBackups;
     OptionsForm.FullPathCheck.Checked := FOptions.FullPathInTitleBar;
     OptionsForm.UndoAfterSaveCheck.Checked := FOptions.UndoAfterSave;
+    OptionsForm.UndoAfterReloadCheck.Checked := FOptions.UndoAfterReload;
     OptionsForm.PauseOnDebuggerExceptionsCheck.Checked := FOptions.PauseOnDebuggerExceptions;
     OptionsForm.RunAsDifferentUserCheck.Checked := FOptions.RunAsDifferentUser;
     OptionsForm.AutoAutoCompleteCheck.Checked := FOptions.AutoAutoComplete;
@@ -4556,9 +4558,11 @@ begin
     FOptions.ShowStartupForm := OptionsForm.StartupCheck.Checked;
     FOptions.UseWizard := OptionsForm.WizardCheck.Checked;
     FOptions.Autosave := OptionsForm.AutosaveCheck.Checked;
+    FOptions.Autoreload := OptionsForm.AutoreloadCheck.Checked;
     FOptions.MakeBackups := OptionsForm.BackupCheck.Checked;
     FOptions.FullPathInTitleBar := OptionsForm.FullPathCheck.Checked;
     FOptions.UndoAfterSave := OptionsForm.UndoAfterSaveCheck.Checked;
+    FOptions.UndoAfterReload := OptionsForm.UndoAfterReloadCheck.Checked;
     FOptions.PauseOnDebuggerExceptions := OptionsForm.PauseOnDebuggerExceptionsCheck.Checked;
     FOptions.RunAsDifferentUser := OptionsForm.RunAsDifferentUserCheck.Checked;
     FOptions.AutoAutoComplete := OptionsForm.AutoAutoCompleteCheck.Checked;

+ 28 - 12
Projects/Src/IDE.OptionsForm.dfm

@@ -70,35 +70,35 @@ object OptionsForm: TOptionsForm
     end
     object FullPathCheck: TCheckBox
       Left = 8
-      Top = 156
+      Top = 194
       Width = 265
       Height = 17
       Caption = 'Display &full path in title bar'
-      TabOrder = 7
+      TabOrder = 9
     end
     object PauseOnDebuggerExceptionsCheck: TCheckBox
       Left = 8
-      Top = 176
+      Top = 214
       Width = 265
       Height = 17
       Caption = '&Pause on exceptions'
-      TabOrder = 8
+      TabOrder = 10
     end
     object RunAsDifferentUserCheck: TCheckBox
       Left = 8
-      Top = 196
+      Top = 234
       Width = 265
       Height = 17
       Caption = 'Always &launch Setup/Uninstall as administrator'
-      TabOrder = 9
+      TabOrder = 11
     end
     object ColorizeCompilerOutputCheck: TCheckBox
       Left = 8
-      Top = 216
+      Top = 254
       Width = 265
       Height = 17
       Caption = 'Colori&ze "Compiler Output" view'
-      TabOrder = 10
+      TabOrder = 12
     end
     object OpenIncludedFilesCheck: TCheckBox
       Left = 8
@@ -118,20 +118,36 @@ object OptionsForm: TOptionsForm
     end
     object Label3: TNewStaticText
       Left = 8
-      Top = 243
+      Top = 281
       Width = 56
       Height = 14
       Caption = 'Menu &keys:'
       FocusControl = KeyMappingComboBox
-      TabOrder = 11
+      TabOrder = 13
     end
     object KeyMappingComboBox: TComboBox
       Left = 72
-      Top = 239
+      Top = 277
       Width = 201
       Height = 21
       Style = csDropDownList
-      TabOrder = 12
+      TabOrder = 14
+    end
+    object AutoreloadCheck: TCheckBox
+      Left = 8
+      Top = 156
+      Width = 265
+      Height = 17
+      Caption = 'Automatically reload files'
+      TabOrder = 7
+    end
+    object UndoAfterReloadCheck: TCheckBox
+      Left = 8
+      Top = 176
+      Width = 265
+      Height = 17
+      Caption = 'Allow Undo after reload'
+      TabOrder = 8
     end
   end
   object GroupBox2: TGroupBox

+ 3 - 1
Projects/Src/IDE.OptionsForm.pas

@@ -2,7 +2,7 @@ unit IDE.OptionsForm;
 
 {
   Inno Setup
-  Copyright (C) 1997-2024 Jordan Russell
+  Copyright (C) 1997-2025 Jordan Russell
   Portions by Martijn Laan
   For conditions of distribution and use, see LICENSE.TXT.
 
@@ -58,6 +58,8 @@ type
     Label5: TNewStaticText;
     MemoKeyMappingComboBox: TComboBox;
     ShowWhiteSpaceCheck: TCheckBox;
+    AutoreloadCheck: TCheckBox;
+    UndoAfterReloadCheck: TCheckBox;
     procedure AssocButtonClick(Sender: TObject);
     procedure ChangeFontButtonClick(Sender: TObject);
     procedure FormCreate(Sender: TObject);