mirror of https://gitlab.com/basile.b/dexed.git
#10, project menu, new, sub menu, either dub or native format
This commit is contained in:
parent
ffb193ece4
commit
674a1f9b8c
|
@ -98,6 +98,7 @@ implementation
|
||||||
constructor TCEDubProject.create(aOwner: TComponent);
|
constructor TCEDubProject.create(aOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
fJSON := TJSONObject.Create();
|
||||||
fProjectSubject := TCEProjectSubject.Create;
|
fProjectSubject := TCEProjectSubject.Create;
|
||||||
fBuildTypes := TStringList.Create;
|
fBuildTypes := TStringList.Create;
|
||||||
fConfigs := TStringList.Create;
|
fConfigs := TStringList.Create;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
object CEMainForm: TCEMainForm
|
object CEMainForm: TCEMainForm
|
||||||
Left = 393
|
Left = 480
|
||||||
Height = 49
|
Height = 49
|
||||||
Top = 216
|
Top = 238
|
||||||
Width = 745
|
Width = 745
|
||||||
AllowDropFiles = True
|
AllowDropFiles = True
|
||||||
Caption = 'Coedit'
|
Caption = 'Coedit'
|
||||||
|
@ -2559,7 +2559,7 @@ object CEMainForm: TCEMainForm
|
||||||
object MenuItem14: TMenuItem
|
object MenuItem14: TMenuItem
|
||||||
Caption = 'Project'
|
Caption = 'Project'
|
||||||
object MenuItem31: TMenuItem
|
object MenuItem31: TMenuItem
|
||||||
Action = actProjNew
|
Caption = 'New project'
|
||||||
Bitmap.Data = {
|
Bitmap.Data = {
|
||||||
36040000424D3604000000000000360000002800000010000000100000000100
|
36040000424D3604000000000000360000002800000010000000100000000100
|
||||||
2000000000000004000064000000640000000000000000000000FFFFFF000000
|
2000000000000004000064000000640000000000000000000000FFFFFF000000
|
||||||
|
@ -2596,6 +2596,13 @@ object CEMainForm: TCEMainForm
|
||||||
A53889898AFF0000000089898AFF0000000089898AFF0000000089898AFF0000
|
A53889898AFF0000000089898AFF0000000089898AFF0000000089898AFF0000
|
||||||
000089898AFF000000000000000000000000FFFFFF00FFFFFF00
|
000089898AFF000000000000000000000000FFFFFF00FFFFFF00
|
||||||
}
|
}
|
||||||
|
ImageIndex = 8
|
||||||
|
object MenuItem69: TMenuItem
|
||||||
|
Action = actProjNewDubJson
|
||||||
|
end
|
||||||
|
object MenuItem70: TMenuItem
|
||||||
|
Action = actProjNewNative
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object MenuItem30: TMenuItem
|
object MenuItem30: TMenuItem
|
||||||
Action = actProjOpen
|
Action = actProjOpen
|
||||||
|
@ -3604,7 +3611,6 @@ object CEMainForm: TCEMainForm
|
||||||
Images = imgList
|
Images = imgList
|
||||||
OnUpdate = ActionsUpdate
|
OnUpdate = ActionsUpdate
|
||||||
left = 32
|
left = 32
|
||||||
top = 1
|
|
||||||
object actEdCopy: TAction
|
object actEdCopy: TAction
|
||||||
Category = 'Edit'
|
Category = 'Edit'
|
||||||
Caption = 'Copy'
|
Caption = 'Copy'
|
||||||
|
@ -3733,12 +3739,6 @@ object CEMainForm: TCEMainForm
|
||||||
ImageIndex = 9
|
ImageIndex = 9
|
||||||
OnExecute = actProjOpenExecute
|
OnExecute = actProjOpenExecute
|
||||||
end
|
end
|
||||||
object actProjNew: TAction
|
|
||||||
Category = 'Project'
|
|
||||||
Caption = 'New project'
|
|
||||||
ImageIndex = 8
|
|
||||||
OnExecute = actProjNewExecute
|
|
||||||
end
|
|
||||||
object actProjClose: TAction
|
object actProjClose: TAction
|
||||||
Category = 'Project'
|
Category = 'Project'
|
||||||
Caption = 'Close project'
|
Caption = 'Close project'
|
||||||
|
@ -3907,6 +3907,18 @@ object CEMainForm: TCEMainForm
|
||||||
ImageIndex = 34
|
ImageIndex = 34
|
||||||
OnExecute = actSetRunnableSwExecute
|
OnExecute = actSetRunnableSwExecute
|
||||||
end
|
end
|
||||||
|
object actProjNewDubJson: TAction
|
||||||
|
Category = 'Project'
|
||||||
|
Caption = 'DUB json'
|
||||||
|
ImageIndex = 8
|
||||||
|
OnExecute = actProjNewDubJsonExecute
|
||||||
|
end
|
||||||
|
object actProjNewNative: TAction
|
||||||
|
Category = 'Project'
|
||||||
|
Caption = 'Native format'
|
||||||
|
ImageIndex = 8
|
||||||
|
OnExecute = actProjNewNativeExecute
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object imgList: TImageList
|
object imgList: TImageList
|
||||||
left = 64
|
left = 64
|
||||||
|
|
|
@ -36,6 +36,8 @@ type
|
||||||
actFileHtmlExport: TAction;
|
actFileHtmlExport: TAction;
|
||||||
actFileUnittest: TAction;
|
actFileUnittest: TAction;
|
||||||
actFileCompileAndRunOut: TAction;
|
actFileCompileAndRunOut: TAction;
|
||||||
|
actProjNewDubJson: TAction;
|
||||||
|
actProjNewNative: TAction;
|
||||||
actSetRunnableSw: TAction;
|
actSetRunnableSw: TAction;
|
||||||
actLayoutSave: TAction;
|
actLayoutSave: TAction;
|
||||||
actProjOpenContFold: TAction;
|
actProjOpenContFold: TAction;
|
||||||
|
@ -48,7 +50,6 @@ type
|
||||||
actProjCompAndRunWithArgs: TAction;
|
actProjCompAndRunWithArgs: TAction;
|
||||||
actProjClose: TAction;
|
actProjClose: TAction;
|
||||||
actProjOpts: TAction;
|
actProjOpts: TAction;
|
||||||
actProjNew: TAction;
|
|
||||||
actProjOpen: TAction;
|
actProjOpen: TAction;
|
||||||
actProjSave: TAction;
|
actProjSave: TAction;
|
||||||
actProjSaveAs: TAction;
|
actProjSaveAs: TAction;
|
||||||
|
@ -127,6 +128,8 @@ type
|
||||||
MenuItem66: TMenuItem;
|
MenuItem66: TMenuItem;
|
||||||
MenuItem67: TMenuItem;
|
MenuItem67: TMenuItem;
|
||||||
MenuItem68: TMenuItem;
|
MenuItem68: TMenuItem;
|
||||||
|
MenuItem69: TMenuItem;
|
||||||
|
MenuItem70: TMenuItem;
|
||||||
mnuLayout: TMenuItem;
|
mnuLayout: TMenuItem;
|
||||||
mnuItemMruFile: TMenuItem;
|
mnuItemMruFile: TMenuItem;
|
||||||
mnuItemMruProj: TMenuItem;
|
mnuItemMruProj: TMenuItem;
|
||||||
|
@ -137,6 +140,8 @@ type
|
||||||
MenuItem7: TMenuItem;
|
MenuItem7: TMenuItem;
|
||||||
MenuItem8: TMenuItem;
|
MenuItem8: TMenuItem;
|
||||||
MenuItem9: TMenuItem;
|
MenuItem9: TMenuItem;
|
||||||
|
procedure actProjNewDubJsonExecute(Sender: TObject);
|
||||||
|
procedure actProjNewNativeExecute(Sender: TObject);
|
||||||
procedure actSetRunnableSwExecute(Sender: TObject);
|
procedure actSetRunnableSwExecute(Sender: TObject);
|
||||||
procedure updateDocumentBasedAction(sender: TObject);
|
procedure updateDocumentBasedAction(sender: TObject);
|
||||||
procedure updateProjectBasedAction(sender: TObject);
|
procedure updateProjectBasedAction(sender: TObject);
|
||||||
|
@ -163,7 +168,6 @@ type
|
||||||
procedure actEdMacPlayExecute(Sender: TObject);
|
procedure actEdMacPlayExecute(Sender: TObject);
|
||||||
procedure actEdMacStartStopExecute(Sender: TObject);
|
procedure actEdMacStartStopExecute(Sender: TObject);
|
||||||
procedure actFileNewExecute(Sender: TObject);
|
procedure actFileNewExecute(Sender: TObject);
|
||||||
procedure actProjNewExecute(Sender: TObject);
|
|
||||||
procedure actFileNewRunExecute(Sender: TObject);
|
procedure actFileNewRunExecute(Sender: TObject);
|
||||||
procedure actFileOpenExecute(Sender: TObject);
|
procedure actFileOpenExecute(Sender: TObject);
|
||||||
procedure actProjOpenContFoldExecute(Sender: TObject);
|
procedure actProjOpenContFoldExecute(Sender: TObject);
|
||||||
|
@ -2005,6 +2009,22 @@ begin
|
||||||
showProjTitle;
|
showProjTitle;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCEMainForm.actProjNewDubJsonExecute(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if (fProjectInterface <> nil) and fProjectInterface.modified and (dlgOkCancel(
|
||||||
|
'The project modifications are not saved, continue ?') = mrCancel) then exit;
|
||||||
|
closeProj;
|
||||||
|
newDubProj;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCEMainForm.actProjNewNativeExecute(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if (fProjectInterface <> nil) and fProjectInterface.modified and (dlgOkCancel(
|
||||||
|
'The project modifications are not saved, continue ?') = mrCancel) then exit;
|
||||||
|
closeProj;
|
||||||
|
newNativeProj;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCEMainForm.newNativeProj;
|
procedure TCEMainForm.newNativeProj;
|
||||||
begin
|
begin
|
||||||
fNativeProject := TCENativeProject.Create(nil);
|
fNativeProject := TCENativeProject.Create(nil);
|
||||||
|
@ -2015,8 +2035,10 @@ end;
|
||||||
|
|
||||||
procedure TCEMainForm.newDubProj;
|
procedure TCEMainForm.newDubProj;
|
||||||
begin
|
begin
|
||||||
fDubProject := TCEDubProject.Create(nil);
|
fDubProject := TCEDubProject.create(nil);
|
||||||
fDubProject.Name := 'CurrentProject';
|
fDubProject.json.Add('name', '');
|
||||||
|
fDubProject.beginModification;
|
||||||
|
fDubProject.endModification;
|
||||||
fProjectInterface := fDubProject as ICECommonProject;
|
fProjectInterface := fDubProject as ICECommonProject;
|
||||||
showProjTitle;
|
showProjTitle;
|
||||||
end;
|
end;
|
||||||
|
@ -2051,14 +2073,6 @@ begin
|
||||||
openProj(TMenuItem(Sender).Hint);
|
openProj(TMenuItem(Sender).Hint);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEMainForm.actProjNewExecute(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if (fProjectInterface <> nil) and fProjectInterface.modified and (dlgOkCancel(
|
|
||||||
'The project modifications are not saved, continue ?') = mrCancel) then exit;
|
|
||||||
closeProj;
|
|
||||||
newNativeProj;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TCEMainForm.actProjCloseExecute(Sender: TObject);
|
procedure TCEMainForm.actProjCloseExecute(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if fProjectInterface = nil then exit;
|
if fProjectInterface = nil then exit;
|
||||||
|
|
Loading…
Reference in New Issue