MG: added insert Username and Datetime

git-svn-id: trunk@2960 -
This commit is contained in:
lazarus 2002-08-18 08:56:34 +00:00
parent 4380c9f329
commit 04d5647ca5

View File

@ -225,6 +225,8 @@ type
procedure SelectParagraph;
function CommentText(const Txt: string; CommentType: TCommentType): string;
procedure InsertGPLNotice(CommentType: TCommentType);
procedure InsertUsername;
procedure InsertDateTime;
// editor commands
@ -916,6 +918,12 @@ Begin
ecInsertGPLNotice:
InsertGPLNotice(comtDefault);
ecInsertUserName:
InsertUsername;
ecInsertDateTime:
InsertDateTime;
else
begin
Handled:=false;
@ -1148,6 +1156,16 @@ begin
FEditor.SelText:=Txt;
end;
procedure TSourceEditor.InsertUsername;
begin
FEditor.SelText:=GetCurrentUserName;
end;
procedure TSourceEditor.InsertDateTime;
begin
FEditor.SelText:=DateTimeToStr(now);
end;
procedure TSourceEditor.RemoveBreakPoint(const ABreakPointMark: TSynEditMark);
begin
if not IsBreakPointMark(ABreakPointMark) then Exit;