mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 06:22:30 +02:00
IDE: improve Path Editor's GUI
git-svn-id: trunk@35315 -
This commit is contained in:
parent
5b0a8deab2
commit
ce0d3e2bc4
@ -40,6 +40,10 @@ uses
|
|||||||
Classes, SysUtils;
|
Classes, SysUtils;
|
||||||
|
|
||||||
resourcestring
|
resourcestring
|
||||||
|
// Common strings that can be used around Lazarus:
|
||||||
|
lisAdd = 'Add';
|
||||||
|
|
||||||
|
// errors
|
||||||
lisErrInvalidOption = 'Invalid option at position %d: "%s"';
|
lisErrInvalidOption = 'Invalid option at position %d: "%s"';
|
||||||
lisErrNoOptionAllowed = 'Option at position %d does not allow an argument: %s';
|
lisErrNoOptionAllowed = 'Option at position %d does not allow an argument: %s';
|
||||||
lisErrOptionNeeded = 'Option at position %d needs an argument : %s';
|
lisErrOptionNeeded = 'Option at position %d needs an argument : %s';
|
||||||
@ -52,13 +56,11 @@ resourcestring
|
|||||||
|
|
||||||
// command line help
|
// command line help
|
||||||
listhisHelpMessage = 'this help message';
|
listhisHelpMessage = 'this help message';
|
||||||
lisprimaryConfigDirectoryWhereLazarusStoresItsConfig =
|
lisprimaryConfigDirectoryWhereLazarusStoresItsConfig = 'primary config '+
|
||||||
'primary config '+
|
|
||||||
'directory, where Lazarus stores its config files. Default is ';
|
'directory, where Lazarus stores its config files. Default is ';
|
||||||
lislazarusOptionsProjectFilename = 'lazarus [options] <project-filename>';
|
lislazarusOptionsProjectFilename = 'lazarus [options] <project-filename>';
|
||||||
lisIDEOptions = 'IDE Options:';
|
lisIDEOptions = 'IDE Options:';
|
||||||
lisCmdLineLCLInterfaceSpecificOptions =
|
lisCmdLineLCLInterfaceSpecificOptions = 'LCL Interface specific options:';
|
||||||
'LCL Interface specific options:';
|
|
||||||
lisDoNotShowSplashScreen = 'Do not show splash screen';
|
lisDoNotShowSplashScreen = 'Do not show splash screen';
|
||||||
lisSkipLoadingLastProject = 'Skip loading last project';
|
lisSkipLoadingLastProject = 'Skip loading last project';
|
||||||
lisOverrideLanguage = 'Override language. For example --language=de.'+
|
lisOverrideLanguage = 'Override language. For example --language=de.'+
|
||||||
@ -3352,10 +3354,11 @@ resourcestring
|
|||||||
lisPathEditSearchPaths = 'Search paths:';
|
lisPathEditSearchPaths = 'Search paths:';
|
||||||
lisPckSearchPathsForFpdocXmlFilesMultiplePathsMustBeSepa = 'Search paths for'
|
lisPckSearchPathsForFpdocXmlFilesMultiplePathsMustBeSepa = 'Search paths for'
|
||||||
+' fpdoc xml files. Multiple paths must be separated by semicolon.';
|
+' fpdoc xml files. Multiple paths must be separated by semicolon.';
|
||||||
lisPathEditMovePathDown = 'Move path down';
|
lisPathEditMovePathDown = 'Move path down (Ctrl+Down)';
|
||||||
lisPathEditMovePathUp = 'Move path up';
|
lisPathEditMovePathUp = 'Move path up (Ctrl+Up)';
|
||||||
lisPathEditBrowse = 'Browse';
|
lisPathEditBrowse = 'Browse';
|
||||||
lisPathEditPathTemplates = 'Path templates';
|
lisPathEditPathTemplates = 'Path templates';
|
||||||
|
lisPathEditDeleteInvalidPaths = 'Delete Invalid Paths';
|
||||||
|
|
||||||
// new dialog
|
// new dialog
|
||||||
lisNewDlgNoItemSelected = 'No item selected';
|
lisNewDlgNoItemSelected = 'No item selected';
|
||||||
@ -4438,12 +4441,10 @@ resourcestring
|
|||||||
lisReplacingSelectionFailed = 'Replacing selection failed.';
|
lisReplacingSelectionFailed = 'Replacing selection failed.';
|
||||||
lisUnableToFindInLFMStream = 'Unable to find %s in LFM Stream.';
|
lisUnableToFindInLFMStream = 'Unable to find %s in LFM Stream.';
|
||||||
lisErrorParsingLfmComponentStream = 'Error parsing lfm component stream.';
|
lisErrorParsingLfmComponentStream = 'Error parsing lfm component stream.';
|
||||||
lisUnableToCreateTemporaryLfmBuffer =
|
lisUnableToCreateTemporaryLfmBuffer = 'Unable to create temporary lfm buffer.';
|
||||||
'Unable to create temporary lfm buffer.';
|
|
||||||
lisUnableToGetSourceForDesigner = 'Unable to get source for designer.';
|
lisUnableToGetSourceForDesigner = 'Unable to get source for designer.';
|
||||||
lisUnableToGatherEditorChanges = 'Unable to gather editor changes.';
|
lisUnableToGatherEditorChanges = 'Unable to gather editor changes.';
|
||||||
lisUnableToStreamSelectedComponents2 =
|
lisUnableToStreamSelectedComponents2 = 'Unable to stream selected components.';
|
||||||
'Unable to stream selected components.';
|
|
||||||
lisUnableToChangeClassOfTo = '%s%sUnable to change class of %s to %s';
|
lisUnableToChangeClassOfTo = '%s%sUnable to change class of %s to %s';
|
||||||
lisCanOnlyChangeTheClassOfTComponents = 'Can only change the class of TComponents.';
|
lisCanOnlyChangeTheClassOfTComponents = 'Can only change the class of TComponents.';
|
||||||
lisOldClass = 'Old Class';
|
lisOldClass = 'Old Class';
|
||||||
@ -4471,10 +4472,6 @@ resourcestring
|
|||||||
lisCEProcedures = 'Procedures';
|
lisCEProcedures = 'Procedures';
|
||||||
lisCEProperties = 'Properties';
|
lisCEProperties = 'Properties';
|
||||||
lisCodeObserver = 'Code Observer';
|
lisCodeObserver = 'Code Observer';
|
||||||
dlgCOMoveLevelDown = 'Move level down';
|
|
||||||
dlgCOMoveLevelUp = 'Move level up';
|
|
||||||
dlgCOMoveDown = 'Move down';
|
|
||||||
dlgCOMoveUp = 'Move up';
|
|
||||||
lisCEOMode = 'Preferred exhibition mode';
|
lisCEOMode = 'Preferred exhibition mode';
|
||||||
lisCEOModeCategory = 'Category';
|
lisCEOModeCategory = 'Category';
|
||||||
lisCEOModeSource = 'Source';
|
lisCEOModeSource = 'Source';
|
||||||
|
@ -1,732 +1,188 @@
|
|||||||
object PathEditorDialog: TPathEditorDialog
|
object PathEditorDialog: TPathEditorDialog
|
||||||
Left = 295
|
Left = 420
|
||||||
Height = 400
|
Height = 446
|
||||||
Top = 158
|
Top = 156
|
||||||
Width = 500
|
Width = 553
|
||||||
ActiveControl = PathEdit
|
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = 'PathEditorDialog'
|
Caption = 'PathEditorDialog'
|
||||||
ClientHeight = 400
|
ClientHeight = 446
|
||||||
ClientWidth = 500
|
ClientWidth = 553
|
||||||
Constraints.MinHeight = 400
|
Constraints.MinHeight = 400
|
||||||
Constraints.MinWidth = 500
|
Constraints.MinWidth = 500
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnResize = FormResize
|
OnResize = FormResize
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '0.9.29'
|
LCLVersion = '0.9.31'
|
||||||
object PathGroupBox: TGroupBox
|
object PathGroupBox: TGroupBox
|
||||||
AnchorSideRight.Side = asrBottom
|
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 194
|
Height = 221
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 488
|
Width = 541
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'PathGroupBox'
|
Caption = 'PathGroupBox'
|
||||||
ClientHeight = 175
|
ClientHeight = 202
|
||||||
ClientWidth = 484
|
ClientWidth = 535
|
||||||
Constraints.MinHeight = 194
|
Constraints.MinHeight = 194
|
||||||
Constraints.MinWidth = 488
|
Constraints.MinWidth = 488
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
inline PathEdit: TSynEdit
|
|
||||||
AnchorSideLeft.Control = PathGroupBox
|
|
||||||
AnchorSideTop.Control = PathGroupBox
|
|
||||||
AnchorSideRight.Control = PathGroupBox
|
|
||||||
AnchorSideRight.Side = asrBottom
|
|
||||||
AnchorSideBottom.Control = MoveUpButton
|
|
||||||
Left = 6
|
|
||||||
Height = 128
|
|
||||||
Top = 6
|
|
||||||
Width = 472
|
|
||||||
BorderSpacing.Around = 6
|
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
|
||||||
Font.Height = -16
|
|
||||||
Font.Name = 'courier'
|
|
||||||
Font.Pitch = fpFixed
|
|
||||||
Font.Quality = fqNonAntialiased
|
|
||||||
ParentColor = False
|
|
||||||
ParentFont = False
|
|
||||||
TabOrder = 0
|
|
||||||
BookMarkOptions.Xoffset = -18
|
|
||||||
Gutter.Visible = False
|
|
||||||
Gutter.Width = 0
|
|
||||||
Gutter.MouseActions = <
|
|
||||||
item
|
|
||||||
Shift = []
|
|
||||||
ShiftMask = []
|
|
||||||
Button = mbLeft
|
|
||||||
ClickCount = ccAny
|
|
||||||
ClickDir = cdDown
|
|
||||||
Command = 13
|
|
||||||
MoveCaret = False
|
|
||||||
Option = 0
|
|
||||||
Priority = 0
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Shift = []
|
|
||||||
ShiftMask = []
|
|
||||||
Button = mbRight
|
|
||||||
ClickCount = ccSingle
|
|
||||||
ClickDir = cdUp
|
|
||||||
Command = 12
|
|
||||||
MoveCaret = False
|
|
||||||
Option = 0
|
|
||||||
Priority = 0
|
|
||||||
end>
|
|
||||||
Keystrokes = <
|
|
||||||
item
|
|
||||||
Command = ecUp
|
|
||||||
ShortCut = 38
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSelUp
|
|
||||||
ShortCut = 8230
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecScrollUp
|
|
||||||
ShortCut = 16422
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecDown
|
|
||||||
ShortCut = 40
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSelDown
|
|
||||||
ShortCut = 8232
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecScrollDown
|
|
||||||
ShortCut = 16424
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecLeft
|
|
||||||
ShortCut = 37
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSelLeft
|
|
||||||
ShortCut = 8229
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecWordLeft
|
|
||||||
ShortCut = 16421
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSelWordLeft
|
|
||||||
ShortCut = 24613
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecRight
|
|
||||||
ShortCut = 39
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSelRight
|
|
||||||
ShortCut = 8231
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecWordRight
|
|
||||||
ShortCut = 16423
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSelWordRight
|
|
||||||
ShortCut = 24615
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecPageDown
|
|
||||||
ShortCut = 34
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSelPageDown
|
|
||||||
ShortCut = 8226
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecPageBottom
|
|
||||||
ShortCut = 16418
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSelPageBottom
|
|
||||||
ShortCut = 24610
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecPageUp
|
|
||||||
ShortCut = 33
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSelPageUp
|
|
||||||
ShortCut = 8225
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecPageTop
|
|
||||||
ShortCut = 16417
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSelPageTop
|
|
||||||
ShortCut = 24609
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecLineStart
|
|
||||||
ShortCut = 36
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSelLineStart
|
|
||||||
ShortCut = 8228
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecEditorTop
|
|
||||||
ShortCut = 16420
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSelEditorTop
|
|
||||||
ShortCut = 24612
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecLineEnd
|
|
||||||
ShortCut = 35
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSelLineEnd
|
|
||||||
ShortCut = 8227
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecEditorBottom
|
|
||||||
ShortCut = 16419
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSelEditorBottom
|
|
||||||
ShortCut = 24611
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecToggleMode
|
|
||||||
ShortCut = 45
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecCopy
|
|
||||||
ShortCut = 16429
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecPaste
|
|
||||||
ShortCut = 8237
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecDeleteChar
|
|
||||||
ShortCut = 46
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecCut
|
|
||||||
ShortCut = 8238
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecDeleteLastChar
|
|
||||||
ShortCut = 8
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecDeleteLastChar
|
|
||||||
ShortCut = 8200
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecDeleteLastWord
|
|
||||||
ShortCut = 16392
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecUndo
|
|
||||||
ShortCut = 32776
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecRedo
|
|
||||||
ShortCut = 40968
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecLineBreak
|
|
||||||
ShortCut = 13
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSelectAll
|
|
||||||
ShortCut = 16449
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecCopy
|
|
||||||
ShortCut = 16451
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecBlockIndent
|
|
||||||
ShortCut = 24649
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecLineBreak
|
|
||||||
ShortCut = 16461
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecInsertLine
|
|
||||||
ShortCut = 16462
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecDeleteWord
|
|
||||||
ShortCut = 16468
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecBlockUnindent
|
|
||||||
ShortCut = 24661
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecPaste
|
|
||||||
ShortCut = 16470
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecCut
|
|
||||||
ShortCut = 16472
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecDeleteLine
|
|
||||||
ShortCut = 16473
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecDeleteEOL
|
|
||||||
ShortCut = 24665
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecUndo
|
|
||||||
ShortCut = 16474
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecRedo
|
|
||||||
ShortCut = 24666
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecGotoMarker0
|
|
||||||
ShortCut = 16432
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecGotoMarker1
|
|
||||||
ShortCut = 16433
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecGotoMarker2
|
|
||||||
ShortCut = 16434
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecGotoMarker3
|
|
||||||
ShortCut = 16435
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecGotoMarker4
|
|
||||||
ShortCut = 16436
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecGotoMarker5
|
|
||||||
ShortCut = 16437
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecGotoMarker6
|
|
||||||
ShortCut = 16438
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecGotoMarker7
|
|
||||||
ShortCut = 16439
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecGotoMarker8
|
|
||||||
ShortCut = 16440
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecGotoMarker9
|
|
||||||
ShortCut = 16441
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSetMarker0
|
|
||||||
ShortCut = 24624
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSetMarker1
|
|
||||||
ShortCut = 24625
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSetMarker2
|
|
||||||
ShortCut = 24626
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSetMarker3
|
|
||||||
ShortCut = 24627
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSetMarker4
|
|
||||||
ShortCut = 24628
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSetMarker5
|
|
||||||
ShortCut = 24629
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSetMarker6
|
|
||||||
ShortCut = 24630
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSetMarker7
|
|
||||||
ShortCut = 24631
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSetMarker8
|
|
||||||
ShortCut = 24632
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecSetMarker9
|
|
||||||
ShortCut = 24633
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecNormalSelect
|
|
||||||
ShortCut = 24654
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecColumnSelect
|
|
||||||
ShortCut = 24643
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecLineSelect
|
|
||||||
ShortCut = 24652
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecTab
|
|
||||||
ShortCut = 9
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecShiftTab
|
|
||||||
ShortCut = 8201
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Command = ecMatchBracket
|
|
||||||
ShortCut = 24642
|
|
||||||
end>
|
|
||||||
MouseActions = <
|
|
||||||
item
|
|
||||||
Shift = []
|
|
||||||
ShiftMask = [ssShift, ssAlt]
|
|
||||||
Button = mbLeft
|
|
||||||
ClickCount = ccSingle
|
|
||||||
ClickDir = cdDown
|
|
||||||
Command = 1
|
|
||||||
MoveCaret = True
|
|
||||||
Option = 0
|
|
||||||
Priority = 0
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Shift = [ssShift]
|
|
||||||
ShiftMask = [ssShift, ssAlt]
|
|
||||||
Button = mbLeft
|
|
||||||
ClickCount = ccSingle
|
|
||||||
ClickDir = cdDown
|
|
||||||
Command = 1
|
|
||||||
MoveCaret = True
|
|
||||||
Option = 1
|
|
||||||
Priority = 0
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Shift = [ssAlt]
|
|
||||||
ShiftMask = [ssShift, ssAlt]
|
|
||||||
Button = mbLeft
|
|
||||||
ClickCount = ccSingle
|
|
||||||
ClickDir = cdDown
|
|
||||||
Command = 3
|
|
||||||
MoveCaret = True
|
|
||||||
Option = 0
|
|
||||||
Priority = 0
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Shift = [ssShift, ssAlt]
|
|
||||||
ShiftMask = [ssShift, ssAlt]
|
|
||||||
Button = mbLeft
|
|
||||||
ClickCount = ccSingle
|
|
||||||
ClickDir = cdDown
|
|
||||||
Command = 3
|
|
||||||
MoveCaret = True
|
|
||||||
Option = 1
|
|
||||||
Priority = 0
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Shift = []
|
|
||||||
ShiftMask = []
|
|
||||||
Button = mbRight
|
|
||||||
ClickCount = ccSingle
|
|
||||||
ClickDir = cdUp
|
|
||||||
Command = 12
|
|
||||||
MoveCaret = False
|
|
||||||
Option = 0
|
|
||||||
Priority = 0
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Shift = []
|
|
||||||
ShiftMask = []
|
|
||||||
Button = mbLeft
|
|
||||||
ClickCount = ccDouble
|
|
||||||
ClickDir = cdDown
|
|
||||||
Command = 6
|
|
||||||
MoveCaret = True
|
|
||||||
Option = 0
|
|
||||||
Priority = 0
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Shift = []
|
|
||||||
ShiftMask = []
|
|
||||||
Button = mbLeft
|
|
||||||
ClickCount = ccTriple
|
|
||||||
ClickDir = cdDown
|
|
||||||
Command = 7
|
|
||||||
MoveCaret = True
|
|
||||||
Option = 0
|
|
||||||
Priority = 0
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Shift = []
|
|
||||||
ShiftMask = []
|
|
||||||
Button = mbLeft
|
|
||||||
ClickCount = ccQuad
|
|
||||||
ClickDir = cdDown
|
|
||||||
Command = 8
|
|
||||||
MoveCaret = True
|
|
||||||
Option = 0
|
|
||||||
Priority = 0
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Shift = []
|
|
||||||
ShiftMask = []
|
|
||||||
Button = mbMiddle
|
|
||||||
ClickCount = ccSingle
|
|
||||||
ClickDir = cdDown
|
|
||||||
Command = 10
|
|
||||||
MoveCaret = True
|
|
||||||
Option = 0
|
|
||||||
Priority = 0
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Shift = [ssCtrl]
|
|
||||||
ShiftMask = [ssShift, ssAlt, ssCtrl]
|
|
||||||
Button = mbLeft
|
|
||||||
ClickCount = ccSingle
|
|
||||||
ClickDir = cdUp
|
|
||||||
Command = 11
|
|
||||||
MoveCaret = False
|
|
||||||
Option = 0
|
|
||||||
Priority = 0
|
|
||||||
end>
|
|
||||||
MouseSelActions = <
|
|
||||||
item
|
|
||||||
Shift = []
|
|
||||||
ShiftMask = []
|
|
||||||
Button = mbLeft
|
|
||||||
ClickCount = ccSingle
|
|
||||||
ClickDir = cdDown
|
|
||||||
Command = 9
|
|
||||||
MoveCaret = False
|
|
||||||
Option = 0
|
|
||||||
Priority = 0
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Shift = []
|
|
||||||
ShiftMask = []
|
|
||||||
Button = mbLeft
|
|
||||||
ClickCount = ccSingle
|
|
||||||
ClickDir = cdDown
|
|
||||||
Command = 9
|
|
||||||
MoveCaret = False
|
|
||||||
Option = 0
|
|
||||||
Priority = 0
|
|
||||||
end>
|
|
||||||
Lines.Strings = (
|
|
||||||
'PathEdit'
|
|
||||||
)
|
|
||||||
Options = [eoDragDropEditing, eoHalfPageScroll, eoScrollByOneLess, eoScrollPastEol, eoSmartTabs, eoTabsToSpaces, eoTrimTrailingSpaces, eoBracketHighlight, eoHideRightMargin]
|
|
||||||
BracketHighlightStyle = sbhsBoth
|
|
||||||
inline TSynGutterPartList
|
|
||||||
object TSynGutterMarks
|
|
||||||
Width = 23
|
|
||||||
end
|
|
||||||
object TSynGutterLineNumber
|
|
||||||
Width = 25
|
|
||||||
MouseActions = <>
|
|
||||||
MarkupInfo.Background = clBtnFace
|
|
||||||
MarkupInfo.Foreground = clNone
|
|
||||||
DigitCount = 2
|
|
||||||
ShowOnlyLineNumbersMultiplesOf = 1
|
|
||||||
ZeroStart = False
|
|
||||||
LeadingZeros = False
|
|
||||||
end
|
|
||||||
object TSynGutterChanges
|
|
||||||
Width = 4
|
|
||||||
ModifiedColor = 59900
|
|
||||||
SavedColor = clGreen
|
|
||||||
end
|
|
||||||
object TSynGutterSeparator
|
|
||||||
Width = 2
|
|
||||||
end
|
|
||||||
object TSynGutterCodeFolding
|
|
||||||
MouseActions = <
|
|
||||||
item
|
|
||||||
Shift = []
|
|
||||||
ShiftMask = []
|
|
||||||
Button = mbRight
|
|
||||||
ClickCount = ccSingle
|
|
||||||
ClickDir = cdUp
|
|
||||||
Command = 16
|
|
||||||
MoveCaret = False
|
|
||||||
Option = 0
|
|
||||||
Priority = 0
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Shift = []
|
|
||||||
ShiftMask = [ssShift]
|
|
||||||
Button = mbMiddle
|
|
||||||
ClickCount = ccAny
|
|
||||||
ClickDir = cdDown
|
|
||||||
Command = 14
|
|
||||||
MoveCaret = False
|
|
||||||
Option = 0
|
|
||||||
Priority = 0
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Shift = [ssShift]
|
|
||||||
ShiftMask = [ssShift]
|
|
||||||
Button = mbMiddle
|
|
||||||
ClickCount = ccAny
|
|
||||||
ClickDir = cdDown
|
|
||||||
Command = 14
|
|
||||||
MoveCaret = False
|
|
||||||
Option = 1
|
|
||||||
Priority = 0
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Shift = []
|
|
||||||
ShiftMask = []
|
|
||||||
Button = mbLeft
|
|
||||||
ClickCount = ccAny
|
|
||||||
ClickDir = cdDown
|
|
||||||
Command = 0
|
|
||||||
MoveCaret = False
|
|
||||||
Option = 0
|
|
||||||
Priority = 0
|
|
||||||
end>
|
|
||||||
MarkupInfo.Background = clNone
|
|
||||||
MarkupInfo.Foreground = clGray
|
|
||||||
MouseActionsExpanded = <
|
|
||||||
item
|
|
||||||
Shift = []
|
|
||||||
ShiftMask = []
|
|
||||||
Button = mbLeft
|
|
||||||
ClickCount = ccAny
|
|
||||||
ClickDir = cdDown
|
|
||||||
Command = 14
|
|
||||||
MoveCaret = False
|
|
||||||
Option = 0
|
|
||||||
Priority = 0
|
|
||||||
end>
|
|
||||||
MouseActionsCollapsed = <
|
|
||||||
item
|
|
||||||
Shift = [ssCtrl]
|
|
||||||
ShiftMask = [ssCtrl]
|
|
||||||
Button = mbLeft
|
|
||||||
ClickCount = ccAny
|
|
||||||
ClickDir = cdDown
|
|
||||||
Command = 15
|
|
||||||
MoveCaret = False
|
|
||||||
Option = 0
|
|
||||||
Priority = 0
|
|
||||||
end
|
|
||||||
item
|
|
||||||
Shift = []
|
|
||||||
ShiftMask = [ssCtrl]
|
|
||||||
Button = mbLeft
|
|
||||||
ClickCount = ccAny
|
|
||||||
ClickDir = cdDown
|
|
||||||
Command = 15
|
|
||||||
MoveCaret = False
|
|
||||||
Option = 1
|
|
||||||
Priority = 0
|
|
||||||
end>
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object MoveUpButton: TBitBtn
|
object MoveUpButton: TBitBtn
|
||||||
AnchorSideLeft.Control = PathGroupBox
|
AnchorSideLeft.Control = PathGroupBox
|
||||||
|
AnchorSideRight.Control = PathGroupBox
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = PathGroupBox
|
AnchorSideBottom.Control = PathGroupBox
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 6
|
Left = 504
|
||||||
Height = 29
|
Height = 25
|
||||||
Top = 140
|
Top = 47
|
||||||
Width = 110
|
Width = 25
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akRight]
|
||||||
AutoSize = True
|
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'MoveUpButton'
|
Caption = 'MoveUpButton'
|
||||||
NumGlyphs = 0
|
NumGlyphs = 0
|
||||||
OnClick = MoveUpButtonClick
|
OnClick = MoveUpButtonClick
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object MoveDownButton: TBitBtn
|
object MoveDownButton: TBitBtn
|
||||||
AnchorSideLeft.Control = MoveUpButton
|
AnchorSideLeft.Control = MoveUpButton
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrCenter
|
||||||
|
AnchorSideTop.Control = MoveUpButton
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideBottom.Control = PathGroupBox
|
AnchorSideBottom.Control = PathGroupBox
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 122
|
Left = 504
|
||||||
Height = 29
|
Height = 25
|
||||||
Top = 140
|
Top = 86
|
||||||
Width = 127
|
Width = 25
|
||||||
Anchors = [akLeft, akBottom]
|
BorderSpacing.Around = 14
|
||||||
AutoSize = True
|
|
||||||
BorderSpacing.Around = 6
|
|
||||||
Caption = 'MoveDownButton'
|
Caption = 'MoveDownButton'
|
||||||
NumGlyphs = 0
|
NumGlyphs = 0
|
||||||
OnClick = MoveDownButtonClick
|
OnClick = MoveDownButtonClick
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object BrowseButton: TBitBtn
|
|
||||||
AnchorSideLeft.Control = MoveDownButton
|
|
||||||
AnchorSideLeft.Side = asrBottom
|
|
||||||
AnchorSideTop.Control = MoveDownButton
|
|
||||||
AnchorSideBottom.Control = PathGroupBox
|
|
||||||
AnchorSideBottom.Side = asrBottom
|
|
||||||
Left = 255
|
|
||||||
Height = 29
|
|
||||||
Top = 140
|
|
||||||
Width = 104
|
|
||||||
Anchors = [akTop, akLeft, akBottom]
|
|
||||||
AutoSize = True
|
|
||||||
BorderSpacing.Left = 6
|
|
||||||
BorderSpacing.Right = 6
|
|
||||||
BorderSpacing.Bottom = 6
|
|
||||||
Caption = 'BrowseButton'
|
|
||||||
NumGlyphs = 0
|
|
||||||
OnClick = BrowseButtonClick
|
|
||||||
TabOrder = 3
|
|
||||||
end
|
|
||||||
object DeleteButton: TBitBtn
|
object DeleteButton: TBitBtn
|
||||||
AnchorSideLeft.Control = BrowseButton
|
AnchorSideLeft.Control = AddButton
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideBottom.Control = PathGroupBox
|
AnchorSideBottom.Control = PathGroupBox
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 365
|
Left = 185
|
||||||
Height = 29
|
Height = 24
|
||||||
Top = 140
|
Top = 172
|
||||||
Width = 100
|
Width = 86
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'DeleteButton'
|
Caption = 'DeleteButton'
|
||||||
|
Enabled = False
|
||||||
NumGlyphs = 0
|
NumGlyphs = 0
|
||||||
OnClick = DeleteButtonClick
|
OnClick = DeleteButtonClick
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
|
object PathListBox: TListBox
|
||||||
|
AnchorSideLeft.Control = PathGroupBox
|
||||||
|
AnchorSideTop.Control = PathGroupBox
|
||||||
|
AnchorSideRight.Control = MoveUpButton
|
||||||
|
AnchorSideBottom.Control = DirectoryEdit
|
||||||
|
Left = 6
|
||||||
|
Height = 132
|
||||||
|
Top = 6
|
||||||
|
Width = 492
|
||||||
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
ItemHeight = 0
|
||||||
|
OnKeyDown = PathListBoxKeyDown
|
||||||
|
OnSelectionChange = PathListBoxSelectionChange
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object DirectoryEdit: TDirectoryEdit
|
||||||
|
AnchorSideLeft.Control = ReplaceButton
|
||||||
|
AnchorSideRight.Control = PathListBox
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
AnchorSideBottom.Control = ReplaceButton
|
||||||
|
Left = 6
|
||||||
|
Height = 22
|
||||||
|
Top = 144
|
||||||
|
Width = 492
|
||||||
|
ShowHidden = False
|
||||||
|
ButtonWidth = 23
|
||||||
|
NumGlyphs = 0
|
||||||
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
|
MaxLength = 0
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = DirectoryEditChange
|
||||||
|
end
|
||||||
|
object ReplaceButton: TBitBtn
|
||||||
|
AnchorSideLeft.Control = PathGroupBox
|
||||||
|
AnchorSideBottom.Control = PathGroupBox
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 24
|
||||||
|
Top = 172
|
||||||
|
Width = 95
|
||||||
|
Anchors = [akLeft, akBottom]
|
||||||
|
AutoSize = True
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'ReplaceButton'
|
||||||
|
Enabled = False
|
||||||
|
NumGlyphs = 0
|
||||||
|
OnClick = ReplaceButtonClick
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
|
object AddButton: TBitBtn
|
||||||
|
AnchorSideLeft.Control = ReplaceButton
|
||||||
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideBottom.Control = PathGroupBox
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
|
Left = 107
|
||||||
|
Height = 24
|
||||||
|
Top = 172
|
||||||
|
Width = 72
|
||||||
|
Anchors = [akLeft, akBottom]
|
||||||
|
AutoSize = True
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'AddButton'
|
||||||
|
Enabled = False
|
||||||
|
NumGlyphs = 0
|
||||||
|
OnClick = AddButtonClick
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
object DeleteInvalidPathsButton: TBitBtn
|
||||||
|
AnchorSideLeft.Control = DeleteButton
|
||||||
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideBottom.Control = PathGroupBox
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
|
Left = 277
|
||||||
|
Height = 24
|
||||||
|
Top = 172
|
||||||
|
Width = 154
|
||||||
|
Anchors = [akLeft, akBottom]
|
||||||
|
AutoSize = True
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'DeleteInvalidPathsButton'
|
||||||
|
Enabled = False
|
||||||
|
NumGlyphs = 0
|
||||||
|
OnClick = DeleteInvalidPathsButtonClick
|
||||||
|
TabOrder = 7
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object TemplateGroupBox: TGroupBox
|
object TemplateGroupBox: TGroupBox
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Side = asrBottom
|
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 150
|
Height = 164
|
||||||
Top = 206
|
Top = 244
|
||||||
Width = 488
|
Width = 541
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = []
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'TemplateGroupBox'
|
Caption = 'TemplateGroupBox'
|
||||||
ClientHeight = 131
|
ClientHeight = 145
|
||||||
ClientWidth = 484
|
ClientWidth = 535
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object TemplatesListBox: TListBox
|
object TemplatesListBox: TListBox
|
||||||
AnchorSideLeft.Control = TemplateGroupBox
|
AnchorSideLeft.Control = TemplateGroupBox
|
||||||
@ -735,25 +191,24 @@ object PathEditorDialog: TPathEditorDialog
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = AddTemplateButton
|
AnchorSideBottom.Control = AddTemplateButton
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 84
|
Height = 103
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 472
|
Width = 523
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
MultiSelect = True
|
MultiSelect = True
|
||||||
OnDblClick = TemplatesListBoxDblClick
|
OnSelectionChange = TemplatesListBoxSelectionChange
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
TopIndex = -1
|
|
||||||
end
|
end
|
||||||
object AddTemplateButton: TBitBtn
|
object AddTemplateButton: TBitBtn
|
||||||
AnchorSideLeft.Control = TemplateGroupBox
|
AnchorSideLeft.Control = TemplateGroupBox
|
||||||
AnchorSideBottom.Control = TemplateGroupBox
|
AnchorSideBottom.Control = TemplateGroupBox
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 29
|
Height = 24
|
||||||
Top = 96
|
Top = 115
|
||||||
Width = 141
|
Width = 123
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
@ -765,16 +220,33 @@ object PathEditorDialog: TPathEditorDialog
|
|||||||
end
|
end
|
||||||
object ButtonPanel1: TButtonPanel
|
object ButtonPanel1: TButtonPanel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 32
|
Height = 26
|
||||||
Top = 362
|
Top = 414
|
||||||
Width = 488
|
Width = 541
|
||||||
|
OKButton.Name = 'OKButton'
|
||||||
|
OKButton.DefaultCaption = True
|
||||||
|
HelpButton.Name = 'HelpButton'
|
||||||
|
HelpButton.DefaultCaption = True
|
||||||
|
CloseButton.Name = 'CloseButton'
|
||||||
|
CloseButton.DefaultCaption = True
|
||||||
|
CancelButton.Name = 'CancelButton'
|
||||||
|
CancelButton.DefaultCaption = True
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
ShowButtons = [pbOK, pbCancel]
|
ShowButtons = [pbOK, pbCancel]
|
||||||
ShowBevel = False
|
ShowBevel = False
|
||||||
end
|
end
|
||||||
|
object Splitter1: TSplitter
|
||||||
|
Cursor = crVSplit
|
||||||
|
Left = 0
|
||||||
|
Height = 5
|
||||||
|
Top = 233
|
||||||
|
Width = 553
|
||||||
|
Align = alBottom
|
||||||
|
ResizeAnchor = akBottom
|
||||||
|
end
|
||||||
object BrowseDialog: TSelectDirectoryDialog
|
object BrowseDialog: TSelectDirectoryDialog
|
||||||
Options = [ofFileMustExist, ofEnableSizing, ofViewDetail]
|
Options = [ofFileMustExist, ofEnableSizing, ofViewDetail]
|
||||||
left = 355
|
left = 504
|
||||||
top = 80
|
top = 32
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -28,7 +28,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Forms, Controls, SynEdit, Buttons, StdCtrls, Dialogs,
|
Classes, SysUtils, Forms, Controls, SynEdit, Buttons, StdCtrls, Dialogs,
|
||||||
FileUtil, ButtonPanel, MacroIntf,
|
FileUtil, ButtonPanel, ExtCtrls, EditBtn, MacroIntf, LCLType,
|
||||||
LazarusIDEStrConsts, EditorOptions;
|
LazarusIDEStrConsts, EditorOptions;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -37,42 +37,55 @@ type
|
|||||||
|
|
||||||
TPathEditorDialog = class(TForm)
|
TPathEditorDialog = class(TForm)
|
||||||
AddTemplateButton: TBitBtn;
|
AddTemplateButton: TBitBtn;
|
||||||
BrowseButton: TBitBtn;
|
|
||||||
ButtonPanel1: TButtonPanel;
|
ButtonPanel1: TButtonPanel;
|
||||||
|
ReplaceButton: TBitBtn;
|
||||||
|
AddButton: TBitBtn;
|
||||||
|
DeleteInvalidPathsButton: TBitBtn;
|
||||||
|
DirectoryEdit: TDirectoryEdit;
|
||||||
|
Splitter1: TSplitter;
|
||||||
DeleteButton: TBitBtn;
|
DeleteButton: TBitBtn;
|
||||||
|
PathListBox: TListBox;
|
||||||
MoveDownButton: TBitBtn;
|
MoveDownButton: TBitBtn;
|
||||||
MoveUpButton: TBitBtn;
|
MoveUpButton: TBitBtn;
|
||||||
TemplatesListBox: TListBox;
|
TemplatesListBox: TListBox;
|
||||||
TemplateGroupBox: TGroupBox;
|
TemplateGroupBox: TGroupBox;
|
||||||
PathGroupBox: TGroupBox;
|
PathGroupBox: TGroupBox;
|
||||||
PathEdit: TSynEdit;
|
|
||||||
BrowseDialog: TSelectDirectoryDialog;
|
BrowseDialog: TSelectDirectoryDialog;
|
||||||
|
procedure AddButtonClick(Sender: TObject);
|
||||||
procedure AddTemplateButtonClick(Sender: TObject);
|
procedure AddTemplateButtonClick(Sender: TObject);
|
||||||
procedure BrowseButtonClick(Sender: TObject);
|
procedure DeleteInvalidPathsButtonClick(Sender: TObject);
|
||||||
procedure DeleteButtonClick(Sender: TObject);
|
procedure DeleteButtonClick(Sender: TObject);
|
||||||
|
procedure DirectoryEditChange(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure FormResize(Sender: TObject);
|
procedure FormResize(Sender: TObject);
|
||||||
procedure MoveDownButtonClick(Sender: TObject);
|
procedure MoveDownButtonClick(Sender: TObject);
|
||||||
procedure MoveUpButtonClick(Sender: TObject);
|
procedure MoveUpButtonClick(Sender: TObject);
|
||||||
|
procedure PathListBoxKeyDown(Sender: TObject; var Key: Word;
|
||||||
|
Shift: TShiftState);
|
||||||
|
procedure PathListBoxSelectionChange(Sender: TObject; User: boolean);
|
||||||
|
procedure ReplaceButtonClick(Sender: TObject);
|
||||||
procedure TemplatesListBoxDblClick(Sender: TObject);
|
procedure TemplatesListBoxDblClick(Sender: TObject);
|
||||||
|
procedure TemplatesListBoxSelectionChange(Sender: TObject; User: boolean);
|
||||||
private
|
private
|
||||||
FBaseDirectory: string;
|
FBaseDirectory: string;
|
||||||
FEffectiveBaseDirectory: string;
|
FEffectiveBaseDirectory: string;
|
||||||
function GetPath: string;
|
function GetPath: string;
|
||||||
function GetTemplates: string;
|
function GetTemplates: string;
|
||||||
function PathToText(const APath: string): string;
|
function PathToText(const APath: string): string;
|
||||||
procedure SelectCurrentPath;
|
function RelativePathHelper: String;
|
||||||
|
function AbsolutePathHelper: String;
|
||||||
procedure SetBaseDirectory(const AValue: string);
|
procedure SetBaseDirectory(const AValue: string);
|
||||||
procedure SetPath(const AValue: string);
|
procedure SetPath(const AValue: string);
|
||||||
procedure SetTemplates(const AValue: string);
|
procedure SetTemplates(const AValue: string);
|
||||||
function TextToPath(const AText: string): string;
|
function TextToPath(const AText: string): string;
|
||||||
|
procedure UpdateButtons;
|
||||||
public
|
public
|
||||||
property BaseDirectory: string read FBaseDirectory write SetBaseDirectory;
|
property BaseDirectory: string read FBaseDirectory write SetBaseDirectory;
|
||||||
property EffectiveBaseDirectory: string read FEffectiveBaseDirectory;
|
property EffectiveBaseDirectory: string read FEffectiveBaseDirectory;
|
||||||
property Path: string read GetPath write SetPath;
|
property Path: string read GetPath write SetPath;
|
||||||
property Templates: string read GetTemplates write SetTemplates;
|
property Templates: string read GetTemplates write SetTemplates;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TOnPathEditorExecuted = TNotifyEvent;
|
TOnPathEditorExecuted = TNotifyEvent;
|
||||||
|
|
||||||
TPathEditorButton = class(TButton)
|
TPathEditorButton = class(TButton)
|
||||||
@ -102,128 +115,188 @@ var PathEditor: TPathEditorDialog;
|
|||||||
|
|
||||||
function PathEditorDialog: TPathEditorDialog;
|
function PathEditorDialog: TPathEditorDialog;
|
||||||
begin
|
begin
|
||||||
if PathEditor=nil then PathEditor:=TPathEditorDialog.Create(Application);
|
if PathEditor=nil then
|
||||||
|
PathEditor:=TPathEditorDialog.Create(Application);
|
||||||
Result:=PathEditor;
|
Result:=PathEditor;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TPathEditorDialog }
|
{ TPathEditorDialog }
|
||||||
|
|
||||||
procedure TPathEditorDialog.AddTemplateButtonClick(Sender: TObject);
|
function TPathEditorDialog.RelativePathHelper: String;
|
||||||
var i, y: integer;
|
|
||||||
begin
|
begin
|
||||||
y:=-1;
|
Result:=DirectoryEdit.Text;
|
||||||
for i:=0 to TemplatesListBox.Items.Count-1 do begin
|
if (FEffectiveBaseDirectory<>'') and FilenameIsAbsolute(FEffectiveBaseDirectory) then
|
||||||
if TemplatesListBox.Selected[i] then begin
|
Result:=CreateRelativePath(Result, FEffectiveBaseDirectory);
|
||||||
PathEdit.Lines.Add(TemplatesListBox.Items[i]);
|
|
||||||
y:=PathEdit.Lines.Count;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
if y>=1 then PathEdit.CaretY:=y;
|
|
||||||
SelectCurrentPath;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPathEditorDialog.BrowseButtonClick(Sender: TObject);
|
function TPathEditorDialog.AbsolutePathHelper: String;
|
||||||
var y: integer;
|
|
||||||
NewPath: String;
|
|
||||||
begin
|
begin
|
||||||
with BrowseDialog do begin
|
Result:=PathListBox.Items[PathListBox.ItemIndex];
|
||||||
Title:=lisPathEditSelectDirectory;
|
if (FEffectiveBaseDirectory<>'') and FilenameIsAbsolute(FEffectiveBaseDirectory) then
|
||||||
if (not Execute) then exit;
|
Result:=CreateAbsolutePath(Result, FEffectiveBaseDirectory);
|
||||||
y:=PathEdit.CaretY;
|
end;
|
||||||
if y>PathEdit.Lines.Count then y:=PathEdit.Lines.Count;
|
|
||||||
NewPath:=Filename;
|
procedure TPathEditorDialog.AddButtonClick(Sender: TObject);
|
||||||
if (FEffectiveBaseDirectory<>'')
|
var
|
||||||
and FilenameIsAbsolute(FEffectiveBaseDirectory) then
|
y: integer;
|
||||||
NewPath:=CreateRelativePath(NewPath,FEffectiveBaseDirectory);
|
begin
|
||||||
PathEdit.Lines.Insert(y,Trim(NewPath));
|
y:=PathListBox.ItemIndex+1;
|
||||||
PathEdit.CaretY:=y+1;
|
if y=0 then
|
||||||
|
y:=PathListBox.Count;
|
||||||
|
PathListBox.Items.Insert(y,Trim(RelativePathHelper));
|
||||||
|
PathListBox.ItemIndex:=y;
|
||||||
|
UpdateButtons;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TPathEditorDialog.ReplaceButtonClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if PathListBox.ItemIndex>-1 then begin
|
||||||
|
PathListBox.Items[PathListBox.ItemIndex]:=Trim(RelativePathHelper);
|
||||||
|
UpdateButtons;
|
||||||
end;
|
end;
|
||||||
SelectCurrentPath;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPathEditorDialog.DeleteButtonClick(Sender: TObject);
|
procedure TPathEditorDialog.DeleteButtonClick(Sender: TObject);
|
||||||
var y: integer;
|
var
|
||||||
|
y: integer;
|
||||||
begin
|
begin
|
||||||
y:=PathEdit.CaretY-1;
|
y:=PathListBox.ItemIndex;
|
||||||
if (y>=0) and (y<PathEdit.Lines.Count) then begin
|
if (y>=0) and (y<PathListBox.Count) then begin
|
||||||
PathEdit.Lines.Delete(y);
|
PathListBox.Items.Delete(y);
|
||||||
SelectCurrentPath;
|
UpdateButtons;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TPathEditorDialog.DeleteInvalidPathsButtonClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TPathEditorDialog.AddTemplateButtonClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
i, y: integer;
|
||||||
|
begin
|
||||||
|
y:=-1;
|
||||||
|
for i:=0 to TemplatesListBox.Items.Count-1 do begin
|
||||||
|
if TemplatesListBox.Selected[i]
|
||||||
|
and (PathListBox.Items.IndexOf(TemplatesListBox.Items[i])=-1) then begin
|
||||||
|
PathListBox.Items.Add(TemplatesListBox.Items[i]);
|
||||||
|
y:=PathListBox.Count-1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if y>=1 then
|
||||||
|
PathListBox.ItemIndex:=y;
|
||||||
|
UpdateButtons;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TPathEditorDialog.DirectoryEditChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
UpdateButtons;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TPathEditorDialog.FormCreate(Sender: TObject);
|
procedure TPathEditorDialog.FormCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Caption:=dlgDebugOptionsPathEditorDlgCaption;
|
Caption:=dlgDebugOptionsPathEditorDlgCaption;
|
||||||
|
|
||||||
PathGroupBox.Caption:=lisPathEditSearchPaths;
|
PathGroupBox.Caption:=lisPathEditSearchPaths;
|
||||||
MoveUpButton.Caption:=lisPathEditMovePathUp;
|
MoveUpButton.Hint:=lisPathEditMovePathUp;
|
||||||
MoveDownButton.Caption:=lisPathEditMovePathDown;
|
MoveDownButton.Hint:=lisPathEditMovePathDown;
|
||||||
BrowseButton.Caption:=lisPathEditBrowse;
|
|
||||||
|
ReplaceButton.Caption:=lisMenuReplace;
|
||||||
|
AddButton.Caption:=lisAdd;
|
||||||
DeleteButton.Caption:=dlgEdDelete;
|
DeleteButton.Caption:=dlgEdDelete;
|
||||||
|
DeleteInvalidPathsButton.Caption:=lisPathEditDeleteInvalidPaths;
|
||||||
|
|
||||||
TemplateGroupBox.Caption:=lisPathEditPathTemplates;
|
TemplateGroupBox.Caption:=lisPathEditPathTemplates;
|
||||||
AddTemplateButton.Caption:=lisCodeTemplAdd;
|
AddTemplateButton.Caption:=lisCodeTemplAdd;
|
||||||
|
|
||||||
AddTemplateButton.LoadGlyphFromLazarusResource('laz_add');
|
|
||||||
MoveUpButton.LoadGlyphFromLazarusResource('arrow_up');
|
MoveUpButton.LoadGlyphFromLazarusResource('arrow_up');
|
||||||
MoveDownButton.LoadGlyphFromLazarusResource('arrow_down');
|
MoveDownButton.LoadGlyphFromLazarusResource('arrow_down');
|
||||||
|
ReplaceButton.LoadGlyphFromLazarusResource('menu_reportingbug');
|
||||||
|
AddButton.LoadGlyphFromLazarusResource('laz_add');
|
||||||
DeleteButton.LoadGlyphFromLazarusResource('laz_delete');
|
DeleteButton.LoadGlyphFromLazarusResource('laz_delete');
|
||||||
|
DeleteInvalidPathsButton.LoadGlyphFromLazarusResource('menu_clean');
|
||||||
|
AddTemplateButton.LoadGlyphFromLazarusResource('laz_add');
|
||||||
|
|
||||||
PathEdit.Font.BeginUpdate;
|
PathListBox.ItemIndex:=-1;
|
||||||
PathEdit.Font.Pitch := SynDefaultFontPitch;
|
TemplatesListBox.ItemIndex:=-1;
|
||||||
EditorOpts.ApplyFontSettingsTo(PathEdit);
|
|
||||||
PathEdit.Font.EndUpdate;
|
|
||||||
PathEdit.ExtraCharSpacing := EditorOpts.ExtraCharSpacing;
|
|
||||||
PathEdit.ExtraLineSpacing := EditorOpts.ExtraLineSpacing;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPathEditorDialog.FormResize(Sender: TObject);
|
procedure TPathEditorDialog.FormResize(Sender: TObject);
|
||||||
var PathGroupBoxHeight: integer;
|
var
|
||||||
|
PathGroupBoxHeight: integer;
|
||||||
begin
|
begin
|
||||||
PathGroupBoxHeight:=((ClientHeight-70)*2) div 3;
|
PathGroupBoxHeight:=((ClientHeight-70)*2) div 3;
|
||||||
if PathGroupBoxHeight<10 then PathGroupBoxHeight:=10;
|
if PathGroupBoxHeight<10 then
|
||||||
|
PathGroupBoxHeight:=10;
|
||||||
PathGroupBox.Height:=PathGroupBoxHeight;
|
PathGroupBox.Height:=PathGroupBoxHeight;
|
||||||
|
UpdateButtons;
|
||||||
SelectCurrentPath;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPathEditorDialog.MoveDownButtonClick(Sender: TObject);
|
procedure TPathEditorDialog.MoveDownButtonClick(Sender: TObject);
|
||||||
var y: integer;
|
var
|
||||||
|
y: integer;
|
||||||
begin
|
begin
|
||||||
y:=PathEdit.CaretY-1;
|
y:=PathListBox.ItemIndex;
|
||||||
if (y>=0) and (y<PathEdit.Lines.Count-1) then begin
|
if (y>-1) and (y<PathListBox.Count-1) then begin
|
||||||
PathEdit.Lines.Move(y,y+1);
|
PathListBox.Items.Move(y,y+1);
|
||||||
PathEdit.CaretY:=y+2;
|
PathListBox.ItemIndex:=y+1;
|
||||||
SelectCurrentPath;
|
UpdateButtons;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPathEditorDialog.MoveUpButtonClick(Sender: TObject);
|
procedure TPathEditorDialog.MoveUpButtonClick(Sender: TObject);
|
||||||
var y: integer;
|
var
|
||||||
|
y: integer;
|
||||||
begin
|
begin
|
||||||
y:=PathEdit.CaretY-1;
|
y:=PathListBox.ItemIndex;
|
||||||
if (y>0) and (y<PathEdit.Lines.Count) then begin
|
if (y>0) and (y<PathListBox.Count) then begin
|
||||||
PathEdit.Lines.Move(y,y-1);
|
PathListBox.Items.Move(y,y-1);
|
||||||
PathEdit.CaretY:=y;
|
PathListBox.ItemIndex:=y-1;
|
||||||
SelectCurrentPath;
|
UpdateButtons;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TPathEditorDialog.PathListBoxKeyDown(Sender: TObject; var Key: Word;
|
||||||
|
Shift: TShiftState);
|
||||||
|
begin
|
||||||
|
if (ssCtrl in shift ) and ((Key = VK_UP) or (Key = VK_DOWN)) then begin
|
||||||
|
if Key = VK_UP then
|
||||||
|
MoveUpButtonClick(Nil)
|
||||||
|
else
|
||||||
|
MoveDownButtonClick(Nil);
|
||||||
|
Key:=VK_UNKNOWN;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TPathEditorDialog.PathListBoxSelectionChange(Sender: TObject; User: boolean);
|
||||||
|
begin
|
||||||
|
if PathListBox.ItemIndex>-1 then begin
|
||||||
|
DirectoryEdit.Text:=AbsolutePathHelper;
|
||||||
|
UpdateButtons;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TPathEditorDialog.TemplatesListBoxSelectionChange(Sender: TObject; User: boolean);
|
||||||
|
begin
|
||||||
|
UpdateButtons;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TPathEditorDialog.TemplatesListBoxDblClick(Sender: TObject);
|
procedure TPathEditorDialog.TemplatesListBoxDblClick(Sender: TObject);
|
||||||
var i: integer;
|
var
|
||||||
|
i: integer;
|
||||||
begin
|
begin
|
||||||
i := TemplatesListBox.ItemIndex;
|
i := TemplatesListBox.ItemIndex;
|
||||||
if i>=0 then begin
|
if i>=0 then begin
|
||||||
PathEdit.Lines.Add(TemplatesListBox.Items[i]);
|
PathListBox.Items.Add(TemplatesListBox.Items[i]);
|
||||||
PathEdit.CaretY:=PathEdit.Lines.Count;
|
PathListBox.ItemIndex:=PathListBox.Count-1;
|
||||||
SelectCurrentPath;
|
UpdateButtons;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TPathEditorDialog.GetPath: string;
|
function TPathEditorDialog.GetPath: string;
|
||||||
begin
|
begin
|
||||||
Result:=TextToPath(PathEdit.Text);
|
Result:=TextToPath(PathListBox.Items.Text);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TPathEditorDialog.GetTemplates: string;
|
function TPathEditorDialog.GetTemplates: string;
|
||||||
@ -233,38 +306,18 @@ end;
|
|||||||
|
|
||||||
procedure TPathEditorDialog.SetPath(const AValue: string);
|
procedure TPathEditorDialog.SetPath(const AValue: string);
|
||||||
begin
|
begin
|
||||||
PathEdit.Text:=PathToText(AValue);
|
PathListBox.Items.Text:=PathToText(AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPathEditorDialog.SetTemplates(const AValue: string);
|
procedure TPathEditorDialog.SetTemplates(const AValue: string);
|
||||||
var sl: TStringList;
|
|
||||||
i: integer;
|
|
||||||
begin
|
begin
|
||||||
sl:=TStringList.Create;
|
TemplatesListBox.Items.Text:=PathToText(AValue);
|
||||||
try
|
TemplateGroupBox.Visible:=TemplatesListBox.Count>0;
|
||||||
sl.Text:=PathToText(AValue);
|
|
||||||
with TemplatesListBox do begin
|
|
||||||
Items.BeginUpdate;
|
|
||||||
i:=0;
|
|
||||||
while i<sl.Count do begin
|
|
||||||
if Items.Count<=i then
|
|
||||||
Items.Add(sl[i])
|
|
||||||
else
|
|
||||||
Items[i]:=sl[i];
|
|
||||||
inc(i);
|
|
||||||
end;
|
|
||||||
while Items.Count>sl.Count do
|
|
||||||
Items.Delete(Items.Count-1);
|
|
||||||
Items.EndUpdate;
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
sl.Free;
|
|
||||||
end;
|
|
||||||
TemplateGroupBox.Visible:=TemplatesListBox.Items.Count>0;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TPathEditorDialog.TextToPath(const AText: string): string;
|
function TPathEditorDialog.TextToPath(const AText: string): string;
|
||||||
var i, j: integer;
|
var
|
||||||
|
i, j: integer;
|
||||||
PathAsText: string;
|
PathAsText: string;
|
||||||
begin
|
begin
|
||||||
PathAsText:=AText;
|
PathAsText:=AText;
|
||||||
@ -309,22 +362,33 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TPathEditorDialog.PathToText(const APath: string): string;
|
function TPathEditorDialog.PathToText(const APath: string): string;
|
||||||
var i: integer;
|
var
|
||||||
|
i: integer;
|
||||||
NewPath: string;
|
NewPath: string;
|
||||||
begin
|
begin
|
||||||
NewPath:=APath;
|
NewPath:=APath;
|
||||||
for i:=1 to length(NewPath) do
|
for i:=1 to length(NewPath) do
|
||||||
if NewPath[i]=';' then NewPath[i]:=#13;
|
if NewPath[i]=';' then
|
||||||
|
NewPath[i]:=#13;
|
||||||
Result:=NewPath;
|
Result:=NewPath;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPathEditorDialog.SelectCurrentPath;
|
procedure TPathEditorDialog.UpdateButtons;
|
||||||
var y: integer;
|
var
|
||||||
|
i: integer;
|
||||||
begin
|
begin
|
||||||
y:=PathEdit.CaretY;
|
// Replace / add / delete / Delete Invalid Paths
|
||||||
if y>PathEdit.Lines.Count then exit;
|
ReplaceButton.Enabled:=(DirectoryEdit.Text<>'') and (DirectoryEdit.Text<>FEffectiveBaseDirectory)
|
||||||
PathEdit.BlockBegin:=Point(0,y);
|
and (PathListBox.Items.IndexOf(RelativePathHelper)=-1);
|
||||||
PathEdit.BlockEnd:=Point(length(PathEdit.Lines[y-1])+1,y);
|
AddButton.Enabled:=ReplaceButton.Enabled;
|
||||||
|
DeleteButton.Enabled:=PathListBox.ItemIndex>-1;
|
||||||
|
DeleteInvalidPathsButton.Enabled:=False;
|
||||||
|
AddTemplateButton.Enabled:=(TemplatesListBox.SelCount>1) or ((TemplatesListBox.ItemIndex>-1)
|
||||||
|
and (PathListBox.Items.IndexOf(TemplatesListBox.Items[TemplatesListBox.ItemIndex])=-1));
|
||||||
|
// Move up / down buttons
|
||||||
|
i := PathListBox.ItemIndex;
|
||||||
|
MoveUpButton.Enabled := i > 0;
|
||||||
|
MoveDownButton.Enabled := (i > -1) and (i < PathListBox.Count-1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPathEditorDialog.SetBaseDirectory(const AValue: string);
|
procedure TPathEditorDialog.SetBaseDirectory(const AValue: string);
|
||||||
@ -333,7 +397,7 @@ begin
|
|||||||
FBaseDirectory:=AValue;
|
FBaseDirectory:=AValue;
|
||||||
FEffectiveBaseDirectory:=FBaseDirectory;
|
FEffectiveBaseDirectory:=FBaseDirectory;
|
||||||
IDEMacros.SubstituteMacros(FEffectiveBaseDirectory);
|
IDEMacros.SubstituteMacros(FEffectiveBaseDirectory);
|
||||||
BrowseDialog.InitialDir:=FEffectiveBaseDirectory;
|
DirectoryEdit.Directory:=FEffectiveBaseDirectory;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TPathEditorButton }
|
{ TPathEditorButton }
|
||||||
|
Loading…
Reference in New Issue
Block a user