mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 00:00:49 +01:00
IDE: insert license notice commands: split into English and translated items
git-svn-id: trunk@45219 -
This commit is contained in:
parent
0c04004aab
commit
f3a8270e7d
@ -39,10 +39,10 @@ const
|
||||
|
||||
To add one static key do the following:
|
||||
1. Add a constant with a unique value in the list below.
|
||||
1a. Update IDEEditorCommandStrs
|
||||
2. Add it to GetDefaultKeyForCommand to define the default keys+shiftstates
|
||||
3. Add it to EditorCommandToDescriptionString to define the description
|
||||
4. Add it to TKeyCommandRelationList.DefineCommandCategories to define the category.
|
||||
2. Update IDEEditorCommandStrs to define a name (used for configs)
|
||||
3. Add it to GetDefaultKeyForCommand to define the default keys+shiftstates
|
||||
4. Add it to EditorCommandToDescriptionString to define the description
|
||||
5. Add it to TKeyCommandRelationList.DefineCommandCategories to define the category.
|
||||
}
|
||||
ecNone = 0;
|
||||
|
||||
@ -95,24 +95,28 @@ const
|
||||
ecToggleComment = ecFirstLazarus + 65;
|
||||
|
||||
// insert text
|
||||
ecInsertCharacter = ecFirstLazarus + 80;
|
||||
ecInsertGPLNotice = ecFirstLazarus + 81;
|
||||
ecInsertLGPLNotice = ecFirstLazarus + 82;
|
||||
ecInsertUserName = ecFirstLazarus + 83;
|
||||
ecInsertDateTime = ecFirstLazarus + 84;
|
||||
ecInsertChangeLogEntry = ecFirstLazarus + 85;
|
||||
ecInsertCVSAuthor = ecFirstLazarus + 86;
|
||||
ecInsertCVSDate = ecFirstLazarus + 87;
|
||||
ecInsertCVSHeader = ecFirstLazarus + 88;
|
||||
ecInsertCVSID = ecFirstLazarus + 89;
|
||||
ecInsertCVSLog = ecFirstLazarus + 90;
|
||||
ecInsertCVSName = ecFirstLazarus + 91;
|
||||
ecInsertCVSRevision = ecFirstLazarus + 92;
|
||||
ecInsertCVSSource = ecFirstLazarus + 93;
|
||||
ecInsertModifiedLGPLNotice= ecFirstLazarus + 94;
|
||||
ecInsertMITNotice = ecFirstLazarus + 95;
|
||||
ecInsertGUID = ecFirstLazarus + 96;
|
||||
ecInsertFilename = ecFirstLazarus + 97;
|
||||
ecInsertCharacter = ecFirstLazarus + 70;
|
||||
ecInsertGUID = ecFirstLazarus + 71;
|
||||
ecInsertFilename = ecFirstLazarus + 72;
|
||||
ecInsertUserName = ecFirstLazarus + 73;
|
||||
ecInsertDateTime = ecFirstLazarus + 74;
|
||||
ecInsertChangeLogEntry = ecFirstLazarus + 75;
|
||||
ecInsertCVSAuthor = ecFirstLazarus + 76;
|
||||
ecInsertCVSDate = ecFirstLazarus + 77;
|
||||
ecInsertCVSHeader = ecFirstLazarus + 78;
|
||||
ecInsertCVSID = ecFirstLazarus + 79;
|
||||
ecInsertCVSLog = ecFirstLazarus + 80;
|
||||
ecInsertCVSName = ecFirstLazarus + 81;
|
||||
ecInsertCVSRevision = ecFirstLazarus + 82;
|
||||
ecInsertCVSSource = ecFirstLazarus + 83;
|
||||
ecInsertGPLNotice = ecFirstLazarus + 84;
|
||||
ecInsertGPLNoticeTranslated = ecFirstLazarus + 85;
|
||||
ecInsertLGPLNotice = ecFirstLazarus + 86;
|
||||
ecInsertLGPLNoticeTranslated = ecFirstLazarus + 87;
|
||||
ecInsertModifiedLGPLNotice= ecFirstLazarus + 88;
|
||||
ecInsertModifiedLGPLNoticeTranslated = ecFirstLazarus + 89;
|
||||
ecInsertMITNotice = ecFirstLazarus + 90;
|
||||
ecInsertMITNoticeTranslated = ecFirstLazarus + 91;
|
||||
|
||||
// source tools
|
||||
ecWordCompletion = ecFirstLazarus + 100;
|
||||
@ -1215,7 +1219,7 @@ begin
|
||||
end;
|
||||
|
||||
const
|
||||
IDEEditorCommandStrs: array[0..298] of TIdentMapEntry = (
|
||||
IDEEditorCommandStrs: array[0..302] of TIdentMapEntry = (
|
||||
// search
|
||||
(Value: ecFind; Name: 'ecFind'),
|
||||
(Value: ecFindAgain; Name: 'ecFindAgain'),
|
||||
@ -1264,8 +1268,8 @@ const
|
||||
|
||||
// insert text
|
||||
(Value: ecInsertCharacter; Name: 'ecInsertCharacter'),
|
||||
(Value: ecInsertGPLNotice; Name: 'ecInsertGPLNotice'),
|
||||
(Value: ecInsertLGPLNotice; Name: 'ecInsertLGPLNotice'),
|
||||
(Value: ecInsertGUID; Name: 'ecInsertGUID'),
|
||||
(Value: ecInsertFilename; Name: 'ecInsertFilename'),
|
||||
(Value: ecInsertUserName; Name: 'ecInsertUserName'),
|
||||
(Value: ecInsertDateTime; Name: 'ecInsertDateTime'),
|
||||
(Value: ecInsertChangeLogEntry; Name: 'ecInsertChangeLogEntry'),
|
||||
@ -1277,10 +1281,14 @@ const
|
||||
(Value: ecInsertCVSName; Name: 'ecInsertCVSName'),
|
||||
(Value: ecInsertCVSRevision; Name: 'ecInsertCVSRevision'),
|
||||
(Value: ecInsertCVSSource; Name: 'ecInsertCVSSource'),
|
||||
(Value: ecInsertGPLNotice; Name: 'ecInsertGPLNotice'),
|
||||
(Value: ecInsertGPLNoticeTranslated; Name: 'ecInsertGPLNoticeTranslated'),
|
||||
(Value: ecInsertLGPLNotice; Name: 'ecInsertLGPLNotice'),
|
||||
(Value: ecInsertLGPLNoticeTranslated; Name: 'ecInsertLGPLNoticeTranslated'),
|
||||
(Value: ecInsertModifiedLGPLNotice; Name: 'ecInsertModifiedLGPLNotice'),
|
||||
(Value: ecInsertModifiedLGPLNoticeTranslated; Name: 'ecInsertModifiedLGPLNoticeTranslated'),
|
||||
(Value: ecInsertMITNotice; Name: 'ecInsertMITNotice'),
|
||||
(Value: ecInsertGUID; Name: 'ecInsertGUID'),
|
||||
(Value: ecInsertFilename; Name: 'ecInsertFilename'),
|
||||
(Value: ecInsertMITNoticeTranslated; Name: 'ecInsertMITNoticeTranslated'),
|
||||
|
||||
// source tools
|
||||
(Value: ecWordCompletion; Name: 'ecWordCompletion'),
|
||||
|
||||
@ -482,9 +482,13 @@ begin
|
||||
ecSelectParagraph : Result:= lisMenuSelectParagraph;
|
||||
ecInsertCharacter : Result:= srkmecInsertCharacter;
|
||||
ecInsertGPLNotice : Result:= srkmecInsertGPLNotice;
|
||||
ecInsertGPLNoticeTranslated: Result:= srkmecInsertGPLNoticeTranslated;
|
||||
ecInsertLGPLNotice : Result:= srkmecInsertLGPLNotice;
|
||||
ecInsertLGPLNoticeTranslated: Result:= srkmecInsertLGPLNoticeTranlated;
|
||||
ecInsertModifiedLGPLNotice: Result:= srkmecInsertModifiedLGPLNotice;
|
||||
ecInsertModifiedLGPLNoticeTranslated: Result:= srkmecInsertModifiedLGPLNoticeTranslated;
|
||||
ecInsertMITNotice : Result:= srkmecInsertMITNotice;
|
||||
ecInsertMITNoticeTranslated: Result:= srkmecInsertMITNoticeTranslated;
|
||||
ecInsertUserName : Result:= srkmecInsertUserName;
|
||||
ecInsertDateTime : Result:= srkmecInsertDateTime;
|
||||
ecInsertChangeLogEntry : Result:= srkmecInsertChangeLogEntry;
|
||||
@ -1414,21 +1418,7 @@ begin
|
||||
ecLineBreak: SetSingle(VK_RETURN,[], VK_M,[ssCtrl]);
|
||||
ecInsertLine: SetSingle(VK_N,[ssCtrl]);
|
||||
ecInsertCharacter: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertGPLNotice: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertLGPLNotice: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertModifiedLGPLNotice:SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertMITNotice: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertUserName: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertDateTime: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertChangeLogEntry:SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertCVSAuthor: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertCVSDate: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertCVSHeader: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertCVSID: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertCVSLog: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertCVSName: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertCVSRevision: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertCVSSource: SetSingle(VK_UNKNOWN,[]);
|
||||
// all insert text snippet keys have no default key
|
||||
|
||||
// command commands
|
||||
ecUndo: SetSingle(VK_BACK,[ssALT], VK_U,[ssCtrl]);
|
||||
@ -2032,23 +2022,8 @@ begin
|
||||
ecLineBreak: SetSingle(VK_RETURN,[]);
|
||||
ecInsertLine: SetSingle(VK_N,[ssShift,ssMeta]);
|
||||
ecInsertCharacter: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertGPLNotice: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertLGPLNotice: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertModifiedLGPLNotice:SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertMITNotice: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertUserName: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertDateTime: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertChangeLogEntry:SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertCVSAuthor: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertCVSDate: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertCVSHeader: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertCVSID: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertCVSLog: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertCVSName: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertCVSRevision: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertCVSSource: SetSingle(VK_UNKNOWN,[]);
|
||||
ecInsertGUID: SetSingle(VK_G,[ssCtrl,ssShift]);
|
||||
ecInsertFilename: SetSingle(VK_UNKNOWN,[]);
|
||||
// Note: all insert text snippet keys have no default key
|
||||
|
||||
// command commands
|
||||
ecUndo: SetSingle(VK_Z,[ssMeta]);
|
||||
@ -2589,9 +2564,13 @@ begin
|
||||
AddDefault(C, 'Enclose in $IFDEF', lisEncloseInIFDEF, ecSelectionEncloseIFDEF);
|
||||
AddDefault(C, 'Insert from Character Map', lisMenuInsertCharacter, ecInsertCharacter);
|
||||
AddDefault(C, 'Insert GPL notice', srkmecInsertGPLNotice, ecInsertGPLNotice);
|
||||
AddDefault(C, 'Insert GPL notice translated', srkmecInsertGPLNoticeTranslated, ecInsertGPLNoticeTranslated);
|
||||
AddDefault(C, 'Insert LGPL notice', srkmecInsertLGPLNotice, ecInsertLGPLNotice);
|
||||
AddDefault(C, 'Insert LGPL notice translated', srkmecInsertLGPLNoticeTranlated, ecInsertLGPLNoticeTranslated);
|
||||
AddDefault(C, 'Insert modified LGPL notice', srkmecInsertModifiedLGPLNotice, ecInsertModifiedLGPLNotice);
|
||||
AddDefault(C, 'Insert modified LGPL notice translated', srkmecInsertModifiedLGPLNoticeTranslated, ecInsertModifiedLGPLNoticeTranslated);
|
||||
AddDefault(C, 'Insert MIT notice', srkmecInsertMITNotice, ecInsertMITNotice);
|
||||
AddDefault(C, 'Insert MIT notice translated', srkmecInsertMITNoticeTranslated, ecInsertMITNoticeTranslated);
|
||||
AddDefault(C, 'Insert username', lisKMInsertUsername, ecInsertUserName);
|
||||
AddDefault(C, 'Insert date and time', lisKMInsertDateAndTime, ecInsertDateTime);
|
||||
AddDefault(C, 'Insert ChangeLog entry', srkmecInsertChangeLogEntry, ecInsertChangeLogEntry);
|
||||
|
||||
@ -303,9 +303,13 @@ resourcestring
|
||||
lisSourcePaths = 'Source paths';
|
||||
|
||||
lisMenuInsertGPLNotice = 'GPL Notice';
|
||||
lisMenuInsertGPLNoticeTranslated = 'translated GPL Notice';
|
||||
lisMenuInsertLGPLNotice = 'LGPL Notice';
|
||||
lisMenuInsertLGPLNoticeTranslated = 'translated LGPL Notice';
|
||||
lisMenuInsertModifiedLGPLNotice = 'Modified LGPL Notice';
|
||||
lisMenuInsertModifiedLGPLNoticeTranslated = 'translated Modified LGPL Notice';
|
||||
lisMenuInsertMITNotice = 'MIT Notice';
|
||||
lisMenuInsertMITNoticeTranslated = 'translated MIT Notice';
|
||||
lisMenuInsertUserName = 'Current Username';
|
||||
lisMenuInsertDateTime = 'Current Date and Time';
|
||||
lisMenuInsertChangeLogEntry = 'ChangeLog Entry';
|
||||
@ -2725,9 +2729,13 @@ resourcestring
|
||||
srkmecSelectionTabs2Spaces = 'Convert tabs to spaces in selection';
|
||||
srkmecInsertCharacter = 'Insert from Charactermap';
|
||||
srkmecInsertGPLNotice = 'Insert GPL notice';
|
||||
srkmecInsertGPLNoticeTranslated = 'Insert GPL notice translated';
|
||||
srkmecInsertLGPLNotice = 'Insert LGPL notice';
|
||||
srkmecInsertLGPLNoticeTranlated = 'Insert LGPL notice translated';
|
||||
srkmecInsertModifiedLGPLNotice = 'Insert modified LGPL notice';
|
||||
srkmecInsertModifiedLGPLNoticeTranslated = 'Insert modified LGPL notice translated';
|
||||
srkmecInsertMITNotice = 'Insert MIT notice';
|
||||
srkmecInsertMITNoticeTranslated = 'Insert MIT notice translated';
|
||||
lisKMInsertUsername = 'Insert username';
|
||||
lisKMInsertDateAndTime = 'Insert date and time';
|
||||
srkmecInsertUserName = 'Insert current username';
|
||||
|
||||
37
ide/main.pp
37
ide/main.pp
@ -289,9 +289,13 @@ type
|
||||
procedure mnuSourceInsertCVSSourceClick(Sender: TObject);
|
||||
// source->insert general
|
||||
procedure mnuSourceInsertGPLNoticeClick(Sender: TObject);
|
||||
procedure mnuSourceInsertGPLNoticeTranslatedClick(Sender: TObject);
|
||||
procedure mnuSourceInsertLGPLNoticeClick(Sender: TObject);
|
||||
procedure mnuSourceInsertLGPLNoticeTranslatedClick(Sender: TObject);
|
||||
procedure mnuSourceInsertModifiedLGPLNoticeClick(Sender: TObject);
|
||||
procedure mnuSourceInsertModifiedLGPLNoticeTranslatedClick(Sender: TObject);
|
||||
procedure mnuSourceInsertMITNoticeClick(Sender: TObject);
|
||||
procedure mnuSourceInsertMITNoticeTranslatedClick(Sender: TObject);
|
||||
procedure mnuSourceInsertUsernameClick(Sender: TObject);
|
||||
procedure mnuSourceInsertDateTimeClick(Sender: TObject);
|
||||
procedure mnuSourceInsertChangeLogEntryClick(Sender: TObject);
|
||||
@ -2764,9 +2768,13 @@ begin
|
||||
itmSourceInsertCVSSource.OnClick:=@mnuSourceInsertCVSSourceClick;
|
||||
// insert general
|
||||
itmSourceInsertGPLNotice.OnClick:=@mnuSourceInsertGPLNoticeClick;
|
||||
itmSourceInsertGPLNoticeTranslated.OnClick:=@mnuSourceInsertGPLNoticeTranslatedClick;
|
||||
itmSourceInsertLGPLNotice.OnClick:=@mnuSourceInsertLGPLNoticeClick;
|
||||
itmSourceInsertLGPLNoticeTranslated.OnClick:=@mnuSourceInsertLGPLNoticeTranslatedClick;
|
||||
itmSourceInsertModifiedLGPLNotice.OnClick:=@mnuSourceInsertModifiedLGPLNoticeClick;
|
||||
itmSourceInsertModifiedLGPLNoticeTranslated.OnClick:=@mnuSourceInsertModifiedLGPLNoticeTranslatedClick;
|
||||
itmSourceInsertMITNotice.OnClick:=@mnuSourceInsertMITNoticeClick;
|
||||
itmSourceInsertMITNoticeTranslated.OnClick:=@mnuSourceInsertMITNoticeTranslatedClick;
|
||||
itmSourceInsertUsername.OnClick:=@mnuSourceInsertUsernameClick;
|
||||
itmSourceInsertDateTime.OnClick:=@mnuSourceInsertDateTimeClick;
|
||||
itmSourceInsertChangeLogEntry.OnClick:=@mnuSourceInsertChangeLogEntryClick;
|
||||
@ -3968,9 +3976,17 @@ begin
|
||||
itmSourceInsertCVSSource.Enabled:=Editable;
|
||||
//itmSourceInsertGeneral
|
||||
itmSourceInsertGPLNotice.Enabled:=Editable;
|
||||
itmSourceInsertGPLNoticeTranslated.Visible:=
|
||||
Editable and (EnglishGPLNotice<>lisGPLNotice);
|
||||
itmSourceInsertLGPLNotice.Enabled:=Editable;
|
||||
itmSourceInsertLGPLNoticeTranslated.Visible:=
|
||||
Editable and (EnglishLGPLNotice<>lisLGPLNotice);
|
||||
itmSourceInsertModifiedLGPLNotice.Enabled:=Editable;
|
||||
itmSourceInsertModifiedLGPLNoticeTranslated.Visible:=
|
||||
Editable and (EnglishModifiedLGPLNotice<>lisModifiedLGPLNotice);
|
||||
itmSourceInsertMITNotice.Enabled:=Editable;
|
||||
itmSourceInsertMITNoticeTranslated.Visible:=
|
||||
Editable and (EnglishMITNotice<>lisMITNotice);
|
||||
itmSourceInsertUsername.Enabled:=Editable;
|
||||
itmSourceInsertDateTime.Enabled:=Editable;
|
||||
itmSourceInsertChangeLogEntry.Enabled:=Editable;
|
||||
@ -13838,21 +13854,42 @@ begin
|
||||
DoSourceEditorCommand(ecInsertGPLNotice);
|
||||
end;
|
||||
|
||||
procedure TMainIDE.mnuSourceInsertGPLNoticeTranslatedClick(Sender: TObject);
|
||||
begin
|
||||
DoSourceEditorCommand(ecInsertGPLNoticeTranslated);
|
||||
end;
|
||||
|
||||
procedure TMainIDE.mnuSourceInsertLGPLNoticeClick(Sender: TObject);
|
||||
begin
|
||||
DoSourceEditorCommand(ecInsertLGPLNotice);
|
||||
end;
|
||||
|
||||
procedure TMainIDE.mnuSourceInsertLGPLNoticeTranslatedClick(Sender: TObject);
|
||||
begin
|
||||
DoSourceEditorCommand(ecInsertLGPLNoticeTranslated);
|
||||
end;
|
||||
|
||||
procedure TMainIDE.mnuSourceInsertModifiedLGPLNoticeClick(Sender: TObject);
|
||||
begin
|
||||
DoSourceEditorCommand(ecInsertModifiedLGPLNotice);
|
||||
end;
|
||||
|
||||
procedure TMainIDE.mnuSourceInsertModifiedLGPLNoticeTranslatedClick(
|
||||
Sender: TObject);
|
||||
begin
|
||||
DoSourceEditorCommand(ecInsertModifiedLGPLNoticeTranslated);
|
||||
end;
|
||||
|
||||
procedure TMainIDE.mnuSourceInsertMITNoticeClick(Sender: TObject);
|
||||
begin
|
||||
DoSourceEditorCommand(ecInsertMITNotice);
|
||||
end;
|
||||
|
||||
procedure TMainIDE.mnuSourceInsertMITNoticeTranslatedClick(Sender: TObject);
|
||||
begin
|
||||
DoSourceEditorCommand(ecInsertMITNoticeTranslated);
|
||||
end;
|
||||
|
||||
procedure TMainIDE.mnuSourceInsertUsernameClick(Sender: TObject);
|
||||
begin
|
||||
DoSourceEditorCommand(ecInsertUserName);
|
||||
|
||||
@ -225,9 +225,13 @@ type
|
||||
itmSourceInsertCVSSource: TIDEMenuCommand;
|
||||
//itmSourceInsertGeneral: TIDEMenuSection;
|
||||
itmSourceInsertGPLNotice: TIDEMenuCommand;
|
||||
itmSourceInsertGPLNoticeTranslated: TIDEMenuCommand;
|
||||
itmSourceInsertLGPLNotice: TIDEMenuCommand;
|
||||
itmSourceInsertLGPLNoticeTranslated: TIDEMenuCommand;
|
||||
itmSourceInsertModifiedLGPLNotice: TIDEMenuCommand;
|
||||
itmSourceInsertModifiedLGPLNoticeTranslated: TIDEMenuCommand;
|
||||
itmSourceInsertMITNotice: TIDEMenuCommand;
|
||||
itmSourceInsertMITNoticeTranslated: TIDEMenuCommand;
|
||||
itmSourceInsertUsername: TIDEMenuCommand;
|
||||
itmSourceInsertDateTime: TIDEMenuCommand;
|
||||
itmSourceInsertChangeLogEntry: TIDEMenuCommand;
|
||||
|
||||
@ -859,9 +859,13 @@ begin
|
||||
SubParentMI:=itmSourceInsertGeneral;
|
||||
// insert general text sub menu items
|
||||
CreateMenuItem(SubParentMI,itmSourceInsertGPLNotice,'itmSourceInsertGPLNotice',lisMenuInsertGPLNotice);
|
||||
CreateMenuItem(SubParentMI,itmSourceInsertGPLNoticeTranslated,'itmSourceInsertGPLNoticeTranslated',lisMenuInsertGPLNoticeTranslated);
|
||||
CreateMenuItem(SubParentMI,itmSourceInsertLGPLNotice,'itmSourceInsertLGPLNotice',lisMenuInsertLGPLNotice);
|
||||
CreateMenuItem(SubParentMI,itmSourceInsertLGPLNoticeTranslated,'itmSourceInsertLGPLNoticeTranslated',lisMenuInsertLGPLNoticeTranslated);
|
||||
CreateMenuItem(SubParentMI,itmSourceInsertModifiedLGPLNotice,'itmSourceInsertModifiedLGPLNotice',lisMenuInsertModifiedLGPLNotice);
|
||||
CreateMenuItem(SubParentMI,itmSourceInsertModifiedLGPLNoticeTranslated,'itmSourceInsertModifiedLGPLNoticeTranslated',lisMenuInsertModifiedLGPLNoticeTranslated);
|
||||
CreateMenuItem(SubParentMI,itmSourceInsertMITNotice,'itmSourceInsertMITNotice',lisMenuInsertMITNotice);
|
||||
CreateMenuItem(SubParentMI,itmSourceInsertMITNoticeTranslated,'itmSourceInsertMITNoticeTranslated',lisMenuInsertMITNoticeTranslated);
|
||||
CreateMenuItem(SubParentMI,itmSourceInsertUsername,'itmSourceInsertUsername',lisMenuInsertUsername);
|
||||
CreateMenuItem(SubParentMI,itmSourceInsertDateTime,'itmSourceInsertDateTime',lisMenuInsertDateTime);
|
||||
CreateMenuItem(SubParentMI,itmSourceInsertChangeLogEntry,'itmSourceInsertChangeLogEntry',lisMenuInsertChangeLogEntry);
|
||||
@ -1202,9 +1206,13 @@ begin
|
||||
itmSourceInsertCVSSource.Command:=GetCommand(ecInsertCVSSource);
|
||||
|
||||
itmSourceInsertGPLNotice.Command:=GetCommand(ecInsertGPLNotice);
|
||||
itmSourceInsertGPLNoticeTranslated.Command:=GetCommand(ecInsertGPLNoticeTranslated);
|
||||
itmSourceInsertLGPLNotice.Command:=GetCommand(ecInsertLGPLNotice);
|
||||
itmSourceInsertLGPLNoticeTranslated.Command:=GetCommand(ecInsertLGPLNoticeTranslated);
|
||||
itmSourceInsertModifiedLGPLNotice.Command:=GetCommand(ecInsertModifiedLGPLNotice);
|
||||
itmSourceInsertModifiedLGPLNoticeTranslated.Command:=GetCommand(ecInsertModifiedLGPLNoticeTranslated);
|
||||
itmSourceInsertMITNotice.Command:=GetCommand(ecInsertMITNotice);
|
||||
itmSourceInsertMITNoticeTranslated.Command:=GetCommand(ecInsertMITNoticeTranslated);
|
||||
itmSourceInsertUsername.Command:=GetCommand(ecInsertUserName);
|
||||
itmSourceInsertDateTime.Command:=GetCommand(ecInsertDateTime);
|
||||
itmSourceInsertChangeLogEntry.Command:=GetCommand(ecInsertChangeLogEntry);
|
||||
|
||||
@ -430,10 +430,10 @@ type
|
||||
function CommentText(const Txt: string; CommentType: TCommentType): string;
|
||||
procedure InsertCharacterFromMap;
|
||||
procedure InsertLicenseNotice(const Notice: string; CommentType: TCommentType);
|
||||
procedure InsertGPLNotice(CommentType: TCommentType);
|
||||
procedure InsertLGPLNotice(CommentType: TCommentType);
|
||||
procedure InsertModifiedLGPLNotice(CommentType: TCommentType);
|
||||
procedure InsertMITNotice(CommentType: TCommentType);
|
||||
procedure InsertGPLNotice(CommentType: TCommentType; Translated: boolean);
|
||||
procedure InsertLGPLNotice(CommentType: TCommentType; Translated: boolean);
|
||||
procedure InsertModifiedLGPLNotice(CommentType: TCommentType; Translated: boolean);
|
||||
procedure InsertMITNotice(CommentType: TCommentType; Translated: boolean);
|
||||
procedure InsertUsername;
|
||||
procedure InsertDateTime;
|
||||
procedure InsertChangeLogEntry;
|
||||
@ -1327,6 +1327,11 @@ var
|
||||
function CompareSrcEditIntfWithFilename(SrcEdit1, SrcEdit2: Pointer): integer;
|
||||
function CompareFilenameWithSrcEditIntf(FilenameStr, SrcEdit: Pointer): integer;
|
||||
|
||||
var
|
||||
EnglishGPLNotice: string;
|
||||
EnglishLGPLNotice: string;
|
||||
EnglishModifiedLGPLNotice: string;
|
||||
EnglishMITNotice: string;
|
||||
|
||||
implementation
|
||||
|
||||
@ -3469,16 +3474,24 @@ Begin
|
||||
InsertCharacterFromMap;
|
||||
|
||||
ecInsertGPLNotice:
|
||||
InsertGPLNotice(comtDefault);
|
||||
InsertGPLNotice(comtDefault,false);
|
||||
ecInsertGPLNoticeTranslated:
|
||||
InsertGPLNotice(comtDefault,true);
|
||||
|
||||
ecInsertLGPLNotice:
|
||||
InsertLGPLNotice(comtDefault);
|
||||
InsertLGPLNotice(comtDefault,false);
|
||||
ecInsertLGPLNoticeTranslated:
|
||||
InsertLGPLNotice(comtDefault,true);
|
||||
|
||||
ecInsertModifiedLGPLNotice:
|
||||
InsertModifiedLGPLNotice(comtDefault);
|
||||
InsertModifiedLGPLNotice(comtDefault,false);
|
||||
ecInsertModifiedLGPLNoticeTranslated:
|
||||
InsertModifiedLGPLNotice(comtDefault,true);
|
||||
|
||||
ecInsertMITNotice:
|
||||
InsertMITNotice(comtDefault);
|
||||
InsertMITNotice(comtDefault,false);
|
||||
ecInsertMITNoticeTranslated:
|
||||
InsertMITNotice(comtDefault,true);
|
||||
|
||||
ecInsertUserName:
|
||||
InsertUsername;
|
||||
@ -3951,24 +3964,52 @@ begin
|
||||
FEditor.InsertTextAtCaret(Txt);
|
||||
end;
|
||||
|
||||
procedure TSourceEditor.InsertGPLNotice(CommentType: TCommentType);
|
||||
procedure TSourceEditor.InsertGPLNotice(CommentType: TCommentType;
|
||||
Translated: boolean);
|
||||
var
|
||||
s: String;
|
||||
begin
|
||||
InsertLicenseNotice(lisGPLNotice, CommentType);
|
||||
if Translated then
|
||||
s:=lisGPLNotice
|
||||
else
|
||||
s:=EnglishGPLNotice;
|
||||
InsertLicenseNotice(s, CommentType);
|
||||
end;
|
||||
|
||||
procedure TSourceEditor.InsertLGPLNotice(CommentType: TCommentType);
|
||||
procedure TSourceEditor.InsertLGPLNotice(CommentType: TCommentType;
|
||||
Translated: boolean);
|
||||
var
|
||||
s: String;
|
||||
begin
|
||||
InsertLicenseNotice(lisLGPLNotice, CommentType);
|
||||
if Translated then
|
||||
s:=lisLGPLNotice
|
||||
else
|
||||
s:=EnglishLGPLNotice;
|
||||
InsertLicenseNotice(s, CommentType);
|
||||
end;
|
||||
|
||||
procedure TSourceEditor.InsertModifiedLGPLNotice(CommentType: TCommentType);
|
||||
procedure TSourceEditor.InsertModifiedLGPLNotice(CommentType: TCommentType;
|
||||
Translated: boolean);
|
||||
var
|
||||
s: String;
|
||||
begin
|
||||
InsertLicenseNotice(lisModifiedLGPLNotice, CommentType);
|
||||
if Translated then
|
||||
s:=lisModifiedLGPLNotice
|
||||
else
|
||||
s:=EnglishModifiedLGPLNotice;
|
||||
InsertLicenseNotice(s, CommentType);
|
||||
end;
|
||||
|
||||
procedure TSourceEditor.InsertMITNotice(CommentType: TCommentType);
|
||||
procedure TSourceEditor.InsertMITNotice(CommentType: TCommentType;
|
||||
Translated: boolean);
|
||||
var
|
||||
s: String;
|
||||
begin
|
||||
InsertLicenseNotice(lisMITNotice, CommentType);
|
||||
if Translated then
|
||||
s:=lisMITNotice
|
||||
else
|
||||
s:=EnglishMITNotice;
|
||||
InsertLicenseNotice(s, CommentType);
|
||||
end;
|
||||
|
||||
procedure TSourceEditor.InsertUsername;
|
||||
@ -8689,10 +8730,21 @@ end;
|
||||
procedure InternalInit;
|
||||
var h: TLazSyntaxHighlighter;
|
||||
begin
|
||||
// fetch the resourcestrings before they are translated
|
||||
EnglishGPLNotice:=lisGPLNotice;
|
||||
EnglishLGPLNotice:=lisLGPLNotice;
|
||||
EnglishModifiedLGPLNotice:=lisModifiedLGPLNotice;
|
||||
EnglishMITNotice:=lisMITNotice;
|
||||
|
||||
for h:=Low(TLazSyntaxHighlighter) to High(TLazSyntaxHighlighter) do
|
||||
Highlighters[h]:=nil;
|
||||
IDESearchInText:=@SearchInText;
|
||||
PasBeautifier := TSynBeautifierPascal.Create(nil);
|
||||
|
||||
SRCED_LOCK := DebugLogger.RegisterLogGroup('SRCED_LOCK' {$IFDEF SRCED_LOCK} , True {$ENDIF} );
|
||||
SRCED_OPEN := DebugLogger.RegisterLogGroup('SRCED_OPEN' {$IFDEF SRCED_OPEN} , True {$ENDIF} );
|
||||
SRCED_CLOSE := DebugLogger.RegisterLogGroup('SRCED_CLOSE' {$IFDEF SRCED_CLOSE} , True {$ENDIF} );
|
||||
SRCED_PAGES := DebugLogger.RegisterLogGroup('SRCED_PAGES' {$IFDEF SRCED_PAGES} , True {$ENDIF} );
|
||||
end;
|
||||
|
||||
procedure InternalFinal;
|
||||
@ -10523,11 +10575,6 @@ begin
|
||||
end;
|
||||
|
||||
initialization
|
||||
SRCED_LOCK := DebugLogger.RegisterLogGroup('SRCED_LOCK' {$IFDEF SRCED_LOCK} , True {$ENDIF} );
|
||||
SRCED_OPEN := DebugLogger.RegisterLogGroup('SRCED_OPEN' {$IFDEF SRCED_OPEN} , True {$ENDIF} );
|
||||
SRCED_CLOSE := DebugLogger.RegisterLogGroup('SRCED_CLOSE' {$IFDEF SRCED_CLOSE} , True {$ENDIF} );
|
||||
SRCED_PAGES := DebugLogger.RegisterLogGroup('SRCED_PAGES' {$IFDEF SRCED_PAGES} , True {$ENDIF} );
|
||||
|
||||
InternalInit;
|
||||
|
||||
finalization
|
||||
|
||||
Loading…
Reference in New Issue
Block a user