IDE: Show also Lazarus SVN revision in IDE caption when it is available.

git-svn-id: trunk@58779 -
This commit is contained in:
juha 2018-08-26 08:17:13 +00:00
parent 1e346194fb
commit d2ae489674
2 changed files with 8 additions and 2 deletions

View File

@ -935,6 +935,7 @@ resourcestring
lisAmbiguousFileFoundThisFileCanBeMistakenWithDelete = 'Ambiguous file '
+'found: "%s"%sThis file can be mistaken with "%s"%sDelete the ambiguous file?';
lisLazarusEditorV = 'Lazarus IDE v%s';
lisLazarusSVNRev = 'rev.%s';
lisnewProject = '(new project)';
liscompiling = '%s (compiling ...)';
lisdebugging = '%s (debugging ...)';

View File

@ -8380,11 +8380,16 @@ procedure TMainIDE.UpdateCaption;
end;
var
NewCaption, NewTitle, ProjectName, DirName: String;
rev, NewCaption, NewTitle, ProjectName, DirName: String;
begin
if MainIDEBar = nil then Exit;
if ToolStatus = itExiting then Exit;
NewCaption := Format(lisLazarusEditorV, [GetLazarusVersionString]);
rev := GetLazarusRevision;
if (rev = '') or (rev = 'Unknown') then
NewCaption := Format(lisLazarusEditorV, [GetLazarusVersionString])
else
NewCaption := Format(lisLazarusEditorV + ' ' + lisLazarusSVNRev,
[GetLazarusVersionString, rev]);
NewTitle := NewCaption;
if MainBarSubTitle <> '' then
NewCaption := AddToCaption(NewCaption, MainBarSubTitle)