mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 23:08:05 +02:00
IDE: Remove the old Examples GUI window.
This commit is contained in:
parent
a6ce4d91e2
commit
6bb76a588b
@ -610,9 +610,13 @@ begin
|
||||
if Node1 <> nil then begin
|
||||
Node := Node1.FindNode('LazarusDirectory');
|
||||
if Node <> nil then
|
||||
Result := AppendPathDelim(Node.Attributes.GetNamedItem('Value').NodeValue);
|
||||
Result := AppendPathDelim(Resolvedots(Node.Attributes.GetNamedItem('Value').NodeValue));
|
||||
// Apparently sometimes Lazarus puts a relative path in envopts.xml - danger here is
|
||||
// that if Lazarus now has a working dir different from when the path was written, it
|
||||
// will be wrong anyway. Further research is indicated.
|
||||
end;
|
||||
Doc.free;
|
||||
debugln('TExampleData.GetLazDir = ' + Result);
|
||||
end;
|
||||
|
||||
function TExampleData.GetLocalTime: ANSIstring;
|
||||
|
@ -190,11 +190,6 @@ begin
|
||||
try
|
||||
for St in STL do begin
|
||||
FFName := appendPathDelim(DestDir) + RightSide();
|
||||
|
||||
debugln('TFormLazExam.CopyFiles Forcing an ExamplesHome of ' + extractFileDir(FFname));
|
||||
debugln('TFormLazExam.CopyFiles Copying a file to ' + FFname);
|
||||
debugln('TFormLazExam.CopyFiles DestDir = ' + DestDir);
|
||||
debugln('TFormLazExam.CopyFiles ExamplesHome = ' + ExamplesHome);
|
||||
if not ForceDirectoriesUTF8(extractFileDir(FFName)) then begin
|
||||
debugln('TFormLazExam.CopyFiles - Failed to force ' + extractFileDir(FFName));
|
||||
exit;
|
||||
|
@ -349,7 +349,7 @@ const
|
||||
|
||||
ecExtToolSettings = ecFirstLazarus + 824;
|
||||
ecManageDesktops = ecFirstLazarus + 825;
|
||||
ecManageExamples = ecFirstLazarus + 826;
|
||||
// ecManageExamples = ecFirstLazarus + 826;
|
||||
ecConfigBuildLazarus = ecFirstLazarus + 830;
|
||||
ecBuildLazarus = ecFirstLazarus + 831;
|
||||
ecBuildAdvancedLazarus = ecFirstLazarus + 832;
|
||||
@ -1944,7 +1944,7 @@ begin
|
||||
end;
|
||||
|
||||
const
|
||||
IDEEditorCommandStrs: array[0..323] of TIdentMapEntry = (
|
||||
IDEEditorCommandStrs: array[0..322] of TIdentMapEntry = ( // DRB reduced elements from 323
|
||||
// search
|
||||
(Value: ecFind; Name: 'ecFind'),
|
||||
(Value: ecFindAgain; Name: 'ecFindAgain'),
|
||||
@ -2229,7 +2229,6 @@ const
|
||||
(Value: ecCodeToolsDefinesEd; Name: 'ecCodeToolsDefinesEd'),
|
||||
|
||||
(Value: ecExtToolSettings; Name: 'ecExtToolSettings'),
|
||||
(Value: ecManageExamples; Name: 'ecManageExamples'),
|
||||
(Value: ecConfigBuildLazarus; Name: 'ecConfigBuildLazarus'),
|
||||
(Value: ecBuildLazarus; Name: 'ecBuildLazarus'),
|
||||
(Value: ecBuildAdvancedLazarus; Name: 'ecBuildAdvancedLazarus'),
|
||||
|
@ -1,316 +0,0 @@
|
||||
object ExampleManagerForm: TExampleManagerForm
|
||||
Left = 356
|
||||
Height = 495
|
||||
Top = 130
|
||||
Width = 870
|
||||
ActiveControl = ProjectFilter
|
||||
Caption = 'ExampleManagerForm'
|
||||
ClientHeight = 495
|
||||
ClientWidth = 870
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '2.1.0.0'
|
||||
object ProjectsGroupBox: TGroupBox
|
||||
Left = 0
|
||||
Height = 331
|
||||
Top = 123
|
||||
Width = 457
|
||||
Align = alClient
|
||||
BorderSpacing.Top = 3
|
||||
Caption = 'Projects'
|
||||
ClientHeight = 312
|
||||
ClientWidth = 453
|
||||
TabOrder = 1
|
||||
object ProjectsListBox: TListBox
|
||||
AnchorSideLeft.Control = ProjectsGroupBox
|
||||
AnchorSideTop.Control = ProjectFilter
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ProjectsGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = ProjectsGroupBox
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 272
|
||||
Top = 34
|
||||
Width = 441
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Around = 6
|
||||
ItemHeight = 0
|
||||
MultiSelect = True
|
||||
OnSelectionChange = ProjectsListBoxSelectionChange
|
||||
ScrollWidth = 439
|
||||
TabOrder = 2
|
||||
TopIndex = -1
|
||||
end
|
||||
object ProjectFilter: TListFilterEdit
|
||||
AnchorSideLeft.Control = ProjectsListBox
|
||||
Left = 6
|
||||
Height = 27
|
||||
Top = 1
|
||||
Width = 221
|
||||
OnAfterFilter = ProjectFilterAfterFilter
|
||||
ButtonWidth = 23
|
||||
NumGlyphs = 1
|
||||
MaxLength = 0
|
||||
TabOrder = 0
|
||||
FilteredListbox = ProjectsListBox
|
||||
end
|
||||
object cbRelativePath: TCheckBox
|
||||
AnchorSideLeft.Control = ProjectFilter
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = ProjectFilter
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 252
|
||||
Height = 24
|
||||
Top = 2
|
||||
Width = 121
|
||||
BorderSpacing.Left = 25
|
||||
Caption = 'Relative paths'
|
||||
OnClick = cbRelativePathClick
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object ButtonPanel1: TButtonPanel
|
||||
Left = 6
|
||||
Height = 29
|
||||
Top = 460
|
||||
Width = 858
|
||||
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 = 4
|
||||
ShowButtons = [pbClose, pbHelp]
|
||||
ShowBevel = False
|
||||
end
|
||||
object ActionGroupBox: TGroupBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
Left = 465
|
||||
Height = 331
|
||||
Top = 123
|
||||
Width = 405
|
||||
Align = alRight
|
||||
Anchors = []
|
||||
BorderSpacing.Left = 3
|
||||
BorderSpacing.Top = 3
|
||||
Caption = 'Action'
|
||||
ClientHeight = 312
|
||||
ClientWidth = 401
|
||||
TabOrder = 2
|
||||
object OpenSelectedButton: TBitBtn
|
||||
AnchorSideLeft.Control = ActionGroupBox
|
||||
AnchorSideTop.Control = ActionGroupBox
|
||||
AnchorSideRight.Control = lblCenter
|
||||
Left = 6
|
||||
Height = 29
|
||||
Top = 6
|
||||
Width = 188
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Open First Selected'
|
||||
Enabled = False
|
||||
OnClick = OpenSelectedButtonClick
|
||||
TabOrder = 0
|
||||
end
|
||||
object BuildAllSelectedButton: TBitBtn
|
||||
AnchorSideLeft.Control = ActionGroupBox
|
||||
AnchorSideTop.Control = OpenSelectedButton
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = lblCenter
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 29
|
||||
Top = 47
|
||||
Width = 189
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Build All Selected'
|
||||
Enabled = False
|
||||
OnClick = BuildAllSelectedButtonClick
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
end
|
||||
object SelectAllButton: TBitBtn
|
||||
AnchorSideLeft.Control = lblCenter
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = ActionGroupBox
|
||||
AnchorSideRight.Control = ActionGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 207
|
||||
Height = 29
|
||||
Top = 6
|
||||
Width = 188
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Select All'
|
||||
OnClick = SelectAllButtonClick
|
||||
TabOrder = 1
|
||||
end
|
||||
object SelectNoneButton: TBitBtn
|
||||
AnchorSideLeft.Control = lblCenter
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = SelectAllButton
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ActionGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 207
|
||||
Height = 29
|
||||
Top = 47
|
||||
Width = 188
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Select None'
|
||||
Enabled = False
|
||||
OnClick = SelectNoneButtonClick
|
||||
TabOrder = 3
|
||||
end
|
||||
object DescriptionMemo: TMemo
|
||||
AnchorSideLeft.Control = ActionGroupBox
|
||||
AnchorSideTop.Control = SelectNoneButton
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ActionGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = ActionGroupBox
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 224
|
||||
Top = 82
|
||||
Width = 389
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Around = 6
|
||||
ReadOnly = True
|
||||
ScrollBars = ssAutoBoth
|
||||
TabOrder = 4
|
||||
end
|
||||
object lblCenter: TLabel
|
||||
AnchorSideLeft.Control = ActionGroupBox
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
AnchorSideTop.Control = ActionGroupBox
|
||||
Left = 200
|
||||
Height = 1
|
||||
Top = 0
|
||||
Width = 1
|
||||
ParentColor = False
|
||||
end
|
||||
end
|
||||
object SelectPanel: TPanel
|
||||
Left = 0
|
||||
Height = 120
|
||||
Top = 0
|
||||
Width = 870
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 120
|
||||
ClientWidth = 870
|
||||
TabOrder = 0
|
||||
object cbIncludeAllDirs: TCheckBox
|
||||
AnchorSideTop.Control = edRootDirectory
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = edRootDirectory
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 270
|
||||
Height = 24
|
||||
Top = 54
|
||||
Width = 194
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Top = 3
|
||||
Caption = 'Include all subdirectories'
|
||||
OnClick = cbIncludeAllDirsClick
|
||||
TabOrder = 1
|
||||
end
|
||||
object edRootDirectory: TDirectoryEdit
|
||||
AnchorSideLeft.Control = lbRootDirectory
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 27
|
||||
Top = 24
|
||||
Width = 456
|
||||
ShowHidden = False
|
||||
ButtonWidth = 23
|
||||
NumGlyphs = 1
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 7
|
||||
MaxLength = 0
|
||||
TabOrder = 0
|
||||
OnChange = edRootDirectoryChange
|
||||
end
|
||||
object cgIncludedDirs: TCheckGroup
|
||||
AnchorSideBottom.Control = SelectPanel
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 496
|
||||
Height = 115
|
||||
Top = 5
|
||||
Width = 369
|
||||
Anchors = [akTop, akRight, akBottom]
|
||||
AutoFill = True
|
||||
Caption = 'Include subdirectories'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.TopBottomSpacing = 6
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 4
|
||||
ClientHeight = 96
|
||||
ClientWidth = 365
|
||||
Columns = 4
|
||||
Items.Strings = (
|
||||
'example'
|
||||
'sample'
|
||||
'demo'
|
||||
'test'
|
||||
'examples'
|
||||
'samples'
|
||||
'demos'
|
||||
'tests'
|
||||
)
|
||||
OnItemClick = cgIncludedDirsItemClick
|
||||
TabOrder = 2
|
||||
Data = {
|
||||
080000000202020202020202
|
||||
}
|
||||
end
|
||||
object lbRootDirectory: TLabel
|
||||
Left = 8
|
||||
Height = 17
|
||||
Top = 8
|
||||
Width = 99
|
||||
Caption = 'Root Directory'
|
||||
ParentColor = False
|
||||
end
|
||||
object lbProjectCount: TLabel
|
||||
AnchorSideLeft.Control = edRootDirectory
|
||||
AnchorSideBottom.Control = SelectPanel
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 17
|
||||
Top = 92
|
||||
Width = 102
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Bottom = 11
|
||||
Caption = 'lbProjectCount'
|
||||
ParentColor = False
|
||||
end
|
||||
end
|
||||
object Splitter1: TSplitter
|
||||
Left = 457
|
||||
Height = 334
|
||||
Top = 120
|
||||
Width = 5
|
||||
Align = alRight
|
||||
ResizeAnchor = akRight
|
||||
end
|
||||
end
|
@ -1,383 +0,0 @@
|
||||
unit ExampleManager;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils,
|
||||
// LCL
|
||||
Forms, Controls, Dialogs, StdCtrls, ExtCtrls, ButtonPanel, Buttons, EditBtn,
|
||||
// LazControls
|
||||
ListFilterEdit,
|
||||
// LazUtils
|
||||
FileUtil, LazFileUtils,
|
||||
// IdeIntf
|
||||
IDEWindowIntf, LazIDEIntf, IDEImagesIntf, MainIntf,
|
||||
// IDE
|
||||
EnvironmentOpts, LazarusIDEStrConsts;
|
||||
|
||||
type
|
||||
|
||||
{ TExampleManagerForm }
|
||||
|
||||
TExampleManagerForm = class(TForm)
|
||||
BuildAllSelectedButton: TBitBtn;
|
||||
cgIncludedDirs: TCheckGroup;
|
||||
lblCenter: TLabel;
|
||||
lbProjectCount: TLabel;
|
||||
lbRootDirectory: TLabel;
|
||||
SelectPanel: TPanel;
|
||||
cbRelativePath: TCheckBox;
|
||||
DescriptionMemo: TMemo;
|
||||
Splitter1: TSplitter;
|
||||
cbIncludeAllDirs: TCheckBox;
|
||||
ProjectFilter: TListFilterEdit;
|
||||
OpenSelectedButton: TBitBtn;
|
||||
ProjectsListBox: TListBox;
|
||||
SelectAllButton: TBitBtn;
|
||||
ButtonPanel1: TButtonPanel;
|
||||
edRootDirectory: TDirectoryEdit;
|
||||
ActionGroupBox: TGroupBox;
|
||||
SelectNoneButton: TBitBtn;
|
||||
ProjectsGroupBox: TGroupBox;
|
||||
procedure cbIncludeAllDirsClick(Sender: TObject);
|
||||
procedure cgIncludedDirsItemClick(Sender: TObject; {%H-}Index: integer);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var {%H-}CloseAction: TCloseAction);
|
||||
procedure BuildAllSelectedButtonClick(Sender: TObject);
|
||||
procedure OpenSelectedButtonClick(Sender: TObject);
|
||||
procedure ProjectFilterAfterFilter(Sender: TObject);
|
||||
procedure ProjectsListBoxSelectionChange(Sender: TObject; {%H-}User: boolean);
|
||||
procedure cbRelativePathClick(Sender: TObject);
|
||||
procedure edRootDirectoryChange(Sender: TObject);
|
||||
procedure SelectAllButtonClick(Sender: TObject);
|
||||
procedure SelectNoneButtonClick(Sender: TObject);
|
||||
private
|
||||
fSelectedFilename: string;
|
||||
fFirstSelectedIndex: Integer;
|
||||
fChangingSelections: Boolean;
|
||||
fIdleConnected: boolean;
|
||||
procedure FillProjectsPending;
|
||||
procedure SetIdleConnected(const AValue: boolean);
|
||||
procedure OnIdle(Sender: TObject; var {%H-}Done: Boolean);
|
||||
public
|
||||
constructor Create(AnOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
property IdleConnected: boolean read fIdleConnected write SetIdleConnected;
|
||||
end;
|
||||
|
||||
function ShowExampleManagerDlg: TModalResult;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
const
|
||||
DirectoryChoices: array[0..7] of string = (
|
||||
'example', // 1st row
|
||||
'sample',
|
||||
'demo',
|
||||
'test',
|
||||
'examples', // 2nd row
|
||||
'samples',
|
||||
'demos',
|
||||
'tests'
|
||||
);
|
||||
|
||||
function ShowExampleManagerDlg: TModalResult;
|
||||
var
|
||||
theForm: TExampleManagerForm;
|
||||
begin
|
||||
Result:=mrCancel;
|
||||
theForm:=TExampleManagerForm.Create(Nil);
|
||||
try
|
||||
Result:=theForm.ShowModal;
|
||||
if Result=mrYes then
|
||||
MainIDEInterface.DoOpenProjectFile(theForm.fSelectedFilename,
|
||||
[ofOnlyIfExists,ofAddToRecent,ofUseCache]);
|
||||
|
||||
finally
|
||||
theForm.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
type
|
||||
|
||||
{ TListFileSearcher }
|
||||
|
||||
TListFileSearcher = class(TFileSearcher)
|
||||
private
|
||||
fForm: TExampleManagerForm;
|
||||
protected
|
||||
procedure DoFileFound; override;
|
||||
public
|
||||
constructor Create(aForm: TExampleManagerForm);
|
||||
end;
|
||||
|
||||
{ TListFileSearcher }
|
||||
|
||||
procedure TListFileSearcher.DoFileFound;
|
||||
var
|
||||
s: String;
|
||||
begin
|
||||
s:=FileName;
|
||||
if fForm.cbRelativePath.Checked then
|
||||
s:=CreateRelativePath(s, fForm.edRootDirectory.Text);
|
||||
fForm.ProjectFilter.Items.Add(s);
|
||||
end;
|
||||
|
||||
constructor TListFileSearcher.Create(aForm: TExampleManagerForm);
|
||||
begin
|
||||
inherited Create;
|
||||
fForm:=aForm;
|
||||
end;
|
||||
|
||||
{ TExampleManagerForm }
|
||||
|
||||
constructor TExampleManagerForm.Create(AnOwner: TComponent);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
inherited Create(AnOwner);
|
||||
fFirstSelectedIndex:=-1;
|
||||
fChangingSelections:=False;
|
||||
|
||||
Caption:=lisKMExampleProjects;
|
||||
lbRootDirectory.Caption:=lisRootDirectory;
|
||||
cbIncludeAllDirs.Caption:=lisIncludeAllSubDirectories;
|
||||
cgIncludedDirs.Caption:=lisIncludeSubDirectories;
|
||||
|
||||
// Add potential included directories to CheckGroup
|
||||
cgIncludedDirs.Items.Clear;
|
||||
for i := Low(DirectoryChoices) to High(DirectoryChoices) do
|
||||
begin
|
||||
cgIncludedDirs.Items.Add(DirectoryChoices[i]);
|
||||
cgIncludedDirs.Checked[i]:=True;
|
||||
end;
|
||||
cbIncludeAllDirsClick(cbIncludeAllDirs);
|
||||
lbProjectCount.Caption:='';
|
||||
|
||||
// Projects and their Actions
|
||||
ProjectsGroupBox.Caption:=lisMEProjects;
|
||||
ActionGroupBox.Caption:=lisMEAction;
|
||||
|
||||
cbRelativePath.Caption:=lisRelativePaths;
|
||||
OpenSelectedButton.Caption:=lisExamplesOpenFirstSelected;
|
||||
BuildAllSelectedButton.Caption:=lisExamplesBuildAllSelected;
|
||||
SelectAllButton.Caption:=lisMenuSelectAll;
|
||||
SelectNoneButton.Caption:=lisSAMSelectNone;
|
||||
|
||||
IDEImages.AssignImage(OpenSelectedButton, 'laz_open');
|
||||
IDEImages.AssignImage(BuildAllSelectedButton, 'menu_build_all');
|
||||
IDEImages.AssignImage(SelectAllButton, 'menu_select_all');
|
||||
IDEImages.AssignImage(SelectNoneButton, 'ce_default');
|
||||
|
||||
edRootDirectory.Text:=EnvironmentOptions.GetParsedLazarusDirectory;
|
||||
FillProjectsPending;
|
||||
end;
|
||||
|
||||
destructor TExampleManagerForm.Destroy;
|
||||
begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TExampleManagerForm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
IDEDialogLayoutList.ApplyLayout(Self);
|
||||
end;
|
||||
|
||||
procedure TExampleManagerForm.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
begin
|
||||
IDEDialogLayoutList.SaveLayout(Self);
|
||||
end;
|
||||
|
||||
procedure TExampleManagerForm.FillProjectsPending;
|
||||
begin
|
||||
IdleConnected:=True;
|
||||
end;
|
||||
|
||||
procedure TExampleManagerForm.SetIdleConnected(const AValue: boolean);
|
||||
begin
|
||||
if fIdleConnected=AValue then exit;
|
||||
fIdleConnected:=AValue;
|
||||
if fIdleConnected then
|
||||
Application.AddOnIdleHandler(@OnIdle)
|
||||
else
|
||||
Application.RemoveOnIdleHandler(@OnIdle);
|
||||
end;
|
||||
|
||||
procedure TExampleManagerForm.OnIdle(Sender: TObject; var Done: Boolean);
|
||||
var
|
||||
Searcher: TListFileSearcher;
|
||||
AllDirs, IncludedDirs: TStringList;
|
||||
i, j: Integer;
|
||||
LastDir: String;
|
||||
begin
|
||||
Screen.BeginWaitCursor;
|
||||
Searcher:=TListFileSearcher.Create(Self);
|
||||
IncludedDirs:=TStringList.Create;
|
||||
AllDirs:=Nil;
|
||||
try
|
||||
if edRootDirectory.Text<>'' then
|
||||
begin
|
||||
if cbIncludeAllDirs.Checked then
|
||||
// Add only the root directory name to list. Will find all projects in one go.
|
||||
IncludedDirs.Add(edRootDirectory.Text)
|
||||
else begin
|
||||
// Collect each matching directory name to a list.
|
||||
AllDirs:=FindAllDirectories(edRootDirectory.Text);
|
||||
for i:=0 to AllDirs.Count-1 do
|
||||
begin
|
||||
LastDir:=ExtractFileName(AllDirs[i]);
|
||||
for j:=Low(DirectoryChoices) to High(DirectoryChoices) do
|
||||
begin
|
||||
if cgIncludedDirs.Checked[j] and (LastDir=DirectoryChoices[j]) then
|
||||
begin
|
||||
IncludedDirs.Add(AllDirs[i]);
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
ProjectFilter.Items.Clear;
|
||||
// Find projects in all included directories.
|
||||
for i:=0 to IncludedDirs.Count-1 do
|
||||
Searcher.Search(IncludedDirs[i], '*.lpi');
|
||||
ProjectFilter.InvalidateFilter;
|
||||
DescriptionMemo.Clear;
|
||||
IdleConnected:=false;
|
||||
finally
|
||||
AllDirs.Free;
|
||||
IncludedDirs.Free;
|
||||
Searcher.Free;
|
||||
Screen.EndWaitCursor;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TExampleManagerForm.edRootDirectoryChange(Sender: TObject);
|
||||
begin
|
||||
FillProjectsPending;
|
||||
end;
|
||||
|
||||
procedure TExampleManagerForm.cbIncludeAllDirsClick(Sender: TObject);
|
||||
begin
|
||||
cgIncludedDirs.Enabled:=not (Sender as TCheckBox).Checked;
|
||||
FillProjectsPending;
|
||||
end;
|
||||
|
||||
procedure TExampleManagerForm.cgIncludedDirsItemClick(Sender: TObject; Index: integer);
|
||||
begin
|
||||
FillProjectsPending;
|
||||
end;
|
||||
|
||||
procedure TExampleManagerForm.OpenSelectedButtonClick(Sender: TObject);
|
||||
var
|
||||
s: String;
|
||||
begin
|
||||
if fFirstSelectedIndex <> -1 then
|
||||
begin
|
||||
s:=ProjectsListBox.Items[fFirstSelectedIndex];
|
||||
if cbRelativePath.Checked then
|
||||
s:=CreateAbsolutePath(s, edRootDirectory.Text);
|
||||
if FileExistsUTF8(s) then
|
||||
begin
|
||||
fSelectedFilename:=s;
|
||||
ModalResult:=mrYes; // mrYes means the selected file will be opened.
|
||||
end
|
||||
else
|
||||
ShowMessage(Format(lisFileNotFound2, [s]));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TExampleManagerForm.ProjectFilterAfterFilter(Sender: TObject);
|
||||
begin
|
||||
lbProjectCount.Caption:=Format(lisProjectCount, [ProjectsListBox.Count]);
|
||||
end;
|
||||
|
||||
procedure TExampleManagerForm.BuildAllSelectedButtonClick(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
for i:=0 to ProjectsListBox.Items.Count-1 do
|
||||
begin
|
||||
if ProjectsListBox.Selected[i] then begin
|
||||
; // ToDo
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TExampleManagerForm.SelectAllButtonClick(Sender: TObject);
|
||||
begin
|
||||
fChangingSelections:=True;
|
||||
ProjectsListBox.SelectAll;
|
||||
fChangingSelections:=False;
|
||||
ProjectsListBoxSelectionChange(ProjectsListBox, False); // In the end update buttons
|
||||
end;
|
||||
|
||||
procedure TExampleManagerForm.SelectNoneButtonClick(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
fChangingSelections:=True;
|
||||
for i:=0 to ProjectsListBox.Items.Count-1 do
|
||||
ProjectsListBox.Selected[i]:=False;
|
||||
fChangingSelections:=False;
|
||||
ProjectsListBoxSelectionChange(ProjectsListBox, False);
|
||||
end;
|
||||
|
||||
procedure TExampleManagerForm.cbRelativePathClick(Sender: TObject);
|
||||
var
|
||||
IsRelative: Boolean;
|
||||
i: Integer;
|
||||
s: String;
|
||||
begin
|
||||
IsRelative:=(Sender as TCheckBox).Checked;
|
||||
for i:=0 to ProjectFilter.Items.Count-1 do
|
||||
begin
|
||||
s:=ProjectFilter.Items[i];
|
||||
if IsRelative then
|
||||
s:=CreateRelativePath(s, edRootDirectory.Text)
|
||||
else
|
||||
s:=CreateAbsolutePath(s, edRootDirectory.Text);
|
||||
ProjectFilter.Items[i]:=s;
|
||||
end;
|
||||
ProjectFilter.InvalidateFilter;
|
||||
end;
|
||||
|
||||
// Project list selection changes. Adjust buttons.
|
||||
procedure TExampleManagerForm.ProjectsListBoxSelectionChange(Sender: TObject; User: boolean);
|
||||
var
|
||||
HasSelected: Boolean;
|
||||
ReadMe, RealReadMe: String;
|
||||
i: Integer;
|
||||
begin
|
||||
if not fChangingSelections then
|
||||
begin
|
||||
HasSelected := ProjectsListBox.SelCount > 0;
|
||||
OpenSelectedButton.Enabled := HasSelected;
|
||||
// BuildAllSelectedButton.Enabled := HasSelected;
|
||||
SelectNoneButton.Enabled := HasSelected;
|
||||
// Find the first selected item and show README.txt contents.
|
||||
if HasSelected then
|
||||
for i:=0 to ProjectsListBox.Items.Count-1 do
|
||||
if ProjectsListBox.Selected[i] then
|
||||
begin
|
||||
fFirstSelectedIndex:=i;
|
||||
ReadMe:=ExtractFilePath(ProjectsListBox.Items[i])+'README.txt';
|
||||
RealReadMe:=FindDiskFileCaseInsensitive(ReadMe);
|
||||
if RealReadMe <> '' then
|
||||
DescriptionMemo.Lines.LoadFromFile(RealReadMe)
|
||||
else
|
||||
DescriptionMemo.Clear;
|
||||
Break;
|
||||
end
|
||||
else
|
||||
fFirstSelectedIndex:=-1;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -740,7 +740,6 @@ begin
|
||||
ecManageDesktops : Result:= lisDesktops;
|
||||
|
||||
ecExtToolSettings : Result:= srkmecExtToolSettings;
|
||||
ecManageExamples : Result:= lisMenuExampleProjects;
|
||||
ecConfigBuildLazarus : Result:= lismenuconfigurebuildlazarus;
|
||||
ecBuildLazarus : Result:= srkmecBuildLazarus;
|
||||
ecExtToolFirst
|
||||
@ -1400,7 +1399,6 @@ begin
|
||||
ecCodeToolsDefinesEd: SetSingle(VK_UNKNOWN,[]);
|
||||
|
||||
ecExtToolSettings: SetSingle(VK_UNKNOWN,[]);
|
||||
ecManageExamples: SetSingle(VK_UNKNOWN,[]);
|
||||
ecBuildLazarus: SetSingle(VK_UNKNOWN,[]);
|
||||
ecConfigBuildLazarus: SetSingle(VK_UNKNOWN,[]);
|
||||
ecMakeResourceString: SetSingle(VK_UNKNOWN,[]);
|
||||
@ -1845,7 +1843,6 @@ begin
|
||||
ecCodeToolsDefinesEd: SetSingle(VK_UNKNOWN,[]);
|
||||
|
||||
ecExtToolSettings: SetSingle(VK_UNKNOWN,[]);
|
||||
ecManageExamples: SetSingle(VK_UNKNOWN,[]);
|
||||
ecBuildLazarus: SetSingle(VK_UNKNOWN,[]);
|
||||
ecConfigBuildLazarus: SetSingle(VK_UNKNOWN,[]);
|
||||
ecMakeResourceString: SetSingle(VK_UNKNOWN,[]);
|
||||
@ -2477,7 +2474,6 @@ begin
|
||||
ecCodeToolsDefinesEd: SetSingle(VK_UNKNOWN,[]);
|
||||
|
||||
ecExtToolSettings: SetSingle(VK_UNKNOWN,[]);
|
||||
ecManageExamples: SetSingle(VK_UNKNOWN,[]);
|
||||
ecBuildLazarus: SetSingle(VK_UNKNOWN,[]);
|
||||
ecConfigBuildLazarus: SetSingle(VK_UNKNOWN,[]);
|
||||
ecMakeResourceString: SetSingle(VK_UNKNOWN,[]);
|
||||
@ -3210,7 +3206,6 @@ begin
|
||||
AddDefault(C, 'Manage desktops', dlgManageDesktops, ecManageDesktops);
|
||||
|
||||
AddDefault(C, 'External Tools settings', lisKMExternalToolsSettings, ecExtToolSettings);
|
||||
AddDefault(C, 'Example Projects', lisKMExampleProjects, ecManageExamples);
|
||||
AddDefault(C, 'Build Lazarus', lisMenuBuildLazarus, ecBuildLazarus);
|
||||
AddDefault(C, 'Configure "Build Lazarus"', lisConfigureBuildLazarus, ecConfigBuildLazarus);
|
||||
AddDefault(C, 'Diff editor files', lisKMDiffEditorFiles, ecDiff);
|
||||
|
@ -1124,7 +1124,10 @@
|
||||
<Unit>
|
||||
<Filename Value="projectwizarddlg.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="ProjectWizardDialog"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="ProjectWizardDlg"/>
|
||||
</Unit>
|
||||
<Unit>
|
||||
<Filename Value="projectdefs.pas"/>
|
||||
@ -1324,6 +1327,7 @@
|
||||
<Unit>
|
||||
<Filename Value="keymapping.pp"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="KeyMapping"/>
|
||||
</Unit>
|
||||
<Unit>
|
||||
<Filename Value="redirect_stderr.pas"/>
|
||||
@ -1370,11 +1374,6 @@
|
||||
<Filename Value="idedefs.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit>
|
||||
<Unit>
|
||||
<Filename Value="examplemanager.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<HasResources Value="True"/>
|
||||
</Unit>
|
||||
<Unit>
|
||||
<Filename Value="formeditor.pp"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
|
@ -592,8 +592,6 @@ resourcestring
|
||||
lisMenuConvertDelphiPackage = 'Convert Delphi Package to Lazarus Package ...';
|
||||
lisMenuConvertEncoding = 'Convert Encoding of Projects/Packages ...';
|
||||
lisConvertEncodingOfProjectsPackages = 'Convert encoding of projects/packages';
|
||||
lisMenuExampleProjects = 'Example Projects ...';
|
||||
lisKMExampleProjects = 'Example Projects';
|
||||
lisMenuBuildLazarus = 'Build Lazarus with Current Profile';
|
||||
lisMenuBuildLazarusProf = 'Build Lazarus with Profile: %s';
|
||||
lisMenuConfigureBuildLazarus = 'Configure "Build Lazarus" ...';
|
||||
|
26
ide/main.pp
26
ide/main.pp
@ -146,7 +146,7 @@ uses
|
||||
CodeTemplatesDlg, CodeBrowser, FindUnitDlg, InspectChksumChangedDlg,
|
||||
IdeOptionsDlg, EditDefineTree, EnvironmentOpts, TransferMacros,
|
||||
KeyMapping, IDETranslations, IDEProcs, ExtToolDialog, ExtToolEditDlg,
|
||||
JumpHistoryView, DesktopManager, ExampleManager, DiskDiffsDialog,
|
||||
JumpHistoryView, DesktopManager, DiskDiffsDialog,
|
||||
BuildLazDialog, BuildProfileManager, BuildManager, CheckCompOptsForNewUnitDlg,
|
||||
MiscOptions, InputHistory, InputhistoryWithSearchOpt, UnitDependencies,
|
||||
IDEFPCInfo, IDEInfoDlg, IDEInfoNeedBuild, ProcessList, InitialSetupDlgs,
|
||||
@ -361,7 +361,6 @@ type
|
||||
procedure mnuToolConvertDelphiPackageClicked(Sender: TObject);
|
||||
procedure mnuToolConvertEncodingClicked(Sender: TObject);
|
||||
procedure mnuToolManageDesktopsClicked(Sender: TObject);
|
||||
procedure mnuToolManageExamplesClicked(Sender: TObject);
|
||||
procedure mnuToolBuildLazarusClicked(Sender: TObject);
|
||||
procedure mnuToolBuildAdvancedLazarusClicked(Sender: TObject);
|
||||
procedure mnuToolConfigBuildLazClicked(Sender: TObject);
|
||||
@ -972,6 +971,7 @@ var
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
var
|
||||
ParamBaseDirectory: string = '';
|
||||
SkipAutoLoadingLastProject: boolean = false;
|
||||
@ -2790,7 +2790,7 @@ begin
|
||||
|
||||
itmToolConfigure.OnClick := @mnuToolConfigureUserExtToolsClicked;
|
||||
itmToolManageDesktops.OnClick := @mnuToolManageDesktopsClicked;
|
||||
itmToolManageExamples.OnClick := @mnuToolManageExamplesClicked;
|
||||
|
||||
itmToolDiff.OnClick := @mnuToolDiffClicked;
|
||||
|
||||
itmToolCheckLFM.OnClick := @mnuToolCheckLFMClicked;
|
||||
@ -3065,7 +3065,7 @@ begin
|
||||
itmToolConfigure.Command:=GetIdeCmdRegToolBtn(ecExtToolSettings);
|
||||
|
||||
itmToolManageDesktops.Command:=GetCommand(ecManageDesktops, nil, TShowDesktopsToolButton);
|
||||
itmToolManageExamples.Command:=GetIdeCmdRegToolBtn(ecManageExamples);
|
||||
|
||||
itmToolDiff.Command:=GetIdeCmdRegToolBtn(ecDiff);
|
||||
|
||||
itmToolConvertDFMtoLFM.Command:=GetIdeCmdRegToolBtn(ecConvertDFM2LFM);
|
||||
@ -3560,7 +3560,6 @@ begin
|
||||
ecDiff: DoDiff;
|
||||
ecConvertDFM2LFM: DoConvertDFMtoLFM;
|
||||
ecRescanFPCSrcDir: mnuEnvRescanFPCSrcDirClicked(Self);
|
||||
ecManageExamples: mnuToolManageExamplesClicked(Self);
|
||||
ecBuildLazarus: mnuToolBuildLazarusClicked(Self);
|
||||
ecBuildAdvancedLazarus: mnuToolBuildAdvancedLazarusClicked(Self);
|
||||
ecConfigBuildLazarus: mnuToolConfigBuildLazClicked(Self);
|
||||
@ -4810,11 +4809,6 @@ begin
|
||||
ShowDesktopManagerDlg;
|
||||
end;
|
||||
|
||||
procedure TMainIDE.mnuToolManageExamplesClicked(Sender: TObject);
|
||||
begin
|
||||
DoExampleManager();
|
||||
end;
|
||||
|
||||
procedure TMainIDE.mnuToolBuildLazarusClicked(Sender: TObject);
|
||||
begin
|
||||
if ToolStatus<>itNone then exit;
|
||||
@ -6366,7 +6360,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
tpws_examples:
|
||||
mnuToolManageExamplesClicked(Sender);
|
||||
DoExampleManager();
|
||||
tpws_convert:
|
||||
mnuToolConvertDelphiProjectClicked(Sender);
|
||||
tpws_closeIDE:
|
||||
@ -7672,8 +7666,16 @@ begin
|
||||
end;
|
||||
|
||||
function TMainIDE.DoExampleManager: TModalResult;
|
||||
var
|
||||
AKey : word;
|
||||
ExCommand : TIDECommand;
|
||||
begin
|
||||
Result:=ShowExampleManagerDlg;
|
||||
Result := mrOK;
|
||||
EXCommand := IDECommandList.FindCommandByName('Example Projects');
|
||||
if ExCommand = nil then
|
||||
debugln('TMainIDE.DoExampleManager - Maybe Example Manager Package is not installed !')
|
||||
else
|
||||
ExCommand.Execute(self);
|
||||
end;
|
||||
|
||||
function TMainIDE.DoBuildLazarusSub(Flags: TBuildLazarusFlags): TModalResult;
|
||||
|
@ -348,7 +348,6 @@ type
|
||||
itmToolConfigure: TIDEMenuCommand;
|
||||
//itmSecondaryTools: TIDEMenuSection;
|
||||
itmToolManageDesktops: TIDEMenuCommand;
|
||||
itmToolManageExamples: TIDEMenuCommand;
|
||||
itmToolDiff: TIDEMenuCommand;
|
||||
//itmDelphiConversion: TIDEMenuSection;
|
||||
itmToolCheckLFM: TIDEMenuCommand;
|
||||
|
@ -1366,7 +1366,6 @@ begin
|
||||
CreateMenuSeparatorSection(mnuTools,itmSecondaryTools,'itmSecondaryTools');
|
||||
ParentMI:=itmSecondaryTools;
|
||||
CreateMenuItem(ParentMI,itmToolManageDesktops,'itmToolManageDesktops', lisDesktops, 'menu_manage_desktops');
|
||||
CreateMenuItem(ParentMI,itmToolManageExamples,'itmToolManageExamples',lisMenuExampleProjects, 'camera');
|
||||
CreateMenuItem(ParentMI,itmToolDiff,'itmToolDiff',lisMenuCompareFiles, 'menu_tool_diff');
|
||||
|
||||
CreateMenuSeparatorSection(mnuTools,itmConversion,'itmConversion');
|
||||
|
@ -9,12 +9,12 @@ object ProjectWizardDialog: TProjectWizardDialog
|
||||
ClientHeight = 294
|
||||
ClientWidth = 382
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.1'
|
||||
LCLVersion = '2.3.0.0'
|
||||
object btnNewProject: TBitBtn
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 7
|
||||
Height = 25
|
||||
Height = 31
|
||||
Top = 11
|
||||
Width = 368
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -22,7 +22,6 @@ object ProjectWizardDialog: TProjectWizardDialog
|
||||
BorderSpacing.Around = 11
|
||||
Caption = 'New Project'
|
||||
ModalResult = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = btnNewProjectClick
|
||||
TabOrder = 0
|
||||
end
|
||||
@ -31,7 +30,7 @@ object ProjectWizardDialog: TProjectWizardDialog
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 7
|
||||
Height = 25
|
||||
Height = 31
|
||||
Top = 126
|
||||
Width = 368
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -39,7 +38,6 @@ object ProjectWizardDialog: TProjectWizardDialog
|
||||
BorderSpacing.Around = 11
|
||||
Caption = 'Open Project'
|
||||
ModalResult = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = btnOpenProjectClick
|
||||
TabOrder = 2
|
||||
end
|
||||
@ -48,15 +46,14 @@ object ProjectWizardDialog: TProjectWizardDialog
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 7
|
||||
Height = 25
|
||||
Top = 198
|
||||
Height = 31
|
||||
Top = 210
|
||||
Width = 368
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 11
|
||||
Caption = 'Convert Delphi Project'
|
||||
ModalResult = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = btnConvertProjectClick
|
||||
TabOrder = 4
|
||||
end
|
||||
@ -65,15 +62,14 @@ object ProjectWizardDialog: TProjectWizardDialog
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 7
|
||||
Height = 25
|
||||
Top = 258
|
||||
Height = 31
|
||||
Top = 252
|
||||
Width = 368
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 11
|
||||
Caption = 'Close Lazarus'
|
||||
ModalResult = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = btnCloseIDEClick
|
||||
TabOrder = 5
|
||||
end
|
||||
@ -87,7 +83,7 @@ object ProjectWizardDialog: TProjectWizardDialog
|
||||
BorderSpacing.Top = 25
|
||||
BorderSpacing.Around = 17
|
||||
Caption = 'Open Recent Project'
|
||||
ClientHeight = 38
|
||||
ClientHeight = 33
|
||||
ClientWidth = 364
|
||||
TabOrder = 1
|
||||
object cbRecentProjects: TComboBox
|
||||
@ -97,8 +93,8 @@ object ProjectWizardDialog: TProjectWizardDialog
|
||||
AnchorSideRight.Control = gbRecent
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 1
|
||||
Height = 24
|
||||
Top = 10
|
||||
Height = 29
|
||||
Top = 5
|
||||
Width = 362
|
||||
Anchors = [akLeft, akRight]
|
||||
BorderSpacing.Around = 1
|
||||
@ -112,15 +108,14 @@ object ProjectWizardDialog: TProjectWizardDialog
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 162
|
||||
Height = 31
|
||||
Top = 168
|
||||
Width = 368
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 11
|
||||
Caption = 'View Example Projects'
|
||||
ModalResult = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = btnExamplesClick
|
||||
TabOrder = 3
|
||||
end
|
||||
|
@ -68,10 +68,12 @@ function ShowProjectWizardDlg(out ARecentProject: String): TProjectWizardSelecti
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
uses PackageIntf;
|
||||
|
||||
function ShowProjectWizardDlg(out ARecentProject: String): TProjectWizardSelectionType;
|
||||
var
|
||||
ProjectWizardDialog: TProjectWizardDialog;
|
||||
Pkg: TIDEPackage;
|
||||
begin
|
||||
Result := tpws_closeIDE;
|
||||
ARecentProject := '';
|
||||
@ -81,6 +83,10 @@ begin
|
||||
Caption:=lisProjectWizard;
|
||||
btnNewProject.caption:=lisPWNewProject;
|
||||
btnOpenProject.caption:=lisPWOpenProject;
|
||||
|
||||
btnExamples.Enabled :=
|
||||
(PackageEditingInterface.FindPackageWithName('exampleprojects') <> Nil);
|
||||
|
||||
btnExamples.Caption:=lisPWViewExampleProjects;
|
||||
btnConvertProject.caption:=lisPWConvertProject;
|
||||
gbRecent.Caption:=lisPWOpenRecentProject;
|
||||
|
Loading…
Reference in New Issue
Block a user