Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnlaan committed Jun 17, 2024
1 parent a12e548 commit 44213d8
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions Projects/Src/CompForm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ TCompileForm = class(TUIStateForm)
procedure BuildAndSaveBreakPointLines(const AMemo: TCompScintFileEdit);
procedure BuildAndSaveKnownIncludedAndHiddenFiles;
procedure CheckIfTerminated;
procedure ClearMRUMainFilesList;
procedure CloseTab(const TabIndex: Integer);
procedure CompileFile(AFilename: String; const ReadFromFile: Boolean);
procedure CompileIfNecessary;
Expand Down Expand Up @@ -1569,6 +1570,15 @@ function TCompileForm.ConfirmCloseFile(const PromptToSave: Boolean): Boolean;
end;
end;

procedure TCompileForm.ClearMRUMainFilesList;
begin
try
ClearMRUList(FMRUMainFilesList, 'ScriptFileHistoryNew');
except
{ Ignore any exceptions. }
end;
end;

procedure TCompileForm.ReadMRUMainFilesList;
begin
try
Expand Down Expand Up @@ -2447,12 +2457,9 @@ procedure TCompileForm.FPrintClick(Sender: TObject);

procedure TCompileForm.FClearRecentClick(Sender: TObject);
begin
if MsgBox('Are you sure you want to clear the recent files?', SCompilerFormCaption,
mbConfirmation, MB_YESNO or MB_DEFBUTTON2) <> IDNO then
try
ClearMRUList(FMRUMainFilesList, 'ScriptFileHistoryNew');
except
end;
if MsgBox('Are you sure you want to clear the list of recently opened files?',
SCompilerFormCaption, mbConfirmation, MB_YESNO or MB_DEFBUTTON2) <> IDNO then
ClearMRUMainFilesList;
end;

procedure TCompileForm.FMRUClick(Sender: TObject);
Expand Down

0 comments on commit 44213d8

Please sign in to comment.