From 04d5647ca526d30236e1b13925788f3ee9a7ac87 Mon Sep 17 00:00:00 2001 From: lazarus Date: Sun, 18 Aug 2002 08:56:34 +0000 Subject: [PATCH] MG: added insert Username and Datetime git-svn-id: trunk@2960 - --- ide/uniteditor.pp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ide/uniteditor.pp b/ide/uniteditor.pp index f3a8d3dcd0..cb6bb9cc9b 100644 --- a/ide/uniteditor.pp +++ b/ide/uniteditor.pp @@ -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;