From 0414705e6ab7feb17cb3fecb1cc00e80c94c0f2f Mon Sep 17 00:00:00 2001 From: juha Date: Mon, 13 Jul 2020 09:18:57 +0000 Subject: [PATCH] IDE: Rename function GetCurrentMailAddress to GetCurrentChangeLog and support Windows. git-svn-id: trunk@63552 - --- ide/ideprocs.pp | 7 ++++--- ide/sourceeditor.pp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ide/ideprocs.pp b/ide/ideprocs.pp index 502bc26b2f..0b0c435a11 100644 --- a/ide/ideprocs.pp +++ b/ide/ideprocs.pp @@ -160,7 +160,7 @@ type end; function GetCurrentUserName: string; -function GetCurrentMailAddress: string; +function GetCurrentChangeLog: string; function GetProgramSearchPath: string; // miscellaneous @@ -1311,9 +1311,10 @@ begin Result:=GetEnvironmentVariableUTF8({$IFDEF Windows}'USERNAME'{$ELSE}'USER'{$ENDIF}); end; -function GetCurrentMailAddress: string; +function GetCurrentChangeLog: string; begin - Result:='<'+GetCurrentUserName+'@'+GetEnvironmentVariableUTF8('HOSTNAME')+'>'; + Result:='<'+GetCurrentUserName+'@'+ + GetEnvironmentVariableUTF8({$IFDEF Windows}'COMPUTERNAME'{$ELSE}'HOSTNAME'{$ENDIF})+'>'; end; function GetProgramSearchPath: string; diff --git a/ide/sourceeditor.pp b/ide/sourceeditor.pp index 50fdd0cad1..0529a0519a 100644 --- a/ide/sourceeditor.pp +++ b/ide/sourceeditor.pp @@ -4665,7 +4665,7 @@ procedure TSourceEditor.InsertChangeLogEntry; var s: string; begin if ReadOnly then Exit; - s:=DateToStr(now)+' '+GetCurrentUserName+' '+GetCurrentMailAddress; + s:=DateToStr(now)+' '+GetCurrentUserName+' '+GetCurrentChangeLog; FEditor.InsertTextAtCaret(s); end;