mirror of https://gitlab.com/basile.b/dexed.git
miniexplorer, pen icon, allowed to open a project
This commit is contained in:
parent
b576f85cfe
commit
c95a1c5a13
|
@ -124,7 +124,7 @@ inherited CEMiniExplorerWidget: TCEMiniExplorerWidget
|
||||||
object btnEdit: TBitBtn
|
object btnEdit: TBitBtn
|
||||||
Left = 84
|
Left = 84
|
||||||
Height = 28
|
Height = 28
|
||||||
Hint = 'open selected file in a Coedit-or'
|
Hint = 'open selected file in as a project or as a source file'
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 28
|
Width = 28
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
|
|
|
@ -6,8 +6,9 @@ interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, ListFilterEdit, Forms, Controls, Graphics,
|
Classes, SysUtils, FileUtil, ListFilterEdit, Forms, Controls, Graphics,
|
||||||
ExtCtrls, Menus, ComCtrls, Buttons, lcltype, strutils, ce_widget,
|
ExtCtrls, Menus, ComCtrls, Buttons, lcltype, strutils, ce_widget, ce_sharedres,
|
||||||
ce_common, ce_interfaces, ce_observer, ce_writableComponent, ce_sharedres;
|
ce_common, ce_interfaces, ce_observer, ce_writableComponent, ce_dubproject,
|
||||||
|
ce_nativeproject;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -293,6 +294,7 @@ end;
|
||||||
procedure TCEMiniExplorerWidget.btnEditClick(Sender: TObject);
|
procedure TCEMiniExplorerWidget.btnEditClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
fname: string;
|
fname: string;
|
||||||
|
proj: ICECommonProject = nil;
|
||||||
begin
|
begin
|
||||||
if lstFiles.Selected = nil then exit;
|
if lstFiles.Selected = nil then exit;
|
||||||
if lstFiles.Selected.Data = nil then exit;
|
if lstFiles.Selected.Data = nil then exit;
|
||||||
|
@ -301,6 +303,13 @@ begin
|
||||||
{$IFNDEF WINDOWS}
|
{$IFNDEF WINDOWS}
|
||||||
fname := fname[2..length(fname)];
|
fname := fname[2..length(fname)];
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
if isValidNativeProject(fname) then
|
||||||
|
proj := TCENativeProject.create(nil) as ICECommonProject
|
||||||
|
else if isValidDubProject(fname) then
|
||||||
|
proj := TCENativeProject.create(nil) as ICECommonProject;
|
||||||
|
if assigned(proj) then
|
||||||
|
proj.loadFromFile(fname)
|
||||||
|
else
|
||||||
getMultiDocHandler.openDocument(fname);
|
getMultiDocHandler.openDocument(fname);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue