mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 14:19:17 +02:00
MG: added insert GPL notice
git-svn-id: trunk@3322 -
This commit is contained in:
parent
fb202ba0fe
commit
8c87999185
@ -90,6 +90,21 @@ const
|
|||||||
( nil, nil, TSynPasSyn, TSynPasSyn, TSynLFMSyn, TSynXMLSyn, TSynHTMLSyn,
|
( nil, nil, TSynPasSyn, TSynPasSyn, TSynLFMSyn, TSynXMLSyn, TSynHTMLSyn,
|
||||||
TSynCPPSyn, TSynPerlSyn);
|
TSynCPPSyn, TSynPerlSyn);
|
||||||
|
|
||||||
|
|
||||||
|
{ Comments }
|
||||||
|
const
|
||||||
|
DefaultCommentTypes: array[TLazSyntaxHighlighter] of TCommentType = (
|
||||||
|
comtNone, // lshNone
|
||||||
|
comtNone, // lshText
|
||||||
|
comtPascal,// lshFreePascal
|
||||||
|
comtPascal,// lshDelphi
|
||||||
|
comtDelphi,// lshLFM
|
||||||
|
comtHtml, // lshXML
|
||||||
|
comtHtml, // lshHTML
|
||||||
|
comtCPP, // lshCPP
|
||||||
|
comtPerl // lshPerl
|
||||||
|
);
|
||||||
|
|
||||||
type
|
type
|
||||||
{ TEditOptLanguageInfo stores lazarus IDE additional information
|
{ TEditOptLanguageInfo stores lazarus IDE additional information
|
||||||
of a highlighter, such as samplesource, which sample lines are special
|
of a highlighter, such as samplesource, which sample lines are special
|
||||||
@ -111,6 +126,7 @@ type
|
|||||||
SampleSource: string;
|
SampleSource: string;
|
||||||
AddAttrSampleLines: array[TAdditionalHilightAttribute] of integer; // first line = 1
|
AddAttrSampleLines: array[TAdditionalHilightAttribute] of integer; // first line = 1
|
||||||
MappedAttributes: TStringList; // map attributes to pascal
|
MappedAttributes: TStringList; // map attributes to pascal
|
||||||
|
DefaultCommentType: TCommentType;
|
||||||
constructor Create;
|
constructor Create;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
function GetDefaultFilextension: string;
|
function GetDefaultFilextension: string;
|
||||||
@ -127,6 +143,7 @@ type
|
|||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
function FindByName(const Name: string): integer;
|
function FindByName(const Name: string): integer;
|
||||||
function FindByClass(CustomSynClass: TCustomSynClass): integer;
|
function FindByClass(CustomSynClass: TCustomSynClass): integer;
|
||||||
|
function FindByHighlighter(Hilighter: TSynCustomHighlighter): integer;
|
||||||
function FindByType(AType: TLazSyntaxHighlighter): integer;
|
function FindByType(AType: TLazSyntaxHighlighter): integer;
|
||||||
function GetDefaultFilextension(AType: TLazSyntaxHighlighter): string;
|
function GetDefaultFilextension(AType: TLazSyntaxHighlighter): string;
|
||||||
property Items[Index: integer]: TEditOptLanguageInfo read GetInfos; default;
|
property Items[Index: integer]: TEditOptLanguageInfo read GetInfos; default;
|
||||||
@ -521,9 +538,9 @@ function ShowEditorOptionsDialog:TModalResult;
|
|||||||
function StrToLazSyntaxHighlighter(const s: string): TLazSyntaxHighlighter;
|
function StrToLazSyntaxHighlighter(const s: string): TLazSyntaxHighlighter;
|
||||||
function ExtensionToLazSyntaxHighlighter(Ext:string): TLazSyntaxHighlighter;
|
function ExtensionToLazSyntaxHighlighter(Ext:string): TLazSyntaxHighlighter;
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
|
||||||
uses Math;
|
uses Math;
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -721,6 +738,7 @@ begin
|
|||||||
NewInfo:=TEditOptLanguageInfo.Create;
|
NewInfo:=TEditOptLanguageInfo.Create;
|
||||||
with NewInfo do begin
|
with NewInfo do begin
|
||||||
TheType:=CompatibleLazSyntaxHilighter[lshFreePascal];
|
TheType:=CompatibleLazSyntaxHilighter[lshFreePascal];
|
||||||
|
DefaultCommentType:=DefaultCommentTypes[lshFreePascal];
|
||||||
SynClass:=LazSyntaxHighlighterClasses[TheType];
|
SynClass:=LazSyntaxHighlighterClasses[TheType];
|
||||||
FileExtensions:='pp;pas;inc;lpr;lrs;dpr;dpk';
|
FileExtensions:='pp;pas;inc;lpr;lrs;dpr;dpk';
|
||||||
SampleSource:=
|
SampleSource:=
|
||||||
@ -759,6 +777,7 @@ begin
|
|||||||
NewInfo:=TEditOptLanguageInfo.Create;
|
NewInfo:=TEditOptLanguageInfo.Create;
|
||||||
with NewInfo do begin
|
with NewInfo do begin
|
||||||
TheType:=CompatibleLazSyntaxHilighter[lshHTML];
|
TheType:=CompatibleLazSyntaxHilighter[lshHTML];
|
||||||
|
DefaultCommentType:=DefaultCommentTypes[lshHTML];
|
||||||
SynClass:=LazSyntaxHighlighterClasses[TheType];
|
SynClass:=LazSyntaxHighlighterClasses[TheType];
|
||||||
FileExtensions:='htm;html';
|
FileExtensions:='htm;html';
|
||||||
SampleSource:=
|
SampleSource:=
|
||||||
@ -789,6 +808,7 @@ begin
|
|||||||
NewInfo:=TEditOptLanguageInfo.Create;
|
NewInfo:=TEditOptLanguageInfo.Create;
|
||||||
with NewInfo do begin
|
with NewInfo do begin
|
||||||
TheType:=CompatibleLazSyntaxHilighter[lshCPP];
|
TheType:=CompatibleLazSyntaxHilighter[lshCPP];
|
||||||
|
DefaultCommentType:=DefaultCommentTypes[lshCPP];
|
||||||
SynClass:=LazSyntaxHighlighterClasses[TheType];
|
SynClass:=LazSyntaxHighlighterClasses[TheType];
|
||||||
FileExtensions:='c;cc;cpp;h;hpp';
|
FileExtensions:='c;cc;cpp;h;hpp';
|
||||||
SampleSource:=
|
SampleSource:=
|
||||||
@ -826,6 +846,7 @@ begin
|
|||||||
NewInfo:=TEditOptLanguageInfo.Create;
|
NewInfo:=TEditOptLanguageInfo.Create;
|
||||||
with NewInfo do begin
|
with NewInfo do begin
|
||||||
TheType:=CompatibleLazSyntaxHilighter[lshXML];
|
TheType:=CompatibleLazSyntaxHilighter[lshXML];
|
||||||
|
DefaultCommentType:=DefaultCommentTypes[lshXML];
|
||||||
SynClass:=LazSyntaxHighlighterClasses[TheType];
|
SynClass:=LazSyntaxHighlighterClasses[TheType];
|
||||||
FileExtensions:='xml;xsd;xsl;xslt;dtd';
|
FileExtensions:='xml;xsd;xsl;xslt;dtd';
|
||||||
SampleSource:=
|
SampleSource:=
|
||||||
@ -855,6 +876,7 @@ begin
|
|||||||
NewInfo:=TEditOptLanguageInfo.Create;
|
NewInfo:=TEditOptLanguageInfo.Create;
|
||||||
with NewInfo do begin
|
with NewInfo do begin
|
||||||
TheType:=CompatibleLazSyntaxHilighter[lshLFM];
|
TheType:=CompatibleLazSyntaxHilighter[lshLFM];
|
||||||
|
DefaultCommentType:=DefaultCommentTypes[lshLFM];
|
||||||
SynClass:=LazSyntaxHighlighterClasses[TheType];
|
SynClass:=LazSyntaxHighlighterClasses[TheType];
|
||||||
FileExtensions:='lfm;dfm;xfm';
|
FileExtensions:='lfm;dfm;xfm';
|
||||||
SampleSource:=
|
SampleSource:=
|
||||||
@ -886,6 +908,7 @@ begin
|
|||||||
NewInfo:=TEditOptLanguageInfo.Create;
|
NewInfo:=TEditOptLanguageInfo.Create;
|
||||||
with NewInfo do begin
|
with NewInfo do begin
|
||||||
TheType:=CompatibleLazSyntaxHilighter[lshPerl];
|
TheType:=CompatibleLazSyntaxHilighter[lshPerl];
|
||||||
|
DefaultCommentType:=DefaultCommentTypes[lshPerl];
|
||||||
SynClass:=LazSyntaxHighlighterClasses[TheType];
|
SynClass:=LazSyntaxHighlighterClasses[TheType];
|
||||||
FileExtensions:='pl;pm;cgi';
|
FileExtensions:='pl;pm;cgi';
|
||||||
SampleSource:=
|
SampleSource:=
|
||||||
@ -937,6 +960,16 @@ begin
|
|||||||
dec(Result);
|
dec(Result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TEditOptLangList.FindByHighlighter(Hilighter: TSynCustomHighlighter
|
||||||
|
): integer;
|
||||||
|
begin
|
||||||
|
if Hilighter<>nil then begin
|
||||||
|
Result:=FindByClass(TCustomSynClass(Hilighter.ClassType));
|
||||||
|
end else begin
|
||||||
|
Result:=-1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TEditOptLangList.FindByType(
|
function TEditOptLangList.FindByType(
|
||||||
AType: TLazSyntaxHighlighter): integer;
|
AType: TLazSyntaxHighlighter): integer;
|
||||||
begin
|
begin
|
||||||
|
122
ide/ideprocs.pp
122
ide/ideprocs.pp
@ -32,6 +32,19 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils, Laz_XMLCfg, GetText;
|
Classes, SysUtils, Laz_XMLCfg, GetText;
|
||||||
|
|
||||||
|
type
|
||||||
|
TCommentType = (
|
||||||
|
comtDefault, // automatically decide
|
||||||
|
comtNone, // no comment
|
||||||
|
comtPascal, // {}
|
||||||
|
comtDelphi, // //
|
||||||
|
comtTurboPascal,// (* *)
|
||||||
|
comtCPP, // /* */
|
||||||
|
comtPerl, // #
|
||||||
|
comtHtml // <!-- -->
|
||||||
|
);
|
||||||
|
TCommentTypes = set of TCommentType;
|
||||||
|
|
||||||
//
|
//
|
||||||
const
|
const
|
||||||
// ToDo: find the constant in the fpc units.
|
// ToDo: find the constant in the fpc units.
|
||||||
@ -73,10 +86,12 @@ procedure SaveRect(XMLConfig: TXMLConfig; const Path:string; var ARect:TRect);
|
|||||||
procedure FreeThenNil(var Obj: TObject);
|
procedure FreeThenNil(var Obj: TObject);
|
||||||
function TabsToSpaces(const s: string; TabWidth: integer): string;
|
function TabsToSpaces(const s: string; TabWidth: integer): string;
|
||||||
function CommentLines(const s: string): string;
|
function CommentLines(const s: string): string;
|
||||||
|
function CommentText(const s: string; CommentType: TCommentType): string;
|
||||||
function UncommentLines(const s: string): string;
|
function UncommentLines(const s: string): string;
|
||||||
procedure TranslateResourceStrings(const BaseDirectory, CustomLang: string);
|
procedure TranslateResourceStrings(const BaseDirectory, CustomLang: string);
|
||||||
function NameToValidIdentifier(const s: string): string;
|
function NameToValidIdentifier(const s: string): string;
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
|
||||||
@ -801,6 +816,113 @@ begin
|
|||||||
Result:=Dest;
|
Result:=Dest;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{-------------------------------------------------------------------------------
|
||||||
|
function CommentLines(const s: string; CommentType: TCommentType): string;
|
||||||
|
|
||||||
|
Comment s.
|
||||||
|
-------------------------------------------------------------------------------}
|
||||||
|
function CommentText(const s: string; CommentType: TCommentType): string;
|
||||||
|
|
||||||
|
procedure GetTextInfo(var Len, LineCount: integer;
|
||||||
|
var LastLineEmpty: boolean);
|
||||||
|
var
|
||||||
|
p: integer;
|
||||||
|
begin
|
||||||
|
Len:=length(s);
|
||||||
|
LineCount:=1;
|
||||||
|
p:=1;
|
||||||
|
while p<=Len do
|
||||||
|
if not (s[p] in [#10,#13]) then begin
|
||||||
|
inc(p);
|
||||||
|
end else begin
|
||||||
|
inc(p);
|
||||||
|
inc(LineCount);
|
||||||
|
if (p<=Len) and (s[p] in [#10,#13]) and (s[p]<>s[p-1]) then
|
||||||
|
inc(p);
|
||||||
|
end;
|
||||||
|
LastLineEmpty:=(Len=0) or (s[Len] in [#10,#13]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure DoCommentBlock(const FirstLineStart, LineStart, LastLine: string);
|
||||||
|
var
|
||||||
|
OldLen, NewLen, LineCount, OldPos, NewPos: integer;
|
||||||
|
LastLineEmpty: boolean;
|
||||||
|
begin
|
||||||
|
GetTextInfo(OldLen,LineCount,LastLineEmpty);
|
||||||
|
|
||||||
|
NewLen:=OldLen+length(FirstLineStart)
|
||||||
|
+(LineCount-1)*length(LineStart);
|
||||||
|
if LastLineEmpty then
|
||||||
|
dec(NewLen,length(LineStart))
|
||||||
|
else
|
||||||
|
inc(NewLen,length(EndOfLine));
|
||||||
|
if (LastLine<>'') then begin
|
||||||
|
inc(NewLen,length(LastLine)+length(EndOfLine));
|
||||||
|
end;
|
||||||
|
|
||||||
|
SetLength(Result,NewLen);
|
||||||
|
NewPos:=1;
|
||||||
|
OldPos:=1;
|
||||||
|
|
||||||
|
// add first line start
|
||||||
|
if FirstLineStart<>'' then begin
|
||||||
|
System.Move(FirstLineStart[1],Result[NewPos],length(FirstLineStart));
|
||||||
|
inc(NewPos,length(FirstLineStart));
|
||||||
|
end;
|
||||||
|
// copy all lines and add new linestart
|
||||||
|
while (OldPos<=OldLen) do begin
|
||||||
|
if (not (s[OldPos] in [#10,#13])) then begin
|
||||||
|
Result[NewPos]:=s[OldPos];
|
||||||
|
inc(OldPos);
|
||||||
|
inc(NewPos);
|
||||||
|
end else begin
|
||||||
|
Result[NewPos]:=s[OldPos];
|
||||||
|
inc(OldPos);
|
||||||
|
inc(NewPos);
|
||||||
|
if (OldPos<=OldLen) and (s[OldPos] in [#10,#13])
|
||||||
|
and (s[OldPos]<>s[OldPos-1]) then begin
|
||||||
|
Result[NewPos]:=s[OldPos];
|
||||||
|
inc(OldPos);
|
||||||
|
inc(NewPos);
|
||||||
|
end;
|
||||||
|
// start new line
|
||||||
|
if (LineStart<>'') and (OldPos<OldLen) then begin
|
||||||
|
System.Move(LineStart[1],Result[NewPos],length(LineStart));
|
||||||
|
inc(NewPos,length(LineStart));
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if not LastLineEmpty then begin
|
||||||
|
System.Move(EndOfLine[1],Result[NewPos],length(EndOfLine));
|
||||||
|
inc(NewPos,length(EndOfLine));
|
||||||
|
end;
|
||||||
|
// add last line
|
||||||
|
if LastLine<>'' then begin
|
||||||
|
System.Move(LastLine[1],Result[NewPos],length(LastLine));
|
||||||
|
inc(NewPos,length(LastLine));
|
||||||
|
System.Move(EndOfLine[1],Result[NewPos],length(EndOfLine));
|
||||||
|
inc(NewPos,length(EndOfLine));
|
||||||
|
end;
|
||||||
|
if NewPos<>NewLen+1 then
|
||||||
|
raise Exception.Create('IDEProcs.CommentText ERROR: '
|
||||||
|
+IntToStr(NewPos-1)+'<>'+IntToStr(NewLen));
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
Result:=s;
|
||||||
|
if CommentType=comtNone then exit;
|
||||||
|
if CommentType=comtDefault then CommentType:=comtPascal;
|
||||||
|
|
||||||
|
case CommentType of
|
||||||
|
comtPascal: DoCommentBlock('{ ',' ','}');
|
||||||
|
comtDelphi: DoCommentBlock('// ','// ','');
|
||||||
|
comtTurboPascal: DoCommentBlock('(* ',' * ',' *)');
|
||||||
|
comtCPP: DoCommentBlock('/* ',' * ',' */');
|
||||||
|
comtPerl: DoCommentBlock('# ','# ','');
|
||||||
|
comtHtml: DoCommentBlock('<!-- ',' ','-->');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{-------------------------------------------------------------------------------
|
{-------------------------------------------------------------------------------
|
||||||
function CommentLines(const s: string): string;
|
function CommentLines(const s: string): string;
|
||||||
|
|
||||||
|
@ -82,6 +82,8 @@ const
|
|||||||
ecSelectLine = ecUserFirst + 57;
|
ecSelectLine = ecUserFirst + 57;
|
||||||
ecSelectParagraph = ecUserFirst + 58;
|
ecSelectParagraph = ecUserFirst + 58;
|
||||||
|
|
||||||
|
ecInsertGPLNotice = ecUserFirst + 80;
|
||||||
|
|
||||||
ecWordCompletion = ecUserFirst + 100;
|
ecWordCompletion = ecUserFirst + 100;
|
||||||
ecCompleteCode = ecUserFirst + 101;
|
ecCompleteCode = ecUserFirst + 101;
|
||||||
ecIdentCompletion = ecUserFirst + 102;
|
ecIdentCompletion = ecUserFirst + 102;
|
||||||
@ -500,6 +502,7 @@ begin
|
|||||||
ecSelectCodeBlock: Result:= 'Select code block';
|
ecSelectCodeBlock: Result:= 'Select code block';
|
||||||
ecSelectLine: Result:= 'Select line';
|
ecSelectLine: Result:= 'Select line';
|
||||||
ecSelectParagraph: Result:= 'Select paragraph';
|
ecSelectParagraph: Result:= 'Select paragraph';
|
||||||
|
ecInsertGPLNotice: Result:='Insert GPL notice';
|
||||||
|
|
||||||
// search menu
|
// search menu
|
||||||
ecFind: Result:= 'Find text';
|
ecFind: Result:= 'Find text';
|
||||||
@ -1167,6 +1170,7 @@ begin
|
|||||||
Add(C,'Select code block',ecSelectCodeBlock,VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
Add(C,'Select code block',ecSelectCodeBlock,VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||||
Add(C,'Select line',ecSelectLine,VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
Add(C,'Select line',ecSelectLine,VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||||
Add(C,'Select paragraph',ecSelectParagraph,VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
Add(C,'Select paragraph',ecSelectParagraph,VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||||
|
Add(C,'Insert GPL notice',ecInsertGPLNotice,VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||||
Add(C,'Uppercase selection',ecSelectionUpperCase,VK_UNKNOWN, [],VK_UNKNOWN,[]);
|
Add(C,'Uppercase selection',ecSelectionUpperCase,VK_UNKNOWN, [],VK_UNKNOWN,[]);
|
||||||
Add(C,'Lowercase selection',ecSelectionLowerCase,VK_UNKNOWN, [],VK_UNKNOWN,[]);
|
Add(C,'Lowercase selection',ecSelectionLowerCase,VK_UNKNOWN, [],VK_UNKNOWN,[]);
|
||||||
Add(C,'Convert tabs to spaces in selection',ecSelectionTabs2Spaces,VK_UNKNOWN, [],VK_UNKNOWN,[]);
|
Add(C,'Convert tabs to spaces in selection',ecSelectionTabs2Spaces,VK_UNKNOWN, [],VK_UNKNOWN,[]);
|
||||||
|
@ -122,6 +122,9 @@ ResourceString
|
|||||||
lisMenuSelectCodeBlock = 'Select code block';
|
lisMenuSelectCodeBlock = 'Select code block';
|
||||||
lisMenuSelectLine = 'Select line';
|
lisMenuSelectLine = 'Select line';
|
||||||
lisMenuSelectParagraph = 'Select paragraph';
|
lisMenuSelectParagraph = 'Select paragraph';
|
||||||
|
lisMenuInsertText = 'Insert text';
|
||||||
|
lisMenuInsertGeneral = 'General';
|
||||||
|
lisMenuInsertGPLNotice = 'GPL notice';
|
||||||
lisMenuCompleteCode = 'Complete Code';
|
lisMenuCompleteCode = 'Complete Code';
|
||||||
|
|
||||||
lisMenuFind = 'Find';
|
lisMenuFind = 'Find';
|
||||||
@ -222,28 +225,44 @@ ResourceString
|
|||||||
+#13
|
+#13
|
||||||
+'As Lazarus is growing we need more developers.'#13
|
+'As Lazarus is growing we need more developers.'#13
|
||||||
+'For example: Write a nicer about dialog with a logo.';
|
+'For example: Write a nicer about dialog with a logo.';
|
||||||
lsiUnitNameAlreadyExistsCap = 'Unitname already in project';
|
lisUnitNameAlreadyExistsCap = 'Unitname already in project';
|
||||||
lsiUnitNameAlreadyExistsText = 'The unit "%s" already exists.'#13
|
lisUnitNameAlreadyExistsText = 'The unit "%s" already exists.'#13
|
||||||
+'Ignore will force the renaming,'#13
|
+'Ignore will force the renaming,'#13
|
||||||
+'Cancel will cancel the saving of this source and'#13
|
+'Cancel will cancel the saving of this source and'#13
|
||||||
+'Abort will abort the whole saving.';
|
+'Abort will abort the whole saving.';
|
||||||
lsiInvalidPascalIdentifierCap = 'Invalid Pascal Identifier';
|
lisInvalidPascalIdentifierCap = 'Invalid Pascal Identifier';
|
||||||
lsiInvalidPascalIdentifierText =
|
lisInvalidPascalIdentifierText =
|
||||||
'The name "%s" is not a valid pascal identifier.';
|
'The name "%s" is not a valid pascal identifier.';
|
||||||
|
|
||||||
// hints
|
// hints
|
||||||
lsiHintNewUnit = 'New Unit';
|
lisHintNewUnit = 'New Unit';
|
||||||
lsiHintOpen = 'Open';
|
lisHintOpen = 'Open';
|
||||||
lsiHintSave = 'Save';
|
lisHintSave = 'Save';
|
||||||
lsiHintSaveAll = 'Save all';
|
lisHintSaveAll = 'Save all';
|
||||||
lsiHintNewForm = 'New Form';
|
lisHintNewForm = 'New Form';
|
||||||
lsiHintToggleFormUnit = 'Toggle Form/Unit';
|
lisHintToggleFormUnit = 'Toggle Form/Unit';
|
||||||
lsiHintViewUnits = 'View Units';
|
lisHintViewUnits = 'View Units';
|
||||||
lsiHintViewForms = 'View Forms';
|
lisHintViewForms = 'View Forms';
|
||||||
lsiHintRun = 'Run';
|
lisHintRun = 'Run';
|
||||||
lsiHintPause = 'Pause';
|
lisHintPause = 'Pause';
|
||||||
lsiHintStepInto = 'Step Into';
|
lisHintStepInto = 'Step Into';
|
||||||
lsiHintStepOver = 'Step Over';
|
lisHintStepOver = 'Step Over';
|
||||||
|
|
||||||
|
lisGPLNotice =
|
||||||
|
'This program is free software; you can redistribute it and/or modify'#13
|
||||||
|
+'it under the terms of the GNU General Public License as published by'#13
|
||||||
|
+'the Free Software Foundation; either version 2 of the License, or'#13
|
||||||
|
+'(at your option) any later version.'#13
|
||||||
|
+''#13
|
||||||
|
+'This program is distributed in the hope that it will be useful,'#13
|
||||||
|
+'but WITHOUT ANY WARRANTY; without even the implied warranty of'#13
|
||||||
|
+'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the'#13
|
||||||
|
+'GNU Library General Public License for more details.'#13
|
||||||
|
+''#13
|
||||||
|
+'You should have received a copy of the GNU General Public License'#13
|
||||||
|
+'along with this program; if not, write to the Free Software'#13
|
||||||
|
+'Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.'#13;
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -154,6 +154,9 @@ type
|
|||||||
itmEditSelectCodeBlock: TMenuItem;
|
itmEditSelectCodeBlock: TMenuItem;
|
||||||
itmEditSelectLine: TMenuItem;
|
itmEditSelectLine: TMenuItem;
|
||||||
itmEditSelectParagraph: TMenuItem;
|
itmEditSelectParagraph: TMenuItem;
|
||||||
|
itmEditInsertText: TMenuItem;
|
||||||
|
itmEditInsertGeneral: TMenuItem;
|
||||||
|
itmEditInsertGPLNotice: TMenuItem;
|
||||||
itmEditCompleteCode: TMenuItem;
|
itmEditCompleteCode: TMenuItem;
|
||||||
|
|
||||||
itmSearchFind: TMenuItem;
|
itmSearchFind: TMenuItem;
|
||||||
@ -500,6 +503,7 @@ begin
|
|||||||
itmEditSelect.Caption := lisMenuSelect;
|
itmEditSelect.Caption := lisMenuSelect;
|
||||||
mnuEdit.Add(itmEditSelect);
|
mnuEdit.Add(itmEditSelect);
|
||||||
|
|
||||||
|
begin
|
||||||
// select sub menu items
|
// select sub menu items
|
||||||
itmEditSelectAll := TMenuItem.Create(Self);
|
itmEditSelectAll := TMenuItem.Create(Self);
|
||||||
itmEditSelectAll.Name:='itmEditSelectAll';
|
itmEditSelectAll.Name:='itmEditSelectAll';
|
||||||
@ -526,10 +530,31 @@ begin
|
|||||||
itmEditSelectParagraph.Name:='itmEditSelectParagraph';
|
itmEditSelectParagraph.Name:='itmEditSelectParagraph';
|
||||||
itmEditSelectParagraph.Caption := lisMenuSelectParagraph;
|
itmEditSelectParagraph.Caption := lisMenuSelectParagraph;
|
||||||
itmEditSelect.Add(itmEditSelectParagraph);
|
itmEditSelect.Add(itmEditSelectParagraph);
|
||||||
|
end;
|
||||||
|
|
||||||
|
itmEditInsertText := TMenuItem.Create(Self);
|
||||||
|
itmEditInsertText.Name:='itmEditInsertText';
|
||||||
|
itmEditInsertText.Caption := lisMenuInsertText;
|
||||||
|
mnuEdit.Add(itmEditInsertText);
|
||||||
|
|
||||||
|
begin
|
||||||
|
// insert text sub menu items
|
||||||
|
itmEditInsertGeneral := TMenuItem.Create(Self);
|
||||||
|
itmEditInsertGeneral.Name:='itmEditInsertGeneral';
|
||||||
|
itmEditInsertGeneral.Caption := lisMenuInsertGeneral;
|
||||||
|
itmEditInsertText.Add(itmEditInsertGeneral);
|
||||||
|
|
||||||
|
begin
|
||||||
|
// insert general text sub menu items
|
||||||
|
itmEditInsertGPLNotice := TMenuItem.Create(Self);
|
||||||
|
itmEditInsertGPLNotice.Name:='itmEditInsertGPLNotice';
|
||||||
|
itmEditInsertGPLNotice.Caption := lisMenuInsertGPLNotice;
|
||||||
|
itmEditInsertGeneral.Add(itmEditInsertGPLNotice);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
mnuEdit.Add(CreateMenuSeparator);
|
mnuEdit.Add(CreateMenuSeparator);
|
||||||
|
|
||||||
|
|
||||||
itmEditCompleteCode := TMenuItem.Create(Self);
|
itmEditCompleteCode := TMenuItem.Create(Self);
|
||||||
itmEditCompleteCode.Name:='itmEditCompleteCode';
|
itmEditCompleteCode.Name:='itmEditCompleteCode';
|
||||||
itmEditCompleteCode.Caption := lisMenuCompleteCode;
|
itmEditCompleteCode.Caption := lisMenuCompleteCode;
|
||||||
@ -922,6 +947,7 @@ begin
|
|||||||
itmEditSelectCodeBlock.ShortCut:=CommandToShortCut(ecSelectCodeBlock);
|
itmEditSelectCodeBlock.ShortCut:=CommandToShortCut(ecSelectCodeBlock);
|
||||||
itmEditSelectLine.ShortCut:=CommandToShortCut(ecSelectLine);
|
itmEditSelectLine.ShortCut:=CommandToShortCut(ecSelectLine);
|
||||||
itmEditSelectParagraph.ShortCut:=CommandToShortCut(ecSelectParagraph);
|
itmEditSelectParagraph.ShortCut:=CommandToShortCut(ecSelectParagraph);
|
||||||
|
itmEditInsertGPLNotice.ShortCut:=CommandToShortCut(ecInsertGPLNotice);
|
||||||
itmEditCompleteCode.ShortCut:=CommandToShortCut(ecCompleteCode);
|
itmEditCompleteCode.ShortCut:=CommandToShortCut(ecCompleteCode);
|
||||||
|
|
||||||
itmSearchFind.ShortCut:=CommandToShortCut(ecFind);
|
itmSearchFind.ShortCut:=CommandToShortCut(ecFind);
|
||||||
|
Loading…
Reference in New Issue
Block a user