mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 05:39:14 +02:00
IDE: Improvements for ProjectInspector. Issue #28127, patch from Alexey Torgashin.
git-svn-id: trunk@49101 -
This commit is contained in:
parent
eb15eb559f
commit
5748dddb92
@ -4,30 +4,30 @@ object AddToProjectDialog: TAddToProjectDialog
|
|||||||
Top = 250
|
Top = 250
|
||||||
Width = 598
|
Width = 598
|
||||||
ActiveControl = Notebook
|
ActiveControl = Notebook
|
||||||
BorderStyle = bsSizeToolWin
|
BorderIcons = [biSystemMenu, biMaximize]
|
||||||
Caption = 'AddToProjectDialog'
|
Caption = 'AddToProjectDialog'
|
||||||
ClientHeight = 339
|
ClientHeight = 339
|
||||||
ClientWidth = 598
|
ClientWidth = 598
|
||||||
OnClose = AddToProjectDialogClose
|
OnClose = AddToProjectDialogClose
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '1.3'
|
LCLVersion = '1.5'
|
||||||
object Notebook: TPageControl
|
object Notebook: TPageControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 297
|
Height = 301
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 598
|
Width = 598
|
||||||
ActivePage = AddEditorFilePage
|
ActivePage = AddFilesPage
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabIndex = 0
|
TabIndex = 2
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnChange = NotebookChange
|
OnChange = NotebookChange
|
||||||
object AddEditorFilePage: TTabSheet
|
object AddEditorFilePage: TTabSheet
|
||||||
Caption = 'AddEditorFilePage'
|
Caption = 'AddEditorFilePage'
|
||||||
ClientHeight = 264
|
ClientHeight = 273
|
||||||
ClientWidth = 590
|
ClientWidth = 590
|
||||||
object AddFileLabel: TLabel
|
object AddFileLabel: TLabel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 20
|
Height = 15
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 578
|
Width = 578
|
||||||
Align = alTop
|
Align = alTop
|
||||||
@ -37,8 +37,8 @@ object AddToProjectDialog: TAddToProjectDialog
|
|||||||
end
|
end
|
||||||
object AddFileListView: TListView
|
object AddFileListView: TListView
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 224
|
Height = 238
|
||||||
Top = 32
|
Top = 27
|
||||||
Width = 578
|
Width = 578
|
||||||
Align = alTop
|
Align = alTop
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
@ -84,13 +84,13 @@ object AddToProjectDialog: TAddToProjectDialog
|
|||||||
end
|
end
|
||||||
object DependPkgNameComboBox: TComboBox
|
object DependPkgNameComboBox: TComboBox
|
||||||
Left = 218
|
Left = 218
|
||||||
Height = 28
|
Height = 23
|
||||||
Top = 14
|
Top = 14
|
||||||
Width = 370
|
Width = 370
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoComplete = True
|
AutoComplete = True
|
||||||
AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
|
AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
|
||||||
ItemHeight = 20
|
ItemHeight = 15
|
||||||
OnChange = DependPkgNameComboBoxChange
|
OnChange = DependPkgNameComboBoxChange
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
Text = 'DependPkgNameComboBox'
|
Text = 'DependPkgNameComboBox'
|
||||||
@ -116,12 +116,12 @@ object AddToProjectDialog: TAddToProjectDialog
|
|||||||
end
|
end
|
||||||
object AddFilesPage: TTabSheet
|
object AddFilesPage: TTabSheet
|
||||||
Caption = 'AddFilesPage'
|
Caption = 'AddFilesPage'
|
||||||
ClientHeight = 264
|
ClientHeight = 273
|
||||||
ClientWidth = 590
|
ClientWidth = 590
|
||||||
object FilesListView: TListView
|
object FilesListView: TListView
|
||||||
AnchorSideBottom.Control = FilesDirButton
|
AnchorSideBottom.Control = FilesDirButton
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 216
|
Height = 230
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 578
|
Width = 578
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
@ -141,9 +141,9 @@ object AddToProjectDialog: TAddToProjectDialog
|
|||||||
AnchorSideBottom.Control = AddFilesPage
|
AnchorSideBottom.Control = AddFilesPage
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 30
|
Height = 25
|
||||||
Top = 228
|
Top = 242
|
||||||
Width = 119
|
Width = 100
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
@ -156,10 +156,10 @@ object AddToProjectDialog: TAddToProjectDialog
|
|||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = FilesDirButton
|
AnchorSideTop.Control = FilesDirButton
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 131
|
Left = 112
|
||||||
Height = 30
|
Height = 25
|
||||||
Top = 228
|
Top = 242
|
||||||
Width = 150
|
Width = 126
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'FilesShortenButton'
|
Caption = 'FilesShortenButton'
|
||||||
@ -171,10 +171,10 @@ object AddToProjectDialog: TAddToProjectDialog
|
|||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = FilesShortenButton
|
AnchorSideTop.Control = FilesShortenButton
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 287
|
Left = 244
|
||||||
Height = 30
|
Height = 25
|
||||||
Top = 228
|
Top = 242
|
||||||
Width = 143
|
Width = 118
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'FilesDeleteButton'
|
Caption = 'FilesDeleteButton'
|
||||||
@ -185,8 +185,8 @@ object AddToProjectDialog: TAddToProjectDialog
|
|||||||
end
|
end
|
||||||
object ButtonPanel: TButtonPanel
|
object ButtonPanel: TButtonPanel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 30
|
Height = 26
|
||||||
Top = 303
|
Top = 307
|
||||||
Width = 586
|
Width = 586
|
||||||
OKButton.Name = 'OKButton'
|
OKButton.Name = 'OKButton'
|
||||||
OKButton.DefaultCaption = True
|
OKButton.DefaultCaption = True
|
||||||
|
@ -44,7 +44,8 @@ uses
|
|||||||
type
|
type
|
||||||
TAddToProjectType = (
|
TAddToProjectType = (
|
||||||
a2pFiles,
|
a2pFiles,
|
||||||
a2pRequiredPkg
|
a2pRequiredPkg,
|
||||||
|
a2pEditorFiles
|
||||||
);
|
);
|
||||||
|
|
||||||
TAddToProjectResult = class
|
TAddToProjectResult = class
|
||||||
@ -113,7 +114,8 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function ShowAddToProjectDlg(AProject: TProject;
|
function ShowAddToProjectDlg(AProject: TProject;
|
||||||
var AddResult: TAddToProjectResult): TModalResult;
|
var AddResult: TAddToProjectResult;
|
||||||
|
AInitTab: TAddToProjectType): TModalResult;
|
||||||
function CheckAddingDependency(LazProject: TProject;
|
function CheckAddingDependency(LazProject: TProject;
|
||||||
NewDependency: TPkgDependency): boolean;
|
NewDependency: TPkgDependency): boolean;
|
||||||
|
|
||||||
@ -123,7 +125,9 @@ implementation
|
|||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
function ShowAddToProjectDlg(AProject: TProject;
|
function ShowAddToProjectDlg(AProject: TProject;
|
||||||
var AddResult: TAddToProjectResult): TModalResult;
|
var AddResult: TAddToProjectResult;
|
||||||
|
AInitTab: TAddToProjectType
|
||||||
|
): TModalResult;
|
||||||
var
|
var
|
||||||
AddToProjectDialog: TAddToProjectDialog;
|
AddToProjectDialog: TAddToProjectDialog;
|
||||||
begin
|
begin
|
||||||
@ -131,6 +135,18 @@ begin
|
|||||||
AddToProjectDialog.TheProject:=AProject;
|
AddToProjectDialog.TheProject:=AProject;
|
||||||
AddToProjectDialog.UpdateAvailableFiles;
|
AddToProjectDialog.UpdateAvailableFiles;
|
||||||
AddToProjectDialog.UpdateAvailableDependencyNames;
|
AddToProjectDialog.UpdateAvailableDependencyNames;
|
||||||
|
|
||||||
|
case AInitTab of
|
||||||
|
a2pFiles: AddToProjectDialog.NoteBook.ActivePageIndex:=2;
|
||||||
|
a2pEditorFiles: AddToProjectDialog.NoteBook.ActivePageIndex:=0;
|
||||||
|
a2pRequiredPkg: AddToProjectDialog.NoteBook.ActivePageIndex:=1;
|
||||||
|
end;
|
||||||
|
// hide tabs for simple look
|
||||||
|
AddToProjectDialog.NoteBook.ShowTabs:=false;
|
||||||
|
// press "Add files" btn
|
||||||
|
if AInitTab=a2pFiles then
|
||||||
|
AddToProjectDialog.FilesDirButton.Click;
|
||||||
|
|
||||||
Result:=AddToProjectDialog.ShowModal;
|
Result:=AddToProjectDialog.ShowModal;
|
||||||
if Result=mrOk then begin
|
if Result=mrOk then begin
|
||||||
AddResult:=AddToProjectDialog.AddResult;
|
AddResult:=AddToProjectDialog.AddResult;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
object ProjectInspectorForm: TProjectInspectorForm
|
object ProjectInspectorForm: TProjectInspectorForm
|
||||||
Left = 393
|
Left = 670
|
||||||
Height = 456
|
Height = 456
|
||||||
Top = 104
|
Top = 134
|
||||||
Width = 299
|
Width = 299
|
||||||
ActiveControl = ItemsTreeView
|
ActiveControl = ItemsTreeView
|
||||||
AllowDropFiles = True
|
AllowDropFiles = True
|
||||||
@ -18,6 +18,7 @@ object ProjectInspectorForm: TProjectInspectorForm
|
|||||||
Align = alClient
|
Align = alClient
|
||||||
Anchors = [akTop, akLeft, akBottom]
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
BorderSpacing.Top = 2
|
BorderSpacing.Top = 2
|
||||||
|
DefaultItemHeight = 18
|
||||||
DragMode = dmAutomatic
|
DragMode = dmAutomatic
|
||||||
MultiSelect = True
|
MultiSelect = True
|
||||||
PopupMenu = ItemsPopupMenu
|
PopupMenu = ItemsPopupMenu
|
||||||
@ -38,6 +39,7 @@ object ProjectInspectorForm: TProjectInspectorForm
|
|||||||
Top = 48
|
Top = 48
|
||||||
Width = 299
|
Width = 299
|
||||||
Align = alTop
|
Align = alTop
|
||||||
|
BevelOuter = bvNone
|
||||||
ClientHeight = 28
|
ClientHeight = 28
|
||||||
ClientWidth = 299
|
ClientWidth = 299
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
@ -45,13 +47,14 @@ object ProjectInspectorForm: TProjectInspectorForm
|
|||||||
AnchorSideLeft.Control = BtnPanel
|
AnchorSideLeft.Control = BtnPanel
|
||||||
AnchorSideTop.Control = BtnPanel
|
AnchorSideTop.Control = BtnPanel
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 1
|
Left = 2
|
||||||
Height = 26
|
Height = 25
|
||||||
Top = 1
|
Top = 2
|
||||||
Width = 25
|
Width = 25
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
AllowAllUp = True
|
AllowAllUp = True
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
|
BorderSpacing.Around = 2
|
||||||
Constraints.MinHeight = 25
|
Constraints.MinHeight = 25
|
||||||
Constraints.MinWidth = 25
|
Constraints.MinWidth = 25
|
||||||
OnClick = OpenButtonClick
|
OnClick = OpenButtonClick
|
||||||
@ -63,13 +66,14 @@ object ProjectInspectorForm: TProjectInspectorForm
|
|||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = OpenButton
|
AnchorSideTop.Control = OpenButton
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 37
|
Left = 40
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 25
|
Width = 25
|
||||||
AllowAllUp = True
|
AllowAllUp = True
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Left = 11
|
BorderSpacing.Left = 11
|
||||||
|
BorderSpacing.Around = 2
|
||||||
Constraints.MinHeight = 25
|
Constraints.MinHeight = 25
|
||||||
Constraints.MinWidth = 25
|
Constraints.MinWidth = 25
|
||||||
GroupIndex = 1
|
GroupIndex = 1
|
||||||
@ -82,13 +86,13 @@ object ProjectInspectorForm: TProjectInspectorForm
|
|||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = OpenButton
|
AnchorSideTop.Control = OpenButton
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 63
|
Left = 67
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 25
|
Width = 25
|
||||||
AllowAllUp = True
|
AllowAllUp = True
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Left = 1
|
BorderSpacing.Around = 2
|
||||||
Constraints.MinHeight = 25
|
Constraints.MinHeight = 25
|
||||||
Constraints.MinWidth = 25
|
Constraints.MinWidth = 25
|
||||||
GroupIndex = 2
|
GroupIndex = 2
|
||||||
@ -101,10 +105,10 @@ object ProjectInspectorForm: TProjectInspectorForm
|
|||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = SortAlphabeticallyButton
|
AnchorSideTop.Control = SortAlphabeticallyButton
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 91
|
Left = 95
|
||||||
Height = 28
|
Height = 23
|
||||||
Top = 0
|
Top = 3
|
||||||
Width = 205
|
Width = 201
|
||||||
UseFormActivate = True
|
UseFormActivate = True
|
||||||
ButtonWidth = 23
|
ButtonWidth = 23
|
||||||
NumGlyphs = 1
|
NumGlyphs = 1
|
||||||
@ -131,5 +135,32 @@ object ProjectInspectorForm: TProjectInspectorForm
|
|||||||
OnPopup = ItemsPopupMenuPopup
|
OnPopup = ItemsPopupMenuPopup
|
||||||
left = 72
|
left = 72
|
||||||
top = 112
|
top = 112
|
||||||
|
object MenuItem1: TMenuItem
|
||||||
|
Caption = 'New Item1'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object AddPopupMenu: TPopupMenu
|
||||||
|
left = 74
|
||||||
|
top = 163
|
||||||
|
object mnuAddDiskFile: TMenuItem
|
||||||
|
Caption = 'Add file from disk'
|
||||||
|
Default = True
|
||||||
|
OnClick = AddBitBtnClick
|
||||||
|
end
|
||||||
|
object MenuItem2: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object mnuAddDiskFiles: TMenuItem
|
||||||
|
Caption = 'Add files'
|
||||||
|
OnClick = mnuAddDiskFilesClick
|
||||||
|
end
|
||||||
|
object mnuAddEditorFiles: TMenuItem
|
||||||
|
Caption = 'Add editor files'
|
||||||
|
OnClick = mnuAddEditorFilesClick
|
||||||
|
end
|
||||||
|
object mnuAddReq: TMenuItem
|
||||||
|
Caption = 'Add requirement'
|
||||||
|
OnClick = mnuAddReqClick
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -86,9 +86,16 @@ type
|
|||||||
{ TProjectInspectorForm }
|
{ TProjectInspectorForm }
|
||||||
|
|
||||||
TProjectInspectorForm = class(TForm,IFilesEditorInterface)
|
TProjectInspectorForm = class(TForm,IFilesEditorInterface)
|
||||||
|
AddPopupMenu: TPopupMenu;
|
||||||
BtnPanel: TPanel;
|
BtnPanel: TPanel;
|
||||||
DirectoryHierarchyButton: TSpeedButton;
|
DirectoryHierarchyButton: TSpeedButton;
|
||||||
FilterEdit: TTreeFilterEdit;
|
FilterEdit: TTreeFilterEdit;
|
||||||
|
MenuItem1: TMenuItem;
|
||||||
|
MenuItem2: TMenuItem;
|
||||||
|
mnuAddEditorFiles: TMenuItem;
|
||||||
|
mnuAddDiskFile: TMenuItem;
|
||||||
|
mnuAddDiskFiles: TMenuItem;
|
||||||
|
mnuAddReq: TMenuItem;
|
||||||
OpenButton: TSpeedButton;
|
OpenButton: TSpeedButton;
|
||||||
ItemsTreeView: TTreeView;
|
ItemsTreeView: TTreeView;
|
||||||
ItemsPopupMenu: TPopupMenu;
|
ItemsPopupMenu: TPopupMenu;
|
||||||
@ -97,12 +104,10 @@ type
|
|||||||
ToolBar: TToolBar;
|
ToolBar: TToolBar;
|
||||||
// toolbuttons
|
// toolbuttons
|
||||||
AddBitBtn: TToolButton;
|
AddBitBtn: TToolButton;
|
||||||
AddMoreBitBtn: TToolButton;
|
|
||||||
RemoveBitBtn: TToolButton;
|
RemoveBitBtn: TToolButton;
|
||||||
OptionsBitBtn: TToolButton;
|
OptionsBitBtn: TToolButton;
|
||||||
HelpBitBtn: TToolButton;
|
HelpBitBtn: TToolButton;
|
||||||
procedure AddBitBtnClick(Sender: TObject);
|
procedure AddBitBtnClick(Sender: TObject);
|
||||||
procedure AddMoreBitBtnClick(Sender: TObject);
|
|
||||||
procedure CopyMoveToDirMenuItemClick(Sender: TObject);
|
procedure CopyMoveToDirMenuItemClick(Sender: TObject);
|
||||||
procedure DirectoryHierarchyButtonClick(Sender: TObject);
|
procedure DirectoryHierarchyButtonClick(Sender: TObject);
|
||||||
procedure FormDropFiles(Sender: TObject; const FileNames: array of String);
|
procedure FormDropFiles(Sender: TObject; const FileNames: array of String);
|
||||||
@ -116,6 +121,9 @@ type
|
|||||||
State: TDragState; var Accept: Boolean);
|
State: TDragState; var Accept: Boolean);
|
||||||
procedure ItemsTreeViewKeyDown(Sender: TObject; var Key: Word; {%H-}Shift: TShiftState);
|
procedure ItemsTreeViewKeyDown(Sender: TObject; var Key: Word; {%H-}Shift: TShiftState);
|
||||||
procedure ItemsTreeViewSelectionChanged(Sender: TObject);
|
procedure ItemsTreeViewSelectionChanged(Sender: TObject);
|
||||||
|
procedure mnuAddDiskFilesClick(Sender: TObject);
|
||||||
|
procedure mnuAddEditorFilesClick(Sender: TObject);
|
||||||
|
procedure mnuAddReqClick(Sender: TObject);
|
||||||
procedure MoveDependencyUpClick(Sender: TObject);
|
procedure MoveDependencyUpClick(Sender: TObject);
|
||||||
procedure MoveDependencyDownClick(Sender: TObject);
|
procedure MoveDependencyDownClick(Sender: TObject);
|
||||||
procedure SetDependencyDefaultFilenameMenuItemClick(Sender: TObject);
|
procedure SetDependencyDefaultFilenameMenuItemClick(Sender: TObject);
|
||||||
@ -162,6 +170,7 @@ type
|
|||||||
FFlags: TProjectInspectorFlags;
|
FFlags: TProjectInspectorFlags;
|
||||||
FProjectNodeDataList : array [TPENodeType] of TPENodeData;
|
FProjectNodeDataList : array [TPENodeType] of TPENodeData;
|
||||||
function AddOneFile(aFilename: string): TModalResult;
|
function AddOneFile(aFilename: string): TModalResult;
|
||||||
|
procedure DoAddMoreDialog(AInitTab: TAddToProjectType);
|
||||||
procedure FreeNodeData(Typ: TPENodeType);
|
procedure FreeNodeData(Typ: TPENodeType);
|
||||||
function CreateNodeData(Typ: TPENodeType; aName: string; aRemoved: boolean): TPENodeData;
|
function CreateNodeData(Typ: TPENodeType; aName: string; aRemoved: boolean): TPENodeData;
|
||||||
procedure SetDependencyDefaultFilename(AsPreferred: boolean);
|
procedure SetDependencyDefaultFilename(AsPreferred: boolean);
|
||||||
@ -320,6 +329,21 @@ begin
|
|||||||
UpdateButtons;
|
UpdateButtons;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TProjectInspectorForm.mnuAddDiskFilesClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
DoAddMoreDialog(a2pFiles);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TProjectInspectorForm.mnuAddEditorFilesClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
DoAddMoreDialog(a2pEditorFiles);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TProjectInspectorForm.mnuAddReqClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
DoAddMoreDialog(a2pRequiredPkg);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TProjectInspectorForm.MoveDependencyUpClick(Sender: TObject);
|
procedure TProjectInspectorForm.MoveDependencyUpClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
Dependency: TPkgDependency;
|
Dependency: TPkgDependency;
|
||||||
@ -428,13 +452,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TProjectInspectorForm.AddMoreBitBtnClick(Sender: TObject);
|
procedure TProjectInspectorForm.DoAddMoreDialog(AInitTab: TAddToProjectType);
|
||||||
var
|
var
|
||||||
AddResult: TAddToProjectResult;
|
AddResult: TAddToProjectResult;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
AddResult:=nil;
|
AddResult:=nil;
|
||||||
if ShowAddToProjectDlg(LazProject,AddResult)<>mrOk then exit;
|
if ShowAddToProjectDlg(LazProject,AddResult,AInitTab)<>mrOk then exit;
|
||||||
|
|
||||||
case AddResult.AddType of
|
case AddResult.AddType of
|
||||||
a2pFiles:
|
a2pFiles:
|
||||||
@ -456,6 +480,8 @@ begin
|
|||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
else
|
||||||
|
Showmessage('Not implemented');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
AddResult.Free;
|
AddResult.Free;
|
||||||
@ -937,13 +963,18 @@ begin
|
|||||||
ToolBar.Images := IDEImages.Images_16;
|
ToolBar.Images := IDEImages.Images_16;
|
||||||
FilterEdit.OnGetImageIndex:=@OnTreeViewGetImageIndex;
|
FilterEdit.OnGetImageIndex:=@OnTreeViewGetImageIndex;
|
||||||
|
|
||||||
AddBitBtn := CreateToolButton('AddBitBtn', lisAdd, lisPckEditAddFilesFromFileSystem, 'laz_add', @AddBitBtnClick);
|
AddBitBtn := CreateToolButton('AddBitBtn', lisAddSub, lisClickToSeeTheChoices, 'laz_add', nil);
|
||||||
AddMoreBitBtn := CreateToolButton('AddMoreBitBtn', lisDlgAdd, lisPckEditAddOtherItems, 'laz_addmore', @AddMoreBitBtnClick);
|
|
||||||
RemoveBitBtn := CreateToolButton('RemoveBitBtn', lisRemove, lisPckEditRemoveSelectedItem, 'laz_delete', @RemoveBitBtnClick);
|
RemoveBitBtn := CreateToolButton('RemoveBitBtn', lisRemove, lisPckEditRemoveSelectedItem, 'laz_delete', @RemoveBitBtnClick);
|
||||||
CreateDivider;
|
CreateDivider;
|
||||||
OptionsBitBtn := CreateToolButton('OptionsBitBtn', lisOptions, lisPckEditEditGeneralOptions, 'menu_environment_options', @OptionsBitBtnClick);
|
OptionsBitBtn := CreateToolButton('OptionsBitBtn', lisOptions, lisPckEditEditGeneralOptions, 'menu_environment_options', @OptionsBitBtnClick);
|
||||||
HelpBitBtn := CreateToolButton('HelpBitBtn', GetButtonCaption(idButtonHelp), lisPkgEdMoreFunctionsForThePackage, 'menu_help', @HelpBitBtnClick);
|
HelpBitBtn := CreateToolButton('HelpBitBtn', GetButtonCaption(idButtonHelp), lisPkgEdMoreFunctionsForThePackage, 'menu_help', @HelpBitBtnClick);
|
||||||
|
|
||||||
|
AddBitBtn.DropdownMenu:=AddPopupMenu;
|
||||||
|
mnuAddDiskFile.Caption:=lisPckEditAddFilesFromFileSystem;
|
||||||
|
mnuAddDiskFiles.Caption:=lisAddFilesInDirectory;
|
||||||
|
mnuAddEditorFiles.Caption:=lisProjAddEditorFile;
|
||||||
|
mnuAddReq.Caption:=lisProjAddNewRequirement;
|
||||||
|
|
||||||
OpenButton.LoadGlyphFromResourceName(HInstance, 'laz_open');
|
OpenButton.LoadGlyphFromResourceName(HInstance, 'laz_open');
|
||||||
OpenButton.Caption:='';
|
OpenButton.Caption:='';
|
||||||
OpenButton.Hint:=lisOpenFile2;
|
OpenButton.Hint:=lisOpenFile2;
|
||||||
|
Loading…
Reference in New Issue
Block a user