IDE: Rename function GetCurrentMailAddress to GetCurrentChangeLog and support Windows.

git-svn-id: trunk@63552 -
This commit is contained in:
juha 2020-07-13 09:18:57 +00:00
parent 8ceb09a67b
commit 0414705e6a
2 changed files with 5 additions and 4 deletions

View File

@ -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;

View File

@ -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;