From d2ae489674b3a27a9476b6e0c92c86c70bff89ba Mon Sep 17 00:00:00 2001 From: juha Date: Sun, 26 Aug 2018 08:17:13 +0000 Subject: [PATCH] IDE: Show also Lazarus SVN revision in IDE caption when it is available. git-svn-id: trunk@58779 - --- ide/lazarusidestrconsts.pas | 1 + ide/main.pp | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index d726a9ed86..63c6d5a668 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -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 ...)'; diff --git a/ide/main.pp b/ide/main.pp index a64efec26d..f6b9b358a1 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -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)