moved TShowDeletingFilesDialog to separate file and converted to .lfm

replaced TListbox in TShowDeletingFilesDialog by TCheckListBox
changed file delete algorithm so that only checked files are deleted, default all files are checked (previous behaviour)
implemented TButtonPanel

git-svn-id: trunk@17007 -
This commit is contained in:
darius 2008-10-15 17:53:14 +00:00
parent 797872077d
commit c86d5ec42b
7 changed files with 718 additions and 245 deletions

3
.gitattributes vendored
View File

@ -2536,6 +2536,9 @@ ide/searchresultview.pp svneol=native#text/pascal
ide/showcompileropts.lfm svneol=native#text/plain
ide/showcompileropts.lrs svneol=native#text/pascal
ide/showcompileropts.pas svneol=native#text/pascal
ide/showdeletingfilesdlg.lfm svneol=native#text/plain
ide/showdeletingfilesdlg.lrs svneol=native#text/plain
ide/showdeletingfilesdlg.pas svneol=native#text/plain
ide/sortselectiondlg.pas svneol=native#text/pascal
ide/sourceeditor.lfm svneol=native#text/plain
ide/sourceeditor.lrs svneol=native#text/plain

View File

@ -1,57 +1,154 @@
object CleanDirectoryDialog: TCleanDirectoryDialog
Left = 307
Height = 309
Height = 364
Top = 209
Width = 450
HelpContext = 0
ActiveControl = DirCombobox
Align = alNone
AllowDropFiles = False
AutoScroll = True
AutoSize = True
BorderIcons = [biSystemMenu]
BorderStyle = bsSizeable
Caption = 'Clean Directory'
ClientHeight = 309
ChildSizing.LeftRightSpacing = 0
ChildSizing.TopBottomSpacing = 0
ChildSizing.HorizontalSpacing = 0
ChildSizing.VerticalSpacing = 0
ChildSizing.ControlsPerLine = 0
ClientHeight = 364
ClientWidth = 450
DockSite = False
DragKind = dkDrag
DragMode = dmManual
Enabled = True
Font.Height = 0
Font.Style = []
FormStyle = fsNormal
OnCreate = CleanDirectoryDialogCreate
ParentBiDiMode = True
ParentFont = False
Position = poScreenCenter
LCLVersion = '0.9.25'
ShowInTaskBar = stDefault
UseDockManager = False
LCLVersion = '0.9.27'
WindowState = wsNormal
object DirGroupbox: TGroupBox
Left = 6
Height = 76
Height = 88
Top = 6
Width = 438
HelpContext = 0
Align = alTop
AutoSize = True
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 6
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
Caption = 'Directory'
ClientHeight = 58
ChildSizing.LeftRightSpacing = 0
ChildSizing.TopBottomSpacing = 0
ChildSizing.HorizontalSpacing = 0
ChildSizing.VerticalSpacing = 0
ChildSizing.ControlsPerLine = 0
ClientHeight = 69
ClientWidth = 434
Ctl3D = False
DockSite = False
DragCursor = crDrag
DragKind = dkDrag
DragMode = dmManual
Enabled = True
ParentBidiMode = True
ParentColor = True
ParentCtl3D = False
ParentFont = True
ParentShowHint = True
TabOrder = 0
TabStop = False
Visible = True
object DirCombobox: TComboBox
AnchorSideRight.Control = DirBrowseButton
Left = 6
Height = 21
Height = 29
Top = 6
Width = 394
HelpContext = 0
TabStop = True
Align = alNone
Anchors = [akTop, akLeft, akRight]
ArrowKeysTraverseList = True
AutoComplete = False
AutoCompleteText = [cbactSearchAscending]
AutoDropDown = False
AutoSelect = False
AutoSize = True
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 6
ItemHeight = 13
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
CharCase = ecNormal
Ctl3D = False
DragCursor = crDrag
DragMode = dmManual
DropDownCount = 8
Enabled = True
ItemHeight = 0
ItemIndex = -1
ItemWidth = 0
MaxLength = 0
ParentBidiMode = True
ParentColor = False
ParentCtl3D = False
ParentFont = True
ParentShowHint = True
Sorted = False
Style = csDropDown
TabOrder = 0
Text = 'DirCombobox'
Visible = True
end
object SubDirsCheckbox: TCheckBox
AnchorSideTop.Control = DirCombobox
AnchorSideTop.Side = asrBottom
Left = 6
Height = 19
Top = 33
Height = 22
Top = 41
Width = 422
HelpContext = 0
Align = alBottom
AllowGrayed = False
Anchors = [akTop, akLeft, akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 6
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
Caption = 'Clean sub directories'
Checked = False
DragCursor = crDrag
DragKind = dkDrag
DragMode = dmManual
Enabled = True
ParentColor = True
ParentFont = True
ParentShowHint = True
ParentBidiMode = True
State = cbUnchecked
TabOrder = 1
TabStop = True
UseOnChange = False
Visible = True
end
object DirBrowseButton: TButton
AnchorSideLeft.Control = DirCombobox
@ -62,163 +159,304 @@ object CleanDirectoryDialog: TCleanDirectoryDialog
AnchorSideRight.Side = asrBottom
Left = 406
Height = 21
Top = 6
Top = 10
Width = 23
HelpContext = 0
Align = alNone
Anchors = [akTop, akRight]
AutoSize = False
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 5
BorderSpacing.Bottom = 0
BorderSpacing.Around = 0
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
Cancel = False
Caption = '...'
Default = False
DragCursor = crDrag
DragMode = dmManual
Enabled = True
ParentBidiMode = True
ModalResult = 0
OnClick = DirBrowseButtonClick
ParentFont = True
ParentShowHint = True
TabOrder = 2
TabStop = True
Visible = True
end
end
object RemoveGroupbox: TGroupBox
Left = 6
Height = 76
Top = 88
Height = 88
Top = 100
Width = 438
HelpContext = 0
Align = alTop
AutoSize = True
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 6
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
Caption = 'Remove files matching filter:'
ClientHeight = 58
ChildSizing.LeftRightSpacing = 0
ChildSizing.TopBottomSpacing = 0
ChildSizing.HorizontalSpacing = 0
ChildSizing.VerticalSpacing = 0
ChildSizing.ControlsPerLine = 0
ClientHeight = 69
ClientWidth = 434
Ctl3D = False
DockSite = False
DragCursor = crDrag
DragKind = dkDrag
DragMode = dmManual
Enabled = True
ParentBidiMode = True
ParentColor = True
ParentCtl3D = False
ParentFont = True
ParentShowHint = True
TabOrder = 1
TabStop = False
Visible = True
object RemoveCombobox: TComboBox
Left = 6
Height = 21
Height = 29
Top = 6
Width = 422
HelpContext = 0
TabStop = True
Align = alTop
ArrowKeysTraverseList = True
AutoComplete = False
AutoCompleteText = [cbactSearchAscending]
AutoDropDown = False
AutoSelect = False
AutoSize = True
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 6
ItemHeight = 13
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
CharCase = ecNormal
Ctl3D = False
DragCursor = crDrag
DragMode = dmManual
DropDownCount = 8
Enabled = True
ItemHeight = 0
ItemIndex = -1
ItemWidth = 0
MaxLength = 0
ParentBidiMode = True
ParentColor = False
ParentCtl3D = False
ParentFont = True
ParentShowHint = True
Sorted = False
Style = csDropDown
TabOrder = 0
Text = 'RemoveCombobox'
Visible = True
end
object SimpleSyntaxRemoveCheckbox: TCheckBox
Left = 6
Height = 19
Top = 33
Height = 22
Top = 41
Width = 422
HelpContext = 0
Align = alTop
AllowGrayed = False
AutoSize = True
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 6
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
Caption = 'Simple syntax (e.g. * instead of .*)'
Checked = False
DragCursor = crDrag
DragKind = dkDrag
DragMode = dmManual
Enabled = True
ParentColor = True
ParentFont = True
ParentShowHint = True
ParentBidiMode = True
State = cbUnchecked
TabOrder = 1
TabStop = True
UseOnChange = False
Visible = True
end
end
object KeepGroupbox: TGroupBox
Left = 6
Height = 101
Top = 170
Height = 116
Top = 194
Width = 438
Align = alTop
HelpContext = 0
Align = alClient
AutoSize = True
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 6
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
Caption = 'Keep files matching filter:'
ClientHeight = 83
ChildSizing.LeftRightSpacing = 0
ChildSizing.TopBottomSpacing = 0
ChildSizing.HorizontalSpacing = 0
ChildSizing.VerticalSpacing = 0
ChildSizing.ControlsPerLine = 0
ClientHeight = 97
ClientWidth = 434
Ctl3D = False
DockSite = False
DragCursor = crDrag
DragKind = dkDrag
DragMode = dmManual
Enabled = True
ParentBidiMode = True
ParentColor = True
ParentCtl3D = False
ParentFont = True
ParentShowHint = True
TabOrder = 2
TabStop = False
Visible = True
object KeepCombobox: TComboBox
Left = 6
Height = 21
Height = 29
Top = 6
Width = 422
HelpContext = 0
TabStop = True
Align = alTop
ArrowKeysTraverseList = True
AutoComplete = False
AutoCompleteText = [cbactSearchAscending]
AutoDropDown = False
AutoSelect = False
AutoSize = True
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 6
ItemHeight = 13
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
CharCase = ecNormal
Ctl3D = False
DragCursor = crDrag
DragMode = dmManual
DropDownCount = 8
Enabled = True
ItemHeight = 0
ItemIndex = -1
ItemWidth = 0
MaxLength = 0
ParentBidiMode = True
ParentColor = False
ParentCtl3D = False
ParentFont = True
ParentShowHint = True
Sorted = False
Style = csDropDown
TabOrder = 0
Text = 'KeepCombobox'
Visible = True
end
object SimpleSyntaxKeepCheckbox: TCheckBox
Left = 6
Height = 19
Top = 33
Height = 22
Top = 41
Width = 422
HelpContext = 0
Align = alTop
AllowGrayed = False
AutoSize = True
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 6
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
Caption = 'Simple syntax (e.g. * instead of .*)'
Checked = False
DragCursor = crDrag
DragKind = dkDrag
DragMode = dmManual
Enabled = True
ParentColor = True
ParentFont = True
ParentShowHint = True
ParentBidiMode = True
State = cbUnchecked
TabOrder = 1
TabStop = True
UseOnChange = False
Visible = True
end
object KeepTextFilesCheckbox: TCheckBox
Left = 6
Height = 19
Top = 58
Height = 22
Top = 69
Width = 422
HelpContext = 0
Align = alTop
AllowGrayed = False
AutoSize = True
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 6
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
Caption = 'Keep Text Files'
Checked = False
DragCursor = crDrag
DragKind = dkDrag
DragMode = dmManual
Enabled = True
ParentColor = True
ParentFont = True
ParentShowHint = True
ParentBidiMode = True
State = cbUnchecked
TabOrder = 2
TabStop = True
UseOnChange = False
Visible = True
end
end
object OkButton: TBitBtn
AnchorSideTop.Control = KeepGroupbox
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = CancelButton
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 288
Height = 25
Top = 277
Width = 75
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Around = 6
Caption = '&OK'
Constraints.MinHeight = 25
Constraints.MinWidth = 75
Default = True
Kind = bkOK
ModalResult = 1
NumGlyphs = 0
OnClick = OkButtonClick
TabOrder = 3
end
object CancelButton: TBitBtn
AnchorSideTop.Control = KeepGroupbox
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 369
Height = 25
Top = 277
Width = 75
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Around = 6
Cancel = True
Caption = 'Cancel'
Constraints.MinHeight = 25
Constraints.MinWidth = 75
Kind = bkCancel
ModalResult = 2
NumGlyphs = 0
TabOrder = 4
end
object HelpButton: TBitBtn
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = KeepGroupbox
AnchorSideTop.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
object ButtonPanel: TButtonPanel
Left = 6
Height = 25
Top = 277
Width = 75
Height = 48
Top = 316
Width = 438
HelpContext = 0
Align = alBottom
AutoSize = True
BorderSpacing.Around = 6
Caption = '&Help'
Constraints.MinHeight = 25
Constraints.MinWidth = 75
Kind = bkHelp
NumGlyphs = 0
OnClick = HelpButtonClick
TabOrder = 5
ButtonOrder = boDefault
TabOrder = 3
DefaultButton = pbOK
ShowButtons = [pbOK, pbCancel, pbHelp]
ShowGlyphs = [pbOK, pbCancel, pbClose, pbHelp]
Visible = True
end
end

View File

@ -2,73 +2,147 @@
LazarusResources.Add('TCleanDirectoryDialog','FORMDATA',[
'TPF0'#21'TCleanDirectoryDialog'#20'CleanDirectoryDialog'#4'Left'#3'3'#1#6'He'
+'ight'#3'5'#1#3'Top'#3#209#0#5'Width'#3#194#1#13'ActiveControl'#7#11'DirComb'
+'obox'#8'AutoSize'#9#11'BorderIcons'#11#12'biSystemMenu'#0#7'Caption'#6#15'C'
+'lean Directory'#12'ClientHeight'#3'5'#1#11'ClientWidth'#3#194#1#8'OnCreate'
+#7#26'CleanDirectoryDialogCreate'#10'ParentFont'#8#8'Position'#7#14'poScreen'
+'Center'#10'LCLVersion'#6#6'0.9.25'#0#9'TGroupBox'#11'DirGroupbox'#4'Left'#2
+#6#6'Height'#2'L'#3'Top'#2#6#5'Width'#3#182#1#5'Align'#7#5'alTop'#8'AutoSize'
+#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#9'Directory'#12'ClientHeight'#2
+':'#11'ClientWidth'#3#178#1#11'ParentCtl3D'#8#8'TabOrder'#2#0#0#9'TComboBox'
+#11'DirCombobox'#23'AnchorSideRight.Control'#7#15'DirBrowseButton'#4'Left'#2
+#6#6'Height'#2#21#3'Top'#2#6#5'Width'#3#138#1#7'Anchors'#11#5'akTop'#6'akLef'
+'t'#7'akRight'#0#16'AutoCompleteText'#11#20'cbactSearchAscending'#0#20'Borde'
+'rSpacing.Around'#2#6#10'ItemHeight'#2#13#11'ParentCtl3D'#8#8'TabOrder'#2#0#4
+'Text'#6#11'DirCombobox'#0#0#9'TCheckBox'#15'SubDirsCheckbox'#21'AnchorSideT'
+'op.Control'#7#11'DirCombobox'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'
+#2#6#6'Height'#2#19#3'Top'#2'!'#5'Width'#3#166#1#5'Align'#7#8'alBottom'#7'An'
+'chors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#20'BorderSpacing.Arou'
+'nd'#2#6#7'Caption'#6#21'Clean sub directories'#8'TabOrder'#2#1#0#0#7'TButto'
+'n'#15'DirBrowseButton'#22'AnchorSideLeft.Control'#7#11'DirCombobox'#19'Anch'
+'orSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#11'DirCombobox'
+#18'AnchorSideTop.Side'#7#9'asrCenter'#23'AnchorSideRight.Control'#7#11'DirG'
+'roupbox'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#150#1#6'Height'#2
+#21#3'Top'#2#6#5'Width'#2#23#7'Anchors'#11#5'akTop'#7'akRight'#0#19'BorderSp'
+'acing.Right'#2#5#7'Caption'#6#3'...'#7'OnClick'#7#20'DirBrowseButtonClick'#8
+'TabOrder'#2#2#0#0#0#9'TGroupBox'#14'RemoveGroupbox'#4'Left'#2#6#6'Height'#2
+'L'#3'Top'#2'X'#5'Width'#3#182#1#5'Align'#7#5'alTop'#8'AutoSize'#9#20'Border'
+'Spacing.Around'#2#6#7'Caption'#6#29'Remove files matching filter:'#12'Clien'
+'tHeight'#2':'#11'ClientWidth'#3#178#1#11'ParentCtl3D'#8#8'TabOrder'#2#1#0#9
+'TComboBox'#14'RemoveCombobox'#4'Left'#2#6#6'Height'#2#21#3'Top'#2#6#5'Width'
+#3#166#1#5'Align'#7#5'alTop'#16'AutoCompleteText'#11#20'cbactSearchAscending'
+#0#20'BorderSpacing.Around'#2#6#10'ItemHeight'#2#13#11'ParentCtl3D'#8#8'TabO'
+'rder'#2#0#4'Text'#6#14'RemoveCombobox'#0#0#9'TCheckBox'#26'SimpleSyntaxRemo'
+'veCheckbox'#4'Left'#2#6#6'Height'#2#19#3'Top'#2'!'#5'Width'#3#166#1#5'Align'
+#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6'$Simple syntax (e.g. *'
+' instead of .*)'#8'TabOrder'#2#1#0#0#0#9'TGroupBox'#12'KeepGroupbox'#4'Left'
+#2#6#6'Height'#2'e'#3'Top'#3#170#0#5'Width'#3#182#1#5'Align'#7#5'alTop'#8'Au'
+'toSize'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#27'Keep files matching '
+'filter:'#12'ClientHeight'#2'S'#11'ClientWidth'#3#178#1#11'ParentCtl3D'#8#8
+'TabOrder'#2#2#0#9'TComboBox'#12'KeepCombobox'#4'Left'#2#6#6'Height'#2#21#3
+'Top'#2#6#5'Width'#3#166#1#5'Align'#7#5'alTop'#16'AutoCompleteText'#11#20'cb'
+'actSearchAscending'#0#20'BorderSpacing.Around'#2#6#10'ItemHeight'#2#13#11'P'
+'arentCtl3D'#8#8'TabOrder'#2#0#4'Text'#6#12'KeepCombobox'#0#0#9'TCheckBox'#24
+'SimpleSyntaxKeepCheckbox'#4'Left'#2#6#6'Height'#2#19#3'Top'#2'!'#5'Width'#3
+#166#1#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6'$Simple'
+' syntax (e.g. * instead of .*)'#8'TabOrder'#2#1#0#0#9'TCheckBox'#21'KeepTex'
+'tFilesCheckbox'#4'Left'#2#6#6'Height'#2#19#3'Top'#2':'#5'Width'#3#166#1#5'A'
+'lign'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6#15'Keep Text Fil'
+'es'#8'TabOrder'#2#2#0#0#0#7'TBitBtn'#8'OkButton'#21'AnchorSideTop.Control'#7
+#12'KeepGroupbox'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.C'
+'ontrol'#7#12'CancelButton'#24'AnchorSideBottom.Control'#7#5'Owner'#21'Ancho'
+'rSideBottom.Side'#7#9'asrBottom'#4'Left'#3' '#1#6'Height'#2#25#3'Top'#3#21#1
+#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'AutoSize'#9#20'BorderSp'
+'acing.Around'#2#6#7'Caption'#6#3'&OK'#21'Constraints.MinHeight'#2#25#20'Con'
+'straints.MinWidth'#2'K'#7'Default'#9#4'Kind'#7#4'bkOK'#11'ModalResult'#2#1#9
+'NumGlyphs'#2#0#7'OnClick'#7#13'OkButtonClick'#8'TabOrder'#2#3#0#0#7'TBitBtn'
+#12'CancelButton'#21'AnchorSideTop.Control'#7#12'KeepGroupbox'#18'AnchorSide'
+'Top.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSi'
+'deRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#5'Owner'#21'Anc'
+'horSideBottom.Side'#7#9'asrBottom'#4'Left'#3'q'#1#6'Height'#2#25#3'Top'#3#21
+#1#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'AutoSize'#9#20'Border'
+'Spacing.Around'#2#6#6'Cancel'#9#7'Caption'#6#6'Cancel'#21'Constraints.MinHe'
+'ight'#2#25#20'Constraints.MinWidth'#2'K'#4'Kind'#7#8'bkCancel'#11'ModalResu'
+'lt'#2#2#9'NumGlyphs'#2#0#8'TabOrder'#2#4#0#0#7'TBitBtn'#10'HelpButton'#22'A'
+'nchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#12'KeepGroupb'
,'ox'#18'AnchorSideTop.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#5
+'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#25#3
+'Top'#3#21#1#5'Width'#2'K'#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Capt'
+'ion'#6#5'&Help'#21'Constraints.MinHeight'#2#25#20'Constraints.MinWidth'#2'K'
+#4'Kind'#7#6'bkHelp'#9'NumGlyphs'#2#0#7'OnClick'#7#15'HelpButtonClick'#8'Tab'
+'Order'#2#5#0#0#0
+'ight'#3'l'#1#3'Top'#3#209#0#5'Width'#3#194#1#11'HelpContext'#2#0#13'ActiveC'
+'ontrol'#7#11'DirCombobox'#5'Align'#7#6'alNone'#14'AllowDropFiles'#8#10'Auto'
+'Scroll'#9#8'AutoSize'#9#11'BorderIcons'#11#12'biSystemMenu'#0#11'BorderStyl'
+'e'#7#10'bsSizeable'#7'Caption'#6#15'Clean Directory'#28'ChildSizing.LeftRig'
+'htSpacing'#2#0#28'ChildSizing.TopBottomSpacing'#2#0#29'ChildSizing.Horizont'
+'alSpacing'#2#0#27'ChildSizing.VerticalSpacing'#2#0#27'ChildSizing.ControlsP'
+'erLine'#2#0#12'ClientHeight'#3'l'#1#11'ClientWidth'#3#194#1#8'DockSite'#8#8
+'DragKind'#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#11'Font.Height'
+#2#0#10'Font.Style'#11#0#9'FormStyle'#7#8'fsNormal'#8'OnCreate'#7#26'CleanDi'
+'rectoryDialogCreate'#14'ParentBiDiMode'#9#10'ParentFont'#8#8'Position'#7#14
+'poScreenCenter'#13'ShowInTaskBar'#7#9'stDefault'#14'UseDockManager'#8#10'LC'
+'LVersion'#6#6'0.9.27'#11'WindowState'#7#8'wsNormal'#0#9'TGroupBox'#11'DirGr'
+'oupbox'#4'Left'#2#6#6'Height'#2'X'#3'Top'#2#6#5'Width'#3#182#1#11'HelpConte'
+'xt'#2#0#5'Align'#7#5'alTop'#8'AutoSize'#9#18'BorderSpacing.Left'#2#0#17'Bor'
+'derSpacing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2#0
+#20'BorderSpacing.Around'#2#6'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFil'
+'l'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#7'Caption'#6#9'Director'
+'y'#28'ChildSizing.LeftRightSpacing'#2#0#28'ChildSizing.TopBottomSpacing'#2#0
+#29'ChildSizing.HorizontalSpacing'#2#0#27'ChildSizing.VerticalSpacing'#2#0#27
+'ChildSizing.ControlsPerLine'#2#0#12'ClientHeight'#2'E'#11'ClientWidth'#3#178
+#1#5'Ctl3D'#8#8'DockSite'#8#10'DragCursor'#7#6'crDrag'#8'DragKind'#7#6'dkDra'
+'g'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#14'ParentBidiMode'#9#11'ParentCol'
+'or'#9#11'ParentCtl3D'#8#10'ParentFont'#9#14'ParentShowHint'#9#8'TabOrder'#2
+#0#7'TabStop'#8#7'Visible'#9#0#9'TComboBox'#11'DirCombobox'#23'AnchorSideRig'
+'ht.Control'#7#15'DirBrowseButton'#4'Left'#2#6#6'Height'#2#29#3'Top'#2#6#5'W'
+'idth'#3#138#1#11'HelpContext'#2#0#7'TabStop'#9#5'Align'#7#6'alNone'#7'Ancho'
+'rs'#11#5'akTop'#6'akLeft'#7'akRight'#0#21'ArrowKeysTraverseList'#9#12'AutoC'
+'omplete'#8#16'AutoCompleteText'#11#20'cbactSearchAscending'#0#12'AutoDropDo'
+'wn'#8#10'AutoSelect'#8#8'AutoSize'#9#18'BorderSpacing.Left'#2#0#17'BorderSp'
+'acing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20
+'BorderSpacing.Around'#2#6'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'
+#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#8'CharCase'#7#8'ecNormal'#5
+'Ctl3D'#8#10'DragCursor'#7#6'crDrag'#8'DragMode'#7#8'dmManual'#13'DropDownCo'
+'unt'#2#8#7'Enabled'#9#10'ItemHeight'#2#0#9'ItemIndex'#2#255#9'ItemWidth'#2#0
+#9'MaxLength'#2#0#14'ParentBidiMode'#9#11'ParentColor'#8#11'ParentCtl3D'#8#10
+'ParentFont'#9#14'ParentShowHint'#9#6'Sorted'#8#5'Style'#7#10'csDropDown'#8
+'TabOrder'#2#0#4'Text'#6#11'DirCombobox'#7'Visible'#9#0#0#9'TCheckBox'#15'Su'
+'bDirsCheckbox'#21'AnchorSideTop.Control'#7#11'DirCombobox'#18'AnchorSideTop'
+'.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#22#3'Top'#2')'#5'Width'#3#166
+#1#11'HelpContext'#2#0#5'Align'#7#8'alBottom'#11'AllowGrayed'#8#7'Anchors'#11
+#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#8'AutoSize'#9#18'BorderSpacing.'
+'Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'BorderSp'
+'acing.Bottom'#2#0#20'BorderSpacing.Around'#2#6'!BorderSpacing.CellAlignHori'
+'zontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#7'Cap'
+'tion'#6#21'Clean sub directories'#7'Checked'#8#10'DragCursor'#7#6'crDrag'#8
+'DragKind'#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#11'ParentColor'
+#9#10'ParentFont'#9#14'ParentShowHint'#9#14'ParentBidiMode'#9#5'State'#7#11
+'cbUnchecked'#8'TabOrder'#2#1#7'TabStop'#9#11'UseOnChange'#8#7'Visible'#9#0#0
+#7'TButton'#15'DirBrowseButton'#22'AnchorSideLeft.Control'#7#11'DirCombobox'
+#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#11'DirCo'
+'mbobox'#18'AnchorSideTop.Side'#7#9'asrCenter'#23'AnchorSideRight.Control'#7
+#11'DirGroupbox'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#150#1#6'H'
+'eight'#2#21#3'Top'#2#10#5'Width'#2#23#11'HelpContext'#2#0#5'Align'#7#6'alNo'
+'ne'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'AutoSize'#8#18'BorderSpacing.Left'
+#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#5#20'BorderSpacing.'
+'Bottom'#2#0#20'BorderSpacing.Around'#2#0'!BorderSpacing.CellAlignHorizontal'
+#7#7'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#6'Cancel'#8#7
+'Caption'#6#3'...'#7'Default'#8#10'DragCursor'#7#6'crDrag'#8'DragMode'#7#8'd'
+'mManual'#7'Enabled'#9#14'ParentBidiMode'#9#11'ModalResult'#2#0#7'OnClick'#7
+#20'DirBrowseButtonClick'#10'ParentFont'#9#14'ParentShowHint'#9#8'TabOrder'#2
+#2#7'TabStop'#9#7'Visible'#9#0#0#0#9'TGroupBox'#14'RemoveGroupbox'#4'Left'#2
+#6#6'Height'#2'X'#3'Top'#2'd'#5'Width'#3#182#1#11'HelpContext'#2#0#5'Align'#7
+#5'alTop'#8'AutoSize'#9#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0
,#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.A'
+'round'#2#6'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacin'
+'g.CellAlignVertical'#7#7'ccaFill'#7'Caption'#6#29'Remove files matching fil'
+'ter:'#28'ChildSizing.LeftRightSpacing'#2#0#28'ChildSizing.TopBottomSpacing'
+#2#0#29'ChildSizing.HorizontalSpacing'#2#0#27'ChildSizing.VerticalSpacing'#2
+#0#27'ChildSizing.ControlsPerLine'#2#0#12'ClientHeight'#2'E'#11'ClientWidth'
+#3#178#1#5'Ctl3D'#8#8'DockSite'#8#10'DragCursor'#7#6'crDrag'#8'DragKind'#7#6
+'dkDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#14'ParentBidiMode'#9#11'Pare'
+'ntColor'#9#11'ParentCtl3D'#8#10'ParentFont'#9#14'ParentShowHint'#9#8'TabOrd'
+'er'#2#1#7'TabStop'#8#7'Visible'#9#0#9'TComboBox'#14'RemoveCombobox'#4'Left'
+#2#6#6'Height'#2#29#3'Top'#2#6#5'Width'#3#166#1#11'HelpContext'#2#0#7'TabSto'
+'p'#9#5'Align'#7#5'alTop'#21'ArrowKeysTraverseList'#9#12'AutoComplete'#8#16
+'AutoCompleteText'#11#20'cbactSearchAscending'#0#12'AutoDropDown'#8#10'AutoS'
+'elect'#8#8'AutoSize'#9#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0
+#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.A'
+'round'#2#6'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacin'
+'g.CellAlignVertical'#7#7'ccaFill'#8'CharCase'#7#8'ecNormal'#5'Ctl3D'#8#10'D'
+'ragCursor'#7#6'crDrag'#8'DragMode'#7#8'dmManual'#13'DropDownCount'#2#8#7'En'
+'abled'#9#10'ItemHeight'#2#0#9'ItemIndex'#2#255#9'ItemWidth'#2#0#9'MaxLength'
+#2#0#14'ParentBidiMode'#9#11'ParentColor'#8#11'ParentCtl3D'#8#10'ParentFont'
+#9#14'ParentShowHint'#9#6'Sorted'#8#5'Style'#7#10'csDropDown'#8'TabOrder'#2#0
+#4'Text'#6#14'RemoveCombobox'#7'Visible'#9#0#0#9'TCheckBox'#26'SimpleSyntaxR'
+'emoveCheckbox'#4'Left'#2#6#6'Height'#2#22#3'Top'#2')'#5'Width'#3#166#1#11'H'
+'elpContext'#2#0#5'Align'#7#5'alTop'#11'AllowGrayed'#8#8'AutoSize'#9#18'Bord'
+'erSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#0#20
+'BorderSpacing.Bottom'#2#0#20'BorderSpacing.Around'#2#6'!BorderSpacing.CellA'
+'lignHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFil'
+'l'#7'Caption'#6'$Simple syntax (e.g. * instead of .*)'#7'Checked'#8#10'Drag'
+'Cursor'#7#6'crDrag'#8'DragKind'#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#7'Ena'
+'bled'#9#11'ParentColor'#9#10'ParentFont'#9#14'ParentShowHint'#9#14'ParentBi'
+'diMode'#9#5'State'#7#11'cbUnchecked'#8'TabOrder'#2#1#7'TabStop'#9#11'UseOnC'
+'hange'#8#7'Visible'#9#0#0#0#9'TGroupBox'#12'KeepGroupbox'#4'Left'#2#6#6'Hei'
+'ght'#2't'#3'Top'#3#194#0#5'Width'#3#182#1#11'HelpContext'#2#0#5'Align'#7#8
+'alClient'#8'AutoSize'#9#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0
+#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.A'
+'round'#2#6'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacin'
+'g.CellAlignVertical'#7#7'ccaFill'#7'Caption'#6#27'Keep files matching filte'
+'r:'#28'ChildSizing.LeftRightSpacing'#2#0#28'ChildSizing.TopBottomSpacing'#2
+#0#29'ChildSizing.HorizontalSpacing'#2#0#27'ChildSizing.VerticalSpacing'#2#0
+#27'ChildSizing.ControlsPerLine'#2#0#12'ClientHeight'#2'a'#11'ClientWidth'#3
+#178#1#5'Ctl3D'#8#8'DockSite'#8#10'DragCursor'#7#6'crDrag'#8'DragKind'#7#6'd'
+'kDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#14'ParentBidiMode'#9#11'Paren'
+'tColor'#9#11'ParentCtl3D'#8#10'ParentFont'#9#14'ParentShowHint'#9#8'TabOrde'
+'r'#2#2#7'TabStop'#8#7'Visible'#9#0#9'TComboBox'#12'KeepCombobox'#4'Left'#2#6
+#6'Height'#2#29#3'Top'#2#6#5'Width'#3#166#1#11'HelpContext'#2#0#7'TabStop'#9
+#5'Align'#7#5'alTop'#21'ArrowKeysTraverseList'#9#12'AutoComplete'#8#16'AutoC'
+'ompleteText'#11#20'cbactSearchAscending'#0#12'AutoDropDown'#8#10'AutoSelect'
+#8#8'AutoSize'#9#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0#19'Bor'
+'derSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.Around'
+#2#6'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellA'
+'lignVertical'#7#7'ccaFill'#8'CharCase'#7#8'ecNormal'#5'Ctl3D'#8#10'DragCurs'
+'or'#7#6'crDrag'#8'DragMode'#7#8'dmManual'#13'DropDownCount'#2#8#7'Enabled'#9
+#10'ItemHeight'#2#0#9'ItemIndex'#2#255#9'ItemWidth'#2#0#9'MaxLength'#2#0#14
+'ParentBidiMode'#9#11'ParentColor'#8#11'ParentCtl3D'#8#10'ParentFont'#9#14'P'
+'arentShowHint'#9#6'Sorted'#8#5'Style'#7#10'csDropDown'#8'TabOrder'#2#0#4'Te'
+'xt'#6#12'KeepCombobox'#7'Visible'#9#0#0#9'TCheckBox'#24'SimpleSyntaxKeepChe'
+'ckbox'#4'Left'#2#6#6'Height'#2#22#3'Top'#2')'#5'Width'#3#166#1#11'HelpConte'
+'xt'#2#0#5'Align'#7#5'alTop'#11'AllowGrayed'#8#8'AutoSize'#9#18'BorderSpacin'
+'g.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'Border'
+'Spacing.Bottom'#2#0#20'BorderSpacing.Around'#2#6'!BorderSpacing.CellAlignHo'
+'rizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#7'C'
+'aption'#6'$Simple syntax (e.g. * instead of .*)'#7'Checked'#8#10'DragCursor'
+#7#6'crDrag'#8'DragKind'#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9
+#11'ParentColor'#9#10'ParentFont'#9#14'ParentShowHint'#9#14'ParentBidiMode'#9
,#5'State'#7#11'cbUnchecked'#8'TabOrder'#2#1#7'TabStop'#9#11'UseOnChange'#8#7
+'Visible'#9#0#0#9'TCheckBox'#21'KeepTextFilesCheckbox'#4'Left'#2#6#6'Height'
+#2#22#3'Top'#2'E'#5'Width'#3#166#1#11'HelpContext'#2#0#5'Align'#7#5'alTop'#11
+'AllowGrayed'#8#8'AutoSize'#9#18'BorderSpacing.Left'#2#0#17'BorderSpacing.To'
+'p'#2#0#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSp'
+'acing.Around'#2#6'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'Borde'
+'rSpacing.CellAlignVertical'#7#7'ccaFill'#7'Caption'#6#15'Keep Text Files'#7
+'Checked'#8#10'DragCursor'#7#6'crDrag'#8'DragKind'#7#6'dkDrag'#8'DragMode'#7
+#8'dmManual'#7'Enabled'#9#11'ParentColor'#9#10'ParentFont'#9#14'ParentShowHi'
+'nt'#9#14'ParentBidiMode'#9#5'State'#7#11'cbUnchecked'#8'TabOrder'#2#2#7'Tab'
+'Stop'#9#11'UseOnChange'#8#7'Visible'#9#0#0#0#12'TButtonPanel'#11'ButtonPane'
+'l'#4'Left'#2#6#6'Height'#2'0'#3'Top'#3'<'#1#5'Width'#3#182#1#11'HelpContext'
+#2#0#5'Align'#7#8'alBottom'#8'AutoSize'#9#11'ButtonOrder'#7#9'boDefault'#8'T'
+'abOrder'#2#3#13'DefaultButton'#7#4'pbOK'#11'ShowButtons'#11#4'pbOK'#8'pbCan'
+'cel'#6'pbHelp'#0#10'ShowGlyphs'#11#4'pbOK'#8'pbCancel'#7'pbClose'#6'pbHelp'
+#0#7'Visible'#9#0#0#0
]);

View File

@ -32,17 +32,16 @@ interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Buttons,
StdCtrls, FileUtil, LCLProc, Laz_XMLCfg, SynRegExpr, IDEContextHelpEdit,
LazarusIDEStrConsts, LazConf, IDEProcs, TransferMacros, InputHistory;
LazarusIDEStrConsts, LazConf, IDEProcs, TransferMacros, InputHistory,
ButtonPanel, ShowDeletingFilesDlg;
type
{ TCleanDirectoryDialog }
TCleanDirectoryDialog = class(TForm)
HelpButton: TBitBtn;
ButtonPanel: TButtonPanel;
DirBrowseButton: TButton;
OkButton: TBitBtn;
CancelButton: TBitBtn;
KeepTextFilesCheckbox: TCHECKBOX;
SubDirsCheckbox: TCHECKBOX;
SimpleSyntaxKeepCheckbox: TCHECKBOX;
@ -70,20 +69,9 @@ type
property Macros: TTransferMacroList read FMacros write SetMacros;
end;
{ TShowDeletingFilesDialog }
TShowDeletingFilesDialog = class(TForm)
FilesListBox: TListBox;
OkButton: TBUTTON;
CancelButton: TBUTTON;
public
constructor Create(TheOwner: TComponent); override;
end;
function ShowCleanDirectoryDialog(const DefaultDirectory: string;
Macros: TTransferMacroList): TModalResult;
implementation
const
@ -135,12 +123,9 @@ begin
KeepGroupbox.Caption:=lisClDirKeepFilesMatchingFilter;
SimpleSyntaxKeepCheckbox.Caption:=lisClDirSimpleSyntaxEGInsteadOf;
KeepTextFilesCheckbox.Caption:=lisClDirKeepAllTextFiles;
OkButton.Caption:=lisLazBuildOk;
CancelButton.Caption:=dlgCancel;
HelpButton.Caption:=lisPckEditHelp;
OkButton.LoadGlyphFromLazarusResource('btn_ok');
CancelButton.LoadGlyphFromLazarusResource('btn_cancel');
HelpButton.LoadGlyphFromLazarusResource('btn_help');
ButtonPanel.OKButton.OnClick := @OKButtonClick;
ButtonPanel.HelpButton.OnClick := @HelpButtonClick;
end;
procedure TCleanDirectoryDialog.HelpButtonClick(Sender: TObject);
@ -406,30 +391,38 @@ begin
// ask user for confirmation
ShowDeletingFilesDialog:=TShowDeletingFilesDialog.Create(Self);
try
ShowDeletingFilesDialog.FilesListBox.Items.Assign(List);
ShowDeletingFilesDialog.FileList.Items.AddStrings(List);
for i := 0 to ShowDeletingFilesDialog.FileList.Count - 1 do
ShowDeletingFilesDialog.FileList.Checked[i] := True;
if ShowDeletingFilesDialog.ShowModal<>mrOk then exit;
// delete all checked files
for i:=0 to ShowDeletingFilesDialog.FileList.Count-1 do begin
if ShowDeletingFilesDialog.FileList.Checked[i] then
begin
Filename:=ShowDeletingFilesDialog.FileList.Items[i];
DebugLn('TCleanDirectoryDialog: Deleting file ',Filename);
if FileExistsUTF8(Filename) then begin
repeat
if DeleteFileUTF8(Filename) then begin
break;
end else begin
MsgResult:=MessageDlg(lisErrorDeletingFile,
Format(lisPkgMangUnableToDeleteFile, ['"', Filename, '"']),
mtError,[mbAbort,mbIgnore,mbRetry],0);
if (MsgResult=mrIgnore) then break;
if MsgResult=mrAbort then exit;
end;
until false;
end;
end;
end;
finally
ShowDeletingFilesDialog.Free;
end;
// delete them all
for i:=0 to List.Count-1 do begin
Filename:=List[i];
DebugLn('TCleanDirectoryDialog: Deleting file ',Filename);
if FileExistsUTF8(Filename) then begin
repeat
if DeleteFileUTF8(Filename) then begin
break;
end else begin
MsgResult:=MessageDlg(lisErrorDeletingFile,
Format(lisPkgMangUnableToDeleteFile, ['"', Filename, '"']),
mtError,[mbAbort,mbIgnore,mbRetry],0);
if (MsgResult=mrIgnore) then break;
if MsgResult=mrAbort then exit;
end;
until false;
end;
end;
Result:=true;
end;
@ -438,52 +431,6 @@ begin
AddToRecentList(Directory,DirCombobox.Items,20);
end;
{ TShowDeletingFilesDialog }
constructor TShowDeletingFilesDialog.Create(TheOwner: TComponent);
begin
inherited Create(TheOwner);
Caption:=lisDeleteAllTheseFiles;
Width:=400;
Height:=350;
Position:=poScreenCenter;
FilesListBox:=TListBox.Create(Self);
with FilesListBox do begin
Name:='FilesListBox';
Parent:=Self;
Height:=Self.ClientHeight-40;
Align:=alTop;
Anchors:=[akLeft,akTop,akBottom,akRight];
end;
OkButton:=TButton.Create(Self);
with OkButton do begin
Name:='OkButton';
Parent:=Self;
Left:=20;
Top:=Self.ClientHeight-35;
Width:=100;
Height:=25;
Anchors:=[akLeft,akBottom];
Caption:=dlgEdDelete;
ModalResult:=mrOk;
end;
CancelButton:=TButton.Create(Self);
with CancelButton do begin
Name:='CancelButton';
Parent:=Self;
Left:=150;
Top:=Self.ClientHeight-35;
Width:=100;
Height:=25;
Anchors:=[akLeft,akBottom];
Caption:=dlgCancel;
ModalResult:=mrCancel;
end;
end;
initialization
{$I cleandirdlg.lrs}

View File

@ -0,0 +1,119 @@
object ShowDeletingFilesDialog: TShowDeletingFilesDialog
Left = 209
Height = 350
Top = 326
Width = 400
HelpContext = 0
ActiveControl = FileList
Align = alNone
AllowDropFiles = False
AutoScroll = True
AutoSize = False
BorderIcons = [biSystemMenu, biMinimize, biMaximize]
BorderStyle = bsSizeable
Caption = 'ShowDeletingFilesDialog'
ChildSizing.LeftRightSpacing = 0
ChildSizing.TopBottomSpacing = 0
ChildSizing.HorizontalSpacing = 0
ChildSizing.VerticalSpacing = 0
ChildSizing.ControlsPerLine = 0
ClientHeight = 350
ClientWidth = 400
DockSite = False
DragKind = dkDrag
DragMode = dmManual
Enabled = True
Font.Height = 0
Font.Style = []
FormStyle = fsNormal
OnCreate = FormCreate
ParentBiDiMode = True
ParentFont = False
Position = poScreenCenter
ShowInTaskBar = stDefault
UseDockManager = False
LCLVersion = '0.9.27'
WindowState = wsNormal
object ButtonPanel: TButtonPanel
Left = 6
Height = 48
Top = 302
Width = 388
HelpContext = 0
Align = alBottom
AutoSize = True
ButtonOrder = boDefault
TabOrder = 0
DefaultButton = pbOK
ShowButtons = [pbOK, pbCancel]
ShowGlyphs = [pbOK, pbCancel, pbClose, pbHelp]
Visible = True
end
object FileList: TCheckListBox
Left = 6
Height = 262
Top = 6
Width = 388
HelpContext = 0
Align = alClient
AllowGrayed = False
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 6
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
BorderStyle = bsSingle
Columns = 0
DragCursor = crDrag
DragMode = dmManual
ExtendedSelect = True
Enabled = True
IntegralHeight = False
ItemHeight = 0
MultiSelect = False
ParentBidiMode = True
ParentFont = True
ParentShowHint = True
Sorted = False
Style = lbStandard
TabOrder = 1
TabStop = True
TopIndex = -1
Visible = True
end
object UnCheckAll: TCheckBox
Left = 6
Height = 22
Top = 274
Width = 388
HelpContext = 0
Align = alBottom
AllowGrayed = False
AutoSize = True
BorderSpacing.Left = 0
BorderSpacing.Top = 0
BorderSpacing.Right = 0
BorderSpacing.Bottom = 0
BorderSpacing.Around = 6
BorderSpacing.CellAlignHorizontal = ccaFill
BorderSpacing.CellAlignVertical = ccaFill
Caption = 'UnCheckAll'
Checked = True
DragCursor = crDrag
DragKind = dkDrag
DragMode = dmManual
Enabled = True
OnChange = UnCheckAllChange
ParentColor = True
ParentFont = True
ParentShowHint = True
ParentBidiMode = True
State = cbChecked
TabOrder = 2
TabStop = True
UseOnChange = False
Visible = True
end
end

View File

@ -0,0 +1,41 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TShowDeletingFilesDialog','FORMDATA',[
'TPF0'#24'TShowDeletingFilesDialog'#23'ShowDeletingFilesDialog'#4'Left'#3#209
+#0#6'Height'#3'^'#1#3'Top'#3'F'#1#5'Width'#3#144#1#11'HelpContext'#2#0#13'Ac'
+'tiveControl'#7#8'FileList'#5'Align'#7#6'alNone'#14'AllowDropFiles'#8#10'Aut'
+'oScroll'#9#8'AutoSize'#8#11'BorderIcons'#11#12'biSystemMenu'#10'biMinimize'
+#10'biMaximize'#0#11'BorderStyle'#7#10'bsSizeable'#7'Caption'#6#23'ShowDelet'
+'ingFilesDialog'#28'ChildSizing.LeftRightSpacing'#2#0#28'ChildSizing.TopBott'
+'omSpacing'#2#0#29'ChildSizing.HorizontalSpacing'#2#0#27'ChildSizing.Vertica'
+'lSpacing'#2#0#27'ChildSizing.ControlsPerLine'#2#0#12'ClientHeight'#3'^'#1#11
+'ClientWidth'#3#144#1#8'DockSite'#8#8'DragKind'#7#6'dkDrag'#8'DragMode'#7#8
+'dmManual'#7'Enabled'#9#11'Font.Height'#2#0#10'Font.Style'#11#0#9'FormStyle'
+#7#8'fsNormal'#8'OnCreate'#7#10'FormCreate'#14'ParentBiDiMode'#9#10'ParentFo'
+'nt'#8#8'Position'#7#14'poScreenCenter'#13'ShowInTaskBar'#7#9'stDefault'#14
+'UseDockManager'#8#10'LCLVersion'#6#6'0.9.27'#11'WindowState'#7#8'wsNormal'#0
+#12'TButtonPanel'#11'ButtonPanel'#4'Left'#2#6#6'Height'#2'0'#3'Top'#3'.'#1#5
+'Width'#3#132#1#11'HelpContext'#2#0#5'Align'#7#8'alBottom'#8'AutoSize'#9#11
+'ButtonOrder'#7#9'boDefault'#8'TabOrder'#2#0#13'DefaultButton'#7#4'pbOK'#11
+'ShowButtons'#11#4'pbOK'#8'pbCancel'#0#10'ShowGlyphs'#11#4'pbOK'#8'pbCancel'
+#7'pbClose'#6'pbHelp'#0#7'Visible'#9#0#0#13'TCheckListBox'#8'FileList'#4'Lef'
+'t'#2#6#6'Height'#3#6#1#3'Top'#2#6#5'Width'#3#132#1#11'HelpContext'#2#0#5'Al'
+'ign'#7#8'alClient'#11'AllowGrayed'#8#18'BorderSpacing.Left'#2#0#17'BorderSp'
+'acing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20
+'BorderSpacing.Around'#2#6'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'
+#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#11'BorderStyle'#7#8'bsSing'
+'le'#7'Columns'#2#0#10'DragCursor'#7#6'crDrag'#8'DragMode'#7#8'dmManual'#14
+'ExtendedSelect'#9#7'Enabled'#9#14'IntegralHeight'#8#10'ItemHeight'#2#0#11'M'
+'ultiSelect'#8#14'ParentBidiMode'#9#10'ParentFont'#9#14'ParentShowHint'#9#6
+'Sorted'#8#5'Style'#7#10'lbStandard'#8'TabOrder'#2#1#7'TabStop'#9#8'TopIndex'
+#2#255#7'Visible'#9#0#0#9'TCheckBox'#10'UnCheckAll'#4'Left'#2#6#6'Height'#2
+#22#3'Top'#3#18#1#5'Width'#3#132#1#11'HelpContext'#2#0#5'Align'#7#8'alBottom'
+#11'AllowGrayed'#8#8'AutoSize'#9#18'BorderSpacing.Left'#2#0#17'BorderSpacing'
+'.Top'#2#0#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'Borde'
+'rSpacing.Around'#2#6'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'Bo'
+'rderSpacing.CellAlignVertical'#7#7'ccaFill'#7'Caption'#6#10'UnCheckAll'#7'C'
+'hecked'#9#10'DragCursor'#7#6'crDrag'#8'DragKind'#7#6'dkDrag'#8'DragMode'#7#8
+'dmManual'#7'Enabled'#9#8'OnChange'#7#16'UnCheckAllChange'#11'ParentColor'#9
+#10'ParentFont'#9#14'ParentShowHint'#9#14'ParentBidiMode'#9#5'State'#7#9'cbC'
+'hecked'#8'TabOrder'#2#2#7'TabStop'#9#11'UseOnChange'#8#7'Visible'#9#0#0#0
]);

View File

@ -0,0 +1,51 @@
unit ShowDeletingFilesDlg;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, ButtonPanel, LazarusIDEStrConsts, CheckLst;
type
{ TShowDeletingFilesDialog }
TShowDeletingFilesDialog = class(TForm)
ButtonPanel: TButtonPanel;
UnCheckAll: TCheckBox;
FileList: TCheckListBox;
procedure FormCreate(Sender: TObject);
procedure UnCheckAllChange(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
implementation
{ TShowDeletingFilesDialog }
procedure TShowDeletingFilesDialog.FormCreate(Sender: TObject);
begin
Caption:=lisDeleteAllTheseFiles;
FileList.Clear;
UnCheckAll.Caption := 'Check/uncheck all';
end;
procedure TShowDeletingFilesDialog.UnCheckAllChange(Sender: TObject);
var
i: integer;
begin
//check / uncheck all
for i := 0 to FileList.Count - 1 do
FileList.Checked[i] := UnCheckAll.Checked;
end;
initialization
{$I showdeletingfilesdlg.lrs}
end.