From bc21345f7d6dc6fd95a9458ffc96dcbe967995bb Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 11 Jan 2012 09:03:24 +0000 Subject: [PATCH] IDE: internal about ide: modified packages git-svn-id: trunk@34707 - --- ide/ideinfodlg.pas | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/ide/ideinfodlg.pas b/ide/ideinfodlg.pas index bea3bb65d8..edaa22ec26 100644 --- a/ide/ideinfodlg.pas +++ b/ide/ideinfodlg.pas @@ -32,7 +32,7 @@ interface uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, ComCtrls, DefineTemplates, EnvironmentOpts, AboutFrm, LazConf, - LazarusIDEStrConsts, Project, SourceEditor; + LazarusIDEStrConsts, Project, SourceEditor, PackageSystem, PackageDefs; type @@ -53,6 +53,7 @@ type procedure GatherGlobalOptions(sl: TStrings); // modified procedure GatherModifiedProject(AProject: TProject; sl: TStrings); + procedure GatherModifiedPackages(sl: TStrings); public procedure UpdateGeneralMemo; procedure UpdateModifiedMemo; @@ -88,6 +89,7 @@ begin UpdateGeneralMemo; UpdateModifiedMemo; + PageControl1.ActivePage:=GeneralTabSheet; end; procedure TIDEInfoDialog.GatherIDEVersion(sl: TStrings); @@ -161,6 +163,7 @@ begin sl.Add('Project.BuildModes.IsModified data'); if AProject.BuildModes.IsModified(true) then sl.Add('Project.BuildModes.IsModified session'); + sl.Add(''); // details HeaderWritten:=false; @@ -170,7 +173,6 @@ begin or ((aFile.Source<>nil) and aFile.Source.Modified) then begin if not HeaderWritten then begin - sl.Add(''); sl.Add('Project units:'); s:=aFile.GetShortFilename(true); if aFile.Modified then @@ -184,6 +186,29 @@ begin end; aFile:=aFile.NextPartOfProject; end; + if HeaderWritten then + sl.Add(''); +end; + +procedure TIDEInfoDialog.GatherModifiedPackages(sl: TStrings); +var + i: Integer; + Pkg: TLazPackage; + HeaderWritten: Boolean; +begin + HeaderWritten:=false; + for i:=0 to PackageGraph.Count-1 do begin + Pkg:=PackageGraph[i]; + if Pkg.Modified then begin + if not HeaderWritten then begin + HeaderWritten:=true; + sl.Add('Packages:'); + end; + sl.Add(Pkg.Name); + end; + end; + if HeaderWritten then + sl.Add(''); end; procedure TIDEInfoDialog.UpdateGeneralMemo; @@ -209,6 +234,7 @@ begin sl:=TStringList.Create; try GatherModifiedProject(Project1,sl); + GatherModifiedPackages(sl); ModifiedMemo.Lines.Assign(sl); finally sl.Free;