From 34eb21170d04376935b2b8eadabc13a22c4733d2 Mon Sep 17 00:00:00 2001 From: Jordan Russell Date: Sun, 17 Nov 2024 23:42:27 -0600 Subject: [PATCH] Store UpdatePanel state in a separate key. Because they're not options. --- Projects/Src/IDE.MainForm.pas | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Projects/Src/IDE.MainForm.pas b/Projects/Src/IDE.MainForm.pas index d1755cca6..99469f0e1 100644 --- a/Projects/Src/IDE.MainForm.pas +++ b/Projects/Src/IDE.MainForm.pas @@ -86,7 +86,7 @@ TUpdatePanelMessage = class constructor Create(AMsg, AConfigIdent: String; AConfigValue: Integer); end; - TUpdatePanelMessages = TList; + TUpdatePanelMessages = TObjectList; TMainForm = class(TUIStateForm) MainMenu1: TMainMenu; @@ -806,7 +806,7 @@ constructor TMainForm.Create(AOwner: TComponent); procedure CheckUpdatePanelMessage(const Ini: TConfigIniFile; const ConfigIdent: String; const ConfigValueDefault, ConfigValueMinimum: Integer; const Msg: String); begin - var ConfigValue := Ini.ReadInteger('Options', ConfigIdent, ConfigValueDefault); + var ConfigValue := Ini.ReadInteger('UpdatePanel', ConfigIdent, ConfigValueDefault); if ConfigValue < ConfigValueMinimum then FUpdatePanelMessages.Add(TUpdatePanelMessage.Create(Msg, ConfigIdent, ConfigValueMinimum)); end; @@ -870,9 +870,9 @@ constructor TMainForm.Create(AOwner: TComponent); Memo.Font := FMainMemo.Font; { UpdatePanel visibility } - CheckUpdatePanelMessage(Ini, 'UpdatePanel.KnownVersion', 0, Integer(FCompilerVersion.BinVersion), + CheckUpdatePanelMessage(Ini, 'KnownVersion', 0, Integer(FCompilerVersion.BinVersion), 'Your version of Inno Setup has been updated. Click here to see what''s new.'); - CheckUpdatePanelMessage(Ini, 'UpdatePanel.VSCodeMemoKeyMap', 0, 1, + CheckUpdatePanelMessage(Ini, 'VSCodeMemoKeyMap', 0, 1, 'Support for Visual Studio Code-style editor shortcuts has been added. Click here to open the Options dialog and change the Editor Keys option.'); UpdateUpdatePanel; @@ -7745,7 +7745,7 @@ procedure TMainForm.UpdatePanelClosePaintBoxClick(Sender: TObject); var MessageToHideIndex := UpdateLinkLabel.Tag; var Ini := TConfigIniFile.Create; try - Ini.WriteInteger('Options', FUpdatePanelMessages[MessageToHideIndex].ConfigIdent, FUpdatePanelMessages[MessageToHideIndex].ConfigValue); + Ini.WriteInteger('UpdatePanel', FUpdatePanelMessages[MessageToHideIndex].ConfigIdent, FUpdatePanelMessages[MessageToHideIndex].ConfigValue); finally Ini.Free; end;