From 4dcfd331edd40491c1a5698f8ac6f09ce295854e Mon Sep 17 00:00:00 2001 From: mattias Date: Tue, 31 Jan 2012 00:29:20 +0000 Subject: [PATCH] IDEIntf: deprecated TLazProject.ShortDescription git-svn-id: trunk@35045 - --- ide/frames/project_application_options.pas | 4 ++-- ide/main.pp | 2 +- ide/project.pp | 24 ++++++++++------------ ide/projectdefs.pas | 2 +- ideintf/projectintf.pas | 4 ++-- 5 files changed, 17 insertions(+), 19 deletions(-) diff --git a/ide/frames/project_application_options.pas b/ide/frames/project_application_options.pas index 836dd749a1..bac03f1bf6 100644 --- a/ide/frames/project_application_options.pas +++ b/ide/frames/project_application_options.pas @@ -215,7 +215,7 @@ begin FProject := AOptions as TProject; with FProject do begin - TitleEdit.Text := Title2; + TitleEdit.Text := Title; UseAppBundleCheckBox.Checked := UseAppBundle; UseXPManifestCheckBox.Checked := TProjectXPManifest(ProjResources[TProjectXPManifest]).UseManifest; DpiAwareCheckBox.Checked := TProjectXPManifest(ProjResources[TProjectXPManifest]).DpiAware; @@ -235,7 +235,7 @@ var begin with AOptions as TProject do begin - Title2 := TitleEdit.Text; + Title := TitleEdit.Text; AStream := GetIconAsStream; try TProjectIcon(ProjResources[TProjectIcon]).SetStream(AStream); diff --git a/ide/main.pp b/ide/main.pp index 0d00a29adc..f007250038 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -8398,7 +8398,7 @@ begin // change title if TitleWasDefault then begin - Project1.Title2:=Project1.GetDefaultTitle; + Project1.Title:=Project1.GetDefaultTitle; // title does not need to be removed from source, because it was default end; diff --git a/ide/project.pp b/ide/project.pp index a8ea28a635..7b3acade23 100644 --- a/ide/project.pp +++ b/ide/project.pp @@ -2571,7 +2571,7 @@ begin UpdateProjectDirectory; FPublishOptions:=TPublishProjectOptions.Create(Self); FRunParameters:=TRunParamsOptions.Create; - Title2 := ''; + Title := ''; FUnitList := TFPList.Create; // list of TUnitInfo FResources := TProjectResources.Create(Self); @@ -2848,7 +2848,7 @@ begin xmlconfig.SetValue(Path+'General/MainUnit/Value', MainUnitID); // always write a value to support opening by older IDEs (<=0.9.28). This can be changed in a few released. xmlconfig.SetDeleteValue(Path+'General/AutoCreateForms/Value', AutoCreateForms,true); - xmlconfig.SetDeleteValue(Path+'General/Title/Value', Title2,''); + xmlconfig.SetDeleteValue(Path+'General/Title/Value', Title,''); xmlconfig.SetDeleteValue(Path+'General/UseAppBundle/Value', UseAppBundle, True); // fpdoc @@ -3058,14 +3058,14 @@ end; function TProject.GetTitle: string; begin - Result:=Title2; + Result:=Title; MacroEngine.SubstituteStr(Result); end; function TProject.TitleIsDefault(Fuzzy: boolean): boolean; begin - Result:=(Title2='') or (Title2=GetDefaultTitle) - or (Fuzzy and (SysUtils.CompareText(Title2,GetDefaultTitle)=0)); + Result:=(Title='') or (Title=GetDefaultTitle) + or (Fuzzy and (SysUtils.CompareText(Title,GetDefaultTitle)=0)); end; function TProject.IDAsString: string; @@ -3415,7 +3415,7 @@ begin // automatically fixes broken lpi files. if not LoadParts then begin NewMainUnitID := xmlconfig.GetValue(Path+'General/MainUnit/Value', 0); - Title2 := xmlconfig.GetValue(Path+'General/Title/Value', ''); + Title := xmlconfig.GetValue(Path+'General/Title/Value', ''); UseAppBundle := xmlconfig.GetValue(Path+'General/UseAppBundle/Value', True); AutoCreateForms := xmlconfig.GetValue( Path+'General/AutoCreateForms/Value', true); @@ -3752,7 +3752,7 @@ begin ClearSourceDirectories; UpdateProjectDirectory; FPublishOptions.Clear; - Title2 := ''; + Title := ''; Modified := false; SessionModified := false; @@ -4312,19 +4312,17 @@ end; procedure TProject.SetProjectInfoFile(const NewFilename:string); var NewProjectInfoFile: String; - OldProjectInfoFile: String; - DefaultTitle: String; + TitleWasDefault: Boolean; begin NewProjectInfoFile:=TrimFilename(NewFilename); if NewProjectInfoFile='' then exit; DoDirSeparators(NewProjectInfoFile); if fProjectInfoFile=NewProjectInfoFile then exit; BeginUpdate(true); - OldProjectInfoFile:=fProjectInfoFile; + TitleWasDefault:=(Title<>'') and TitleIsDefault(true); fProjectInfoFile:=NewProjectInfoFile; - DefaultTitle:=ExtractFileNameOnly(OldProjectInfoFile); - if TitleIsDefault(true) then - Title2:=DefaultTitle; + if TitleWasDefault then + Title:=GetDefaultTitle; UpdateProjectDirectory; UpdateSessionFilename; if Assigned(OnChangeProjectInfoFile) then diff --git a/ide/projectdefs.pas b/ide/projectdefs.pas index 0ba8b063b7..2898257aba 100644 --- a/ide/projectdefs.pas +++ b/ide/projectdefs.pas @@ -1672,7 +1672,7 @@ begin If (T<>'') then begin AProject.Flags:=AProject.Flags+[pfMainUnitHasTitleStatement]; - AProject.Title2:=T; + AProject.Title:=T; NewSource.Add(' Application.Title:='''+T+''';'); end; NewSource.Add(' Application.Run;'); diff --git a/ideintf/projectintf.pas b/ideintf/projectintf.pas index 573602cf02..55c0fdaec6 100644 --- a/ideintf/projectintf.pas +++ b/ideintf/projectintf.pas @@ -442,7 +442,7 @@ type property Files[Index: integer]: TLazProjectFile read GetFiles; property FileCount: integer read GetFileCount; property MainFile: TLazProjectFile read GetMainFile; - property Title2: String read FTitle write SetTitle; + property Title: String read FTitle write SetTitle; property Flags: TProjectFlags read FFlags write SetFlags; property ExecutableType: TProjectExecutableType read FExecutableType write SetExecutableType;// read from MainFile, not saved to lpi @@ -1009,7 +1009,7 @@ end; function TProjectDescriptor.InitProject(AProject: TLazProject): TModalResult; begin - AProject.Title2:='project1'; + AProject.Title:='project1'; AProject.Flags:=Flags; Result:=mrOk; end;