ide: change TaskBar caption together with MainBar title bar caption (for widgetsets which supports Application.Title)

git-svn-id: trunk@23189 -
This commit is contained in:
paul 2009-12-18 17:18:19 +00:00
parent c632b48e5e
commit 5e5b4cb3b2

View File

@ -11497,20 +11497,24 @@ begin
end;
procedure TMainIDE.UpdateCaption;
var NewCaption: string;
ProjectName: String;
var
NewCaption, NewTitle, ProjectName: String;
begin
if MainIDEBar=nil then exit;
if ToolStatus = itExiting then exit;
if MainIDEBar = nil then Exit;
if ToolStatus = itExiting then Exit;
NewCaption := Format(lisLazarusEditorV, [GetLazarusVersionString]);
if MainBarSubTitle<>'' then begin
NewCaption:=NewCaption+' - '+MainBarSubTitle;
end else begin
if Project1<>nil then begin
NewTitle := NewCaption;
if MainBarSubTitle <> '' then
NewCaption := NewCaption + ' - ' + MainBarSubTitle
else
begin
if Project1 <> nil then
begin
ProjectName := '';
if Project1.Title <> '' then
ProjectName := Project1.Title
else if Project1.ProjectInfoFile<>'' then
else
if Project1.ProjectInfoFile <> '' then
ProjectName := ExtractFileName(Project1.ProjectInfoFile);
if ProjectName <> '' then
begin
@ -11518,8 +11522,10 @@ begin
NewCaption := ProjectName + ' - ' + NewCaption
else
NewCaption := NewCaption + ' - ' + ProjectName;
end else
end
else
NewCaption := Format(lisnewProject, [NewCaption]);
NewTitle := NewCaption;
end;
end;
case ToolStatus of
@ -11527,6 +11533,7 @@ begin
itDebugger: NewCaption := Format(lisdebugging, [NewCaption]);
end;
MainIDEBar.Caption := NewCaption;
Application.Title := NewTitle;
end;
procedure TMainIDE.HideIDE;