mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-27 18:41:36 +01:00
IDE: add example projects to recent menu only once
git-svn-id: trunk@41319 -
This commit is contained in:
parent
d181c76fe3
commit
4a609e7a5a
@ -335,6 +335,9 @@ type
|
|||||||
FNewUnitTemplate: string;
|
FNewUnitTemplate: string;
|
||||||
FFileDialogFilter: string;
|
FFileDialogFilter: string;
|
||||||
|
|
||||||
|
// Prevent repopulating Recent project files menu with example projects if it was already cleared up.
|
||||||
|
FAlreadyPopulatedRecentFiles : Boolean;
|
||||||
|
|
||||||
function GetCompilerFilename: string;
|
function GetCompilerFilename: string;
|
||||||
function GetCompilerMessagesFilename: string;
|
function GetCompilerMessagesFilename: string;
|
||||||
function GetDebuggerEventLogColors(AIndex: TDBGEventType): TDebuggerEventLogColor;
|
function GetDebuggerEventLogColors(AIndex: TDBGEventType): TDebuggerEventLogColor;
|
||||||
@ -1268,13 +1271,16 @@ begin
|
|||||||
LoadRecentList(XMLConfig,FRecentPackageFiles,
|
LoadRecentList(XMLConfig,FRecentPackageFiles,
|
||||||
Path+'Recent/PackageFiles/',rltFile);
|
Path+'Recent/PackageFiles/',rltFile);
|
||||||
|
|
||||||
|
FAlreadyPopulatedRecentFiles := XMLConfig.GetValue(Path+'Recent/AlreadyPopulated', false);
|
||||||
|
|
||||||
// Add example projects to an empty project list if examples have write access
|
// Add example projects to an empty project list if examples have write access
|
||||||
if FRecentProjectFiles.count=0 then begin
|
if (FRecentProjectFiles.count=0) and (not FAlreadyPopulatedRecentFiles) then begin
|
||||||
AddRecentProjectInitial('examples/jpeg/', 'jpegexample.lpi');
|
AddRecentProjectInitial('examples/jpeg/', 'jpegexample.lpi');
|
||||||
AddRecentProjectInitial('examples/sprites/', 'spriteexample.lpi');
|
AddRecentProjectInitial('examples/sprites/', 'spriteexample.lpi');
|
||||||
AddRecentProjectInitial('examples/openglcontrol/', 'openglcontrol_demo.lpi');
|
AddRecentProjectInitial('examples/openglcontrol/', 'openglcontrol_demo.lpi');
|
||||||
AddRecentProjectInitial('examples/barchart/', 'chartdemo.lpi');
|
AddRecentProjectInitial('examples/barchart/', 'chartdemo.lpi');
|
||||||
AddRecentProjectInitial('examples/', 'hello.lpi');
|
AddRecentProjectInitial('examples/', 'hello.lpi');
|
||||||
|
FAlreadyPopulatedRecentFiles := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// external tools
|
// external tools
|
||||||
@ -1609,6 +1615,8 @@ begin
|
|||||||
SaveRecentList(XMLConfig,FRecentPackageFiles,
|
SaveRecentList(XMLConfig,FRecentPackageFiles,
|
||||||
Path+'Recent/PackageFiles/');
|
Path+'Recent/PackageFiles/');
|
||||||
|
|
||||||
|
XMLConfig.SetValue(Path+'Recent/AlreadyPopulated', FAlreadyPopulatedRecentFiles);
|
||||||
|
|
||||||
// external tools
|
// external tools
|
||||||
fExternalTools.Save(FConfigStore,Path+'ExternalTools/');
|
fExternalTools.Save(FConfigStore,Path+'ExternalTools/');
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user