mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 08:29:47 +02:00
IDE: project inspector: enabling add files buttons
git-svn-id: trunk@14977 -
This commit is contained in:
parent
4d30122bfd
commit
982e77ff6a
@ -12,11 +12,12 @@ object AddToProjectDialog: TAddToProjectDialog
|
||||
ClientWidth = 500
|
||||
OnClose = AddToProjectDialogClose
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '0.9.25'
|
||||
object Notebook: TNotebook
|
||||
Height = 300
|
||||
Width = 500
|
||||
Align = alClient
|
||||
PageIndex = 1
|
||||
PageIndex = 2
|
||||
TabOrder = 0
|
||||
object AddEditorFilePage: TPage
|
||||
Caption = 'AddEditorFilePage'
|
||||
@ -123,7 +124,7 @@ object AddToProjectDialog: TAddToProjectDialog
|
||||
end
|
||||
object DependPkgNameComboBox: TComboBox
|
||||
Left = 218
|
||||
Height = 25
|
||||
Height = 29
|
||||
Top = 14
|
||||
Width = 272
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -168,6 +169,7 @@ object AddToProjectDialog: TAddToProjectDialog
|
||||
MultiSelect = True
|
||||
TabOrder = 0
|
||||
ViewStyle = vsReport
|
||||
OnSelectItem = FilesListViewSelectItem
|
||||
end
|
||||
object FilesBrowseButton: TButton
|
||||
Left = 6
|
||||
|
@ -6,67 +6,68 @@ LazarusResources.Add('TAddToProjectDialog','FORMDATA',[
|
||||
+'rtScrollBar.Page'#3'+'#1#13'ActiveControl'#7#8'Notebook'#11'BorderStyle'#7
|
||||
+#13'bsSizeToolWin'#7'Caption'#6#18'AddToProjectDialog'#12'ClientHeight'#3','
|
||||
+#1#11'ClientWidth'#3#244#1#7'OnClose'#7#23'AddToProjectDialogClose'#8'Positi'
|
||||
+'on'#7#14'poScreenCenter'#0#9'TNotebook'#8'Notebook'#6'Height'#3','#1#5'Widt'
|
||||
+'h'#3#244#1#5'Align'#7#8'alClient'#9'PageIndex'#2#1#8'TabOrder'#2#0#0#5'TPag'
|
||||
+'e'#17'AddEditorFilePage'#7'Caption'#6#17'AddEditorFilePage'#11'ClientWidth'
|
||||
+#3#240#1#12'ClientHeight'#3#13#1#0#6'TLabel'#12'AddFileLabel'#4'Left'#2#6#6
|
||||
+'Height'#2#20#3'Top'#2#6#5'Width'#3#228#1#5'Align'#7#5'alTop'#20'BorderSpaci'
|
||||
+'ng.Around'#2#6#7'Caption'#6#12'AddFileLabel'#11'ParentColor'#8#0#0#8'TListB'
|
||||
+'ox'#14'AddFileListBox'#4'Left'#2#6#6'Height'#3#195#0#3'Top'#2' '#5'Width'#3
|
||||
+#228#1#5'Align'#7#5'alTop'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akB'
|
||||
+'ottom'#0#20'BorderSpacing.Around'#2#6#11'MultiSelect'#9#8'TabOrder'#2#0#8'T'
|
||||
+'opIndex'#2#255#0#0#7'TButton'#13'AddFileButton'#23'AnchorSideRight.Control'
|
||||
+#7#19'CancelAddFileButton'#4'Left'#3#222#0#6'Height'#2#31#3'Top'#3#232#0#5'W'
|
||||
+'idth'#2'l'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#19'BorderSp'
|
||||
+'acing.Right'#2#6#7'Caption'#6#13'AddFileButton'#7'OnClick'#7#18'AddFileButt'
|
||||
+'onClick'#8'TabOrder'#2#1#0#0#7'TButton'#19'CancelAddFileButton'#4'Left'#3'P'
|
||||
+#1#6'Height'#2#31#3'Top'#3#232#0#5'Width'#3#151#0#7'Anchors'#11#7'akRight'#8
|
||||
+'akBottom'#0#8'AutoSize'#9#7'Caption'#6#19'CancelAddFileButton'#11'ModalResu'
|
||||
+'lt'#2#2#8'TabOrder'#2#2#0#0#0#5'TPage'#13'NewDependPage'#7'Caption'#6#13'Ne'
|
||||
+'wDependPage'#11'ClientWidth'#3#240#1#12'ClientHeight'#3#13#1#0#6'TLabel'#18
|
||||
+'DependPkgNameLabel'#4'Left'#2#8#6'Height'#2#20#3'Top'#2#19#5'Width'#3#147#0
|
||||
+#7'Caption'#6#18'DependPkgNameLabel'#11'ParentColor'#8#0#0#6'TLabel'#21'Depe'
|
||||
+'ndMinVersionLabel'#4'Left'#2#8#6'Height'#2#20#3'Top'#2'/'#5'Width'#3#154#0#7
|
||||
+'Caption'#6#21'DependMinVersionLabel'#11'ParentColor'#8#0#0#6'TLabel'#21'Dep'
|
||||
+'endMaxVersionLabel'#4'Left'#2#8#6'Height'#2#20#3'Top'#2'L'#5'Width'#3#158#0
|
||||
+#7'Caption'#6#21'DependMaxVersionLabel'#11'ParentColor'#8#0#0#7'TButton'#18
|
||||
+'CancelDependButton'#4'Left'#3'V'#1#6'Height'#2#29#3'Top'#3#238#0#5'Width'#3
|
||||
+#148#0#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#7'Caption'#6#18
|
||||
+'CancelDependButton'#11'ModalResult'#2#2#8'TabOrder'#2#0#0#0#7'TButton'#15'N'
|
||||
+'ewDependButton'#23'AnchorSideRight.Control'#7#18'CancelDependButton'#4'Left'
|
||||
+#3#204#0#6'Height'#2#29#3'Top'#3#238#0#5'Width'#3#132#0#7'Anchors'#11#7'akRi'
|
||||
+'ght'#8'akBottom'#0#8'AutoSize'#9#19'BorderSpacing.Right'#2#6#7'Caption'#6#15
|
||||
+'NewDependButton'#7'OnClick'#7#20'NewDependButtonClick'#8'TabOrder'#2#1#0#0#9
|
||||
+'TComboBox'#21'DependPkgNameComboBox'#4'Left'#3#218#0#6'Height'#2#25#3'Top'#2
|
||||
+#14#5'Width'#3#16#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#12'AutoCom'
|
||||
+'plete'#9#16'AutoCompleteText'#11#12'cbactEnabled'#22'cbactEndOfLineComplete'
|
||||
+#20'cbactSearchAscending'#0#9'MaxLength'#2#0#8'TabOrder'#2#2#4'Text'#6#21'De'
|
||||
+'pendPkgNameComboBox'#0#0#5'TEdit'#20'DependMinVersionEdit'#4'Left'#3#218#0#6
|
||||
+'Height'#2#23#3'Top'#2','#5'Width'#3#16#1#7'Anchors'#11#5'akTop'#6'akLeft'#7
|
||||
+'akRight'#0#8'TabOrder'#2#3#4'Text'#6#20'DependMinVersionEdit'#0#0#5'TEdit'
|
||||
+#20'DependMaxVersionEdit'#4'Left'#3#218#0#6'Height'#2#23#3'Top'#2'I'#5'Width'
|
||||
+#3#16#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#4#4'Text'
|
||||
+#6#20'DependMaxVersionEdit'#0#0#0#5'TPage'#12'AddFilesPage'#7'Caption'#6#12
|
||||
+'AddFilesPage'#11'ClientWidth'#3#240#1#12'ClientHeight'#3#13#1#0#9'TListView'
|
||||
+#13'FilesListView'#4'Left'#2#6#6'Height'#3#221#0#3'Top'#2#6#5'Width'#3#228#1
|
||||
+#5'Align'#7#5'alTop'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'
|
||||
+#0#20'BorderSpacing.Around'#2#6#7'Columns'#14#0#11'MultiSelect'#9#8'TabOrder'
|
||||
+#2#0#9'ViewStyle'#7#8'vsReport'#0#0#7'TButton'#17'FilesBrowseButton'#4'Left'
|
||||
+#2#6#6'Height'#2#29#3'Top'#3#233#0#5'Width'#3#128#0#7'Anchors'#11#6'akLeft'#8
|
||||
+'akBottom'#0#8'AutoSize'#9#7'Caption'#6#17'FilesBrowseButton'#7'OnClick'#7#22
|
||||
+'FilesBrowseButtonClick'#8'TabOrder'#2#1#0#0#7'TButton'#18'FilesShortenButto'
|
||||
+'n'#22'AnchorSideLeft.Control'#7#17'FilesBrowseButton'#19'AnchorSideLeft.Sid'
|
||||
+'e'#7#9'asrBottom'#4'Left'#3#140#0#6'Height'#2#29#3'Top'#3#233#0#5'Width'#3
|
||||
+#133#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#8'AutoSize'#9#18'BorderSpacing.'
|
||||
+'Left'#2#6#7'Caption'#6#18'FilesShortenButton'#7'OnClick'#7#23'FilesShortenB'
|
||||
+'uttonClick'#8'TabOrder'#2#2#0#0#7'TButton'#17'FilesDeleteButton'#22'AnchorS'
|
||||
+'ideLeft.Control'#7#18'FilesShortenButton'#19'AnchorSideLeft.Side'#7#9'asrBo'
|
||||
+'ttom'#4'Left'#3#23#1#6'Height'#2#29#3'Top'#3#233#0#5'Width'#2'|'#7'Anchors'
|
||||
+#11#6'akLeft'#8'akBottom'#0#8'AutoSize'#9#18'BorderSpacing.Left'#2#6#7'Capti'
|
||||
+'on'#6#17'FilesDeleteButton'#7'OnClick'#7#22'FilesDeleteButtonClick'#8'TabOr'
|
||||
+'der'#2#3#0#0#7'TButton'#14'FilesAddButton'#22'AnchorSideLeft.Control'#7#17
|
||||
,'FilesDeleteButton'#19'AnchorSideLeft.Side'#7#9'asrBottom'#4'Left'#3#153#1#6
|
||||
+'Height'#2#29#3'Top'#3#233#0#5'Width'#2'k'#7'Anchors'#11#6'akLeft'#8'akBotto'
|
||||
+'m'#0#8'AutoSize'#9#18'BorderSpacing.Left'#2#6#7'Caption'#6#14'FilesAddButto'
|
||||
+'n'#7'OnClick'#7#19'FilesAddButtonClick'#8'TabOrder'#2#4#0#0#0#0#0
|
||||
+'on'#7#14'poScreenCenter'#10'LCLVersion'#6#6'0.9.25'#0#9'TNotebook'#8'Notebo'
|
||||
+'ok'#6'Height'#3','#1#5'Width'#3#244#1#5'Align'#7#8'alClient'#9'PageIndex'#2
|
||||
+#2#8'TabOrder'#2#0#0#5'TPage'#17'AddEditorFilePage'#7'Caption'#6#17'AddEdito'
|
||||
+'rFilePage'#11'ClientWidth'#3#240#1#12'ClientHeight'#3#13#1#0#6'TLabel'#12'A'
|
||||
+'ddFileLabel'#4'Left'#2#6#6'Height'#2#20#3'Top'#2#6#5'Width'#3#228#1#5'Align'
|
||||
+#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'#6#12'AddFileLabel'#11'Pa'
|
||||
+'rentColor'#8#0#0#8'TListBox'#14'AddFileListBox'#4'Left'#2#6#6'Height'#3#195
|
||||
+#0#3'Top'#2' '#5'Width'#3#228#1#5'Align'#7#5'alTop'#7'Anchors'#11#5'akTop'#6
|
||||
+'akLeft'#7'akRight'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#11'MultiSelec'
|
||||
+'t'#9#8'TabOrder'#2#0#8'TopIndex'#2#255#0#0#7'TButton'#13'AddFileButton'#23
|
||||
+'AnchorSideRight.Control'#7#19'CancelAddFileButton'#4'Left'#3#222#0#6'Height'
|
||||
+#2#31#3'Top'#3#232#0#5'Width'#2'l'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8
|
||||
+'AutoSize'#9#19'BorderSpacing.Right'#2#6#7'Caption'#6#13'AddFileButton'#7'On'
|
||||
+'Click'#7#18'AddFileButtonClick'#8'TabOrder'#2#1#0#0#7'TButton'#19'CancelAdd'
|
||||
+'FileButton'#4'Left'#3'P'#1#6'Height'#2#31#3'Top'#3#232#0#5'Width'#3#151#0#7
|
||||
+'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#7'Caption'#6#19'CancelAd'
|
||||
+'dFileButton'#11'ModalResult'#2#2#8'TabOrder'#2#2#0#0#0#5'TPage'#13'NewDepen'
|
||||
+'dPage'#7'Caption'#6#13'NewDependPage'#11'ClientWidth'#3#240#1#12'ClientHeig'
|
||||
+'ht'#3#13#1#0#6'TLabel'#18'DependPkgNameLabel'#4'Left'#2#8#6'Height'#2#20#3
|
||||
+'Top'#2#19#5'Width'#3#147#0#7'Caption'#6#18'DependPkgNameLabel'#11'ParentCol'
|
||||
+'or'#8#0#0#6'TLabel'#21'DependMinVersionLabel'#4'Left'#2#8#6'Height'#2#20#3
|
||||
+'Top'#2'/'#5'Width'#3#154#0#7'Caption'#6#21'DependMinVersionLabel'#11'Parent'
|
||||
+'Color'#8#0#0#6'TLabel'#21'DependMaxVersionLabel'#4'Left'#2#8#6'Height'#2#20
|
||||
+#3'Top'#2'L'#5'Width'#3#158#0#7'Caption'#6#21'DependMaxVersionLabel'#11'Pare'
|
||||
+'ntColor'#8#0#0#7'TButton'#18'CancelDependButton'#4'Left'#3'V'#1#6'Height'#2
|
||||
+#29#3'Top'#3#238#0#5'Width'#3#148#0#7'Anchors'#11#7'akRight'#8'akBottom'#0#8
|
||||
+'AutoSize'#9#7'Caption'#6#18'CancelDependButton'#11'ModalResult'#2#2#8'TabOr'
|
||||
+'der'#2#0#0#0#7'TButton'#15'NewDependButton'#23'AnchorSideRight.Control'#7#18
|
||||
+'CancelDependButton'#4'Left'#3#204#0#6'Height'#2#29#3'Top'#3#238#0#5'Width'#3
|
||||
+#132#0#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#19'BorderSpacing'
|
||||
+'.Right'#2#6#7'Caption'#6#15'NewDependButton'#7'OnClick'#7#20'NewDependButto'
|
||||
+'nClick'#8'TabOrder'#2#1#0#0#9'TComboBox'#21'DependPkgNameComboBox'#4'Left'#3
|
||||
+#218#0#6'Height'#2#29#3'Top'#2#14#5'Width'#3#16#1#7'Anchors'#11#5'akTop'#6'a'
|
||||
+'kLeft'#7'akRight'#0#12'AutoComplete'#9#16'AutoCompleteText'#11#12'cbactEnab'
|
||||
+'led'#22'cbactEndOfLineComplete'#20'cbactSearchAscending'#0#9'MaxLength'#2#0
|
||||
+#8'TabOrder'#2#2#4'Text'#6#21'DependPkgNameComboBox'#0#0#5'TEdit'#20'DependM'
|
||||
+'inVersionEdit'#4'Left'#3#218#0#6'Height'#2#23#3'Top'#2','#5'Width'#3#16#1#7
|
||||
+'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#3#4'Text'#6#20'De'
|
||||
+'pendMinVersionEdit'#0#0#5'TEdit'#20'DependMaxVersionEdit'#4'Left'#3#218#0#6
|
||||
+'Height'#2#23#3'Top'#2'I'#5'Width'#3#16#1#7'Anchors'#11#5'akTop'#6'akLeft'#7
|
||||
+'akRight'#0#8'TabOrder'#2#4#4'Text'#6#20'DependMaxVersionEdit'#0#0#0#5'TPage'
|
||||
+#12'AddFilesPage'#7'Caption'#6#12'AddFilesPage'#11'ClientWidth'#3#240#1#12'C'
|
||||
+'lientHeight'#3#13#1#0#9'TListView'#13'FilesListView'#4'Left'#2#6#6'Height'#3
|
||||
+#221#0#3'Top'#2#6#5'Width'#3#228#1#5'Align'#7#5'alTop'#7'Anchors'#11#5'akTop'
|
||||
+#6'akLeft'#7'akRight'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#7'Columns'
|
||||
+#14#0#11'MultiSelect'#9#8'TabOrder'#2#0#9'ViewStyle'#7#8'vsReport'#12'OnSele'
|
||||
+'ctItem'#7#23'FilesListViewSelectItem'#0#0#7'TButton'#17'FilesBrowseButton'#4
|
||||
+'Left'#2#6#6'Height'#2#29#3'Top'#3#233#0#5'Width'#3#128#0#7'Anchors'#11#6'ak'
|
||||
+'Left'#8'akBottom'#0#8'AutoSize'#9#7'Caption'#6#17'FilesBrowseButton'#7'OnCl'
|
||||
+'ick'#7#22'FilesBrowseButtonClick'#8'TabOrder'#2#1#0#0#7'TButton'#18'FilesSh'
|
||||
+'ortenButton'#22'AnchorSideLeft.Control'#7#17'FilesBrowseButton'#19'AnchorSi'
|
||||
+'deLeft.Side'#7#9'asrBottom'#4'Left'#3#140#0#6'Height'#2#29#3'Top'#3#233#0#5
|
||||
+'Width'#3#133#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#8'AutoSize'#9#18'Borde'
|
||||
+'rSpacing.Left'#2#6#7'Caption'#6#18'FilesShortenButton'#7'OnClick'#7#23'File'
|
||||
+'sShortenButtonClick'#8'TabOrder'#2#2#0#0#7'TButton'#17'FilesDeleteButton'#22
|
||||
+'AnchorSideLeft.Control'#7#18'FilesShortenButton'#19'AnchorSideLeft.Side'#7#9
|
||||
+'asrBottom'#4'Left'#3#23#1#6'Height'#2#29#3'Top'#3#233#0#5'Width'#2'|'#7'Anc'
|
||||
+'hors'#11#6'akLeft'#8'akBottom'#0#8'AutoSize'#9#18'BorderSpacing.Left'#2#6#7
|
||||
+'Caption'#6#17'FilesDeleteButton'#7'OnClick'#7#22'FilesDeleteButtonClick'#8
|
||||
,'TabOrder'#2#3#0#0#7'TButton'#14'FilesAddButton'#22'AnchorSideLeft.Control'#7
|
||||
+#17'FilesDeleteButton'#19'AnchorSideLeft.Side'#7#9'asrBottom'#4'Left'#3#153#1
|
||||
+#6'Height'#2#29#3'Top'#3#233#0#5'Width'#2'k'#7'Anchors'#11#6'akLeft'#8'akBot'
|
||||
+'tom'#0#8'AutoSize'#9#18'BorderSpacing.Left'#2#6#7'Caption'#6#14'FilesAddBut'
|
||||
+'ton'#7'OnClick'#7#19'FilesAddButtonClick'#8'TabOrder'#2#4#0#0#0#0#0
|
||||
]);
|
||||
|
@ -86,6 +86,8 @@ type
|
||||
procedure AddFileButtonClick(Sender: TObject);
|
||||
procedure AddToProjectDialogClose(Sender: TObject;
|
||||
var CloseAction: TCloseAction);
|
||||
procedure FilesListViewSelectItem(Sender: TObject; Item: TListItem;
|
||||
Selected: Boolean);
|
||||
procedure NewDependButtonClick(Sender: TObject);
|
||||
procedure FilesAddButtonClick(Sender: TObject);
|
||||
procedure FilesBrowseButtonClick(Sender: TObject);
|
||||
@ -107,6 +109,7 @@ type
|
||||
destructor Destroy; override;
|
||||
procedure UpdateAvailableDependencyNames;
|
||||
procedure UpdateAvailableFiles;
|
||||
procedure UpdateFilesButtons;
|
||||
end;
|
||||
|
||||
function ShowAddToProjectDlg(AProject: TProject;
|
||||
@ -194,6 +197,12 @@ begin
|
||||
IDEDialogLayoutList.SaveLayout(Self);
|
||||
end;
|
||||
|
||||
procedure TAddToProjectDialog.FilesListViewSelectItem(Sender: TObject;
|
||||
Item: TListItem; Selected: Boolean);
|
||||
begin
|
||||
UpdateFilesButtons;
|
||||
end;
|
||||
|
||||
procedure TAddToProjectDialog.NewDependButtonClick(Sender: TObject);
|
||||
var
|
||||
NewDependency: TPkgDependency;
|
||||
@ -334,6 +343,7 @@ begin
|
||||
NewListItem.SubItems.Add(GetPkgFileTypeLocalizedName(NewPgkFileType));
|
||||
end;
|
||||
end;
|
||||
UpdateFilesButtons;
|
||||
end;
|
||||
InputHistories.StoreFileDialogSettings(OpenDialog);
|
||||
finally
|
||||
@ -348,6 +358,7 @@ begin
|
||||
for i:=FilesListView.Items.Count-1 downto 0 do
|
||||
if FilesListView.Items[i].Selected then
|
||||
FilesListView.Items.Delete(i);
|
||||
UpdateFilesButtons;
|
||||
end;
|
||||
|
||||
procedure TAddToProjectDialog.FilesShortenButtonClick(Sender: TObject);
|
||||
@ -416,6 +427,7 @@ begin
|
||||
FilesShortenButton.Caption:=lisA2PSwitchPaths;
|
||||
FilesDeleteButton.Caption:=dlgEdDelete;
|
||||
FilesAddButton.Caption:=lisA2PAddFilesToPackage;
|
||||
UpdateFilesButtons;
|
||||
end;
|
||||
|
||||
procedure TAddToProjectDialog.OnIteratePackages(APackageID: TLazPackageID);
|
||||
@ -553,6 +565,14 @@ begin
|
||||
AddFileListBox.Items.Clear;
|
||||
end;
|
||||
AddFileListBox.Items.EndUpdate;
|
||||
UpdateFilesButtons;
|
||||
end;
|
||||
|
||||
procedure TAddToProjectDialog.UpdateFilesButtons;
|
||||
begin
|
||||
FilesShortenButton.Enabled:=FilesListView.Items.Count>0;
|
||||
FilesDeleteButton.Enabled:=FilesListView.SelCount>0;
|
||||
FilesAddButton.Enabled:=FilesListView.Items.Count>0;
|
||||
end;
|
||||
|
||||
{ TAddToProjectResult }
|
||||
|
Loading…
Reference in New Issue
Block a user