mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 16:20:17 +02:00
IDE: mode matrix: menu items for macros and outdir
git-svn-id: trunk@41333 -
This commit is contained in:
parent
ae3978f2d2
commit
a04b0b636f
@ -26,7 +26,7 @@ object CompOptModeMatrix: TCompOptModeMatrix
|
||||
ShowHint = True
|
||||
end
|
||||
object BMMMoveDownToolButton: TToolButton
|
||||
Left = 24
|
||||
Left = 26
|
||||
Top = 2
|
||||
Caption = 'Down'
|
||||
OnClick = BMMMoveDownToolButtonClick
|
||||
@ -34,7 +34,7 @@ object CompOptModeMatrix: TCompOptModeMatrix
|
||||
ShowHint = True
|
||||
end
|
||||
object BMMUndoToolButton: TToolButton
|
||||
Left = 74
|
||||
Left = 80
|
||||
Top = 2
|
||||
Caption = 'Undo'
|
||||
OnClick = BMMUndoToolButtonClick
|
||||
@ -42,7 +42,7 @@ object CompOptModeMatrix: TCompOptModeMatrix
|
||||
ShowHint = True
|
||||
end
|
||||
object BMMRedoToolButton: TToolButton
|
||||
Left = 111
|
||||
Left = 121
|
||||
Top = 2
|
||||
Caption = 'Redo'
|
||||
OnClick = BMMRedoToolButtonClick
|
||||
@ -50,7 +50,7 @@ object CompOptModeMatrix: TCompOptModeMatrix
|
||||
ShowHint = True
|
||||
end
|
||||
object BMMDeleteToolButton: TToolButton
|
||||
Left = 210
|
||||
Left = 226
|
||||
Top = 2
|
||||
Caption = 'Delete'
|
||||
OnClick = BMMDeleteToolButtonClick
|
||||
@ -58,28 +58,28 @@ object CompOptModeMatrix: TCompOptModeMatrix
|
||||
ShowHint = True
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 64
|
||||
Left = 70
|
||||
Top = 2
|
||||
Width = 10
|
||||
Caption = 'ToolButton1'
|
||||
Style = tbsSeparator
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 148
|
||||
Left = 161
|
||||
Top = 2
|
||||
Width = 10
|
||||
Caption = 'ToolButton2'
|
||||
Style = tbsSeparator
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 200
|
||||
Left = 216
|
||||
Top = 2
|
||||
Width = 10
|
||||
Caption = 'ToolButton3'
|
||||
Style = tbsSeparator
|
||||
end
|
||||
object BMMAddToolButton: TToolButton
|
||||
Left = 158
|
||||
Left = 171
|
||||
Top = 2
|
||||
Caption = 'Add'
|
||||
DropdownMenu = BMMAddPopupMenu
|
||||
@ -91,9 +91,17 @@ object CompOptModeMatrix: TCompOptModeMatrix
|
||||
OnPopup = BMMAddPopupMenuPopup
|
||||
left = 232
|
||||
top = 93
|
||||
object BMMNewOptionMenuItem: TMenuItem
|
||||
Caption = 'New Option'
|
||||
OnClick = BMMNewOptionMenuItemClick
|
||||
object BMMNewCustomOptionMenuItem: TMenuItem
|
||||
Caption = 'New Custom Option'
|
||||
OnClick = BMMNewCustomOptionMenuItemClick
|
||||
end
|
||||
object BMMNewIDEMacroMenuItem: TMenuItem
|
||||
Caption = 'New IDE Macro'
|
||||
OnClick = BMMNewIDEMacroMenuItemClick
|
||||
end
|
||||
object BMMNewOutDirMenuItem: TMenuItem
|
||||
Caption = 'New Output Directory'
|
||||
OnClick = BMMNewOutDirMenuItemClick
|
||||
end
|
||||
object BMMNewTargetMenuItem: TMenuItem
|
||||
Caption = 'New Target'
|
||||
|
@ -19,7 +19,6 @@
|
||||
***************************************************************************
|
||||
|
||||
ToDo:
|
||||
- replace new option with the three option types
|
||||
- load old build macro values into matrix
|
||||
- save matrix options for old build macro values
|
||||
- ifdef old frame
|
||||
@ -56,10 +55,12 @@ type
|
||||
BMMMoveUpToolButton: TToolButton;
|
||||
BMMRedoToolButton: TToolButton;
|
||||
BMMUndoToolButton: TToolButton;
|
||||
BMMNewOptionMenuItem: TMenuItem;
|
||||
BMMNewCustomOptionMenuItem: TMenuItem;
|
||||
BMMAddPopupMenu: TPopupMenu;
|
||||
BMMNewTargetMenuItem: TMenuItem;
|
||||
BMMAddToolButton: TToolButton;
|
||||
BMMNewIDEMacroMenuItem: TMenuItem;
|
||||
BMMNewOutDirMenuItem: TMenuItem;
|
||||
ToolButton1: TToolButton;
|
||||
ToolButton2: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
@ -67,9 +68,11 @@ type
|
||||
procedure BMMMoveDownToolButtonClick(Sender: TObject);
|
||||
procedure BMMMoveUpToolButtonClick(Sender: TObject);
|
||||
procedure BMMAddPopupMenuPopup(Sender: TObject);
|
||||
procedure BMMNewIDEMacroMenuItemClick(Sender: TObject);
|
||||
procedure BMMNewOutDirMenuItemClick(Sender: TObject);
|
||||
procedure BMMRedoToolButtonClick(Sender: TObject);
|
||||
procedure BMMUndoToolButtonClick(Sender: TObject);
|
||||
procedure BMMNewOptionMenuItemClick(Sender: TObject);
|
||||
procedure BMMNewCustomOptionMenuItemClick(Sender: TObject);
|
||||
procedure BMMNewTargetMenuItemClick(Sender: TObject);
|
||||
procedure BMMAddToolButtonClick(Sender: TObject);
|
||||
procedure GridEditingDone(Sender: TObject);
|
||||
@ -467,9 +470,9 @@ begin
|
||||
CreateNewOption(BuildMatrixOptionTypeCaption(bmotIDEMacro),MacroName+':='+Value);
|
||||
end;
|
||||
|
||||
procedure TCompOptModeMatrix.BMMNewOptionMenuItemClick(Sender: TObject);
|
||||
procedure TCompOptModeMatrix.BMMNewCustomOptionMenuItemClick(Sender: TObject);
|
||||
begin
|
||||
CreateNewOption('','');
|
||||
CreateNewOption(BuildMatrixOptionTypeCaption(bmotCustom),BuildMatrixDefaultValue(bmotCustom));
|
||||
end;
|
||||
|
||||
procedure TCompOptModeMatrix.BMMUndoToolButtonClick(Sender: TObject);
|
||||
@ -563,8 +566,9 @@ begin
|
||||
end;
|
||||
end;
|
||||
List.Sort;
|
||||
MenuIndex:=2;
|
||||
MenuIndex:=BMMNewTargetMenuItem.MenuIndex;
|
||||
for i:=0 to List.Count-1 do begin
|
||||
inc(MenuIndex);
|
||||
Macro:=TLazBuildMacro(List.Objects[i]);
|
||||
if BMMAddPopupMenu.Items.Count=MenuIndex then
|
||||
BMMAddPopupMenu.Items.Add(TMenuItem.Create(Self));
|
||||
@ -579,13 +583,22 @@ begin
|
||||
ValueMenuItem.OnClick:=@OnAddMacroMenuItemClick;
|
||||
end;
|
||||
end;
|
||||
inc(MenuIndex);
|
||||
end;
|
||||
finally
|
||||
List.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCompOptModeMatrix.BMMNewIDEMacroMenuItemClick(Sender: TObject);
|
||||
begin
|
||||
CreateNewOption(BuildMatrixOptionTypeCaption(bmotIDEMacro),BuildMatrixDefaultValue(bmotIDEMacro));
|
||||
end;
|
||||
|
||||
procedure TCompOptModeMatrix.BMMNewOutDirMenuItemClick(Sender: TObject);
|
||||
begin
|
||||
CreateNewOption(BuildMatrixOptionTypeCaption(bmotOutDir),BuildMatrixDefaultValue(bmotOutDir));
|
||||
end;
|
||||
|
||||
procedure TCompOptModeMatrix.BMMMoveDownToolButtonClick(Sender: TObject);
|
||||
begin
|
||||
MoveRow(1);
|
||||
@ -952,15 +965,18 @@ begin
|
||||
BMMRedoToolButton.Caption:=lisRedo;
|
||||
BMMRedoToolButton.Hint:=lisMMRedoLastUndoToThisGrid;
|
||||
|
||||
BMMNewTargetMenuItem.Caption:=lisMMNewTarget;
|
||||
BMMNewTargetMenuItem.Hint:=lisMMCreateANewGroupOfOptions;
|
||||
|
||||
BMMNewOptionMenuItem.Caption:=lisMMNewOption;
|
||||
BMMNewOptionMenuItem.Hint:=lisMMCreateANewOption;
|
||||
BMMAddToolButton.Caption:=lisAdd;
|
||||
|
||||
BMMDeleteToolButton.Caption:=lisDelete;
|
||||
BMMDeleteToolButton.Hint:=lisMMDeleteTheSelectedTargetOrOption;
|
||||
|
||||
BMMNewTargetMenuItem.Caption:=lisMMNewTarget;
|
||||
BMMNewTargetMenuItem.Hint:=lisMMCreateANewGroupOfOptions;
|
||||
|
||||
BMMNewCustomOptionMenuItem.Caption:=lisMMCustomOption;
|
||||
BMMNewIDEMacroMenuItem.Caption:=lisMMIDEMacro;
|
||||
BMMNewOutDirMenuItem.Caption:=lisMMOutputDirectory;
|
||||
|
||||
fCaptionPatternMacroName:=lisMMSetS;
|
||||
fCaptionPatternMacroValue:=lisMMValueS;
|
||||
|
||||
|
@ -5701,15 +5701,16 @@ resourcestring
|
||||
lisMMMoveSelectedItemUp = 'Move selected item up';
|
||||
lisMMMoveSelectedItemDown = 'Move selected item down';
|
||||
lisMMNewTarget = 'New Target';
|
||||
lisMMNewOption = 'New Option';
|
||||
lisMMUndoLastChangeToThisGrid = 'Undo last change to this grid';
|
||||
lisMMRedoLastUndoToThisGrid = 'Redo last undo to this grid';
|
||||
lisMMCreateANewGroupOfOptions = 'Create a new group of options';
|
||||
lisMMCreateANewOption = 'Create a new option';
|
||||
lisMMDeleteTheSelectedTargetOrOption = 'Delete the selected target or option';
|
||||
lisMMSetS = 'Set "%s"';
|
||||
lisMMValueS = 'Value "%s"';
|
||||
lisMMInvalidCharacterAt = 'invalid character "%s" at %s';
|
||||
lisMMCustomOption = 'Custom Option';
|
||||
lisMMIDEMacro = 'IDE Macro';
|
||||
lisMMOutputDirectory = 'Output Directory';
|
||||
|
||||
implementation
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user