mirror of https://gitlab.com/basile.b/dexed.git
Add symstring for the mini-explorer current path, close #206
This commit is contained in:
parent
5936b5d760
commit
7a5fc7f970
|
@ -760,7 +760,7 @@ end;
|
||||||
|
|
||||||
function TCEMiniExplorerWidget.currentLocation: string;
|
function TCEMiniExplorerWidget.currentLocation: string;
|
||||||
begin
|
begin
|
||||||
result := treeFolders.path.extractFilePath;
|
result := treeFolders.Root;
|
||||||
end;
|
end;
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ type
|
||||||
(**
|
(**
|
||||||
* Enumerates the symbol kinds, used to index an associative array.
|
* Enumerates the symbol kinds, used to index an associative array.
|
||||||
*)
|
*)
|
||||||
TCESymbol = ( ENV_USER, ENV_HOME, ENV_TEMP, CAF, CAP,
|
TCESymbol = ( ENV_USER, ENV_HOME, ENV_TEMP, CAF, CAP, MEP,
|
||||||
CFF, CFP, CFR, CI, CL, CPF, CPP, CPO, CPOP, CPR, CPN, CPFS, CPCD,
|
CFF, CFP, CFR, CI, CL, CPF, CPP, CPO, CPOP, CPR, CPN, CPFS, CPCD,
|
||||||
CPV, CS);
|
CPV, CS);
|
||||||
const
|
const
|
||||||
|
@ -32,6 +32,7 @@ type
|
||||||
fProjInterface: ICECommonProject;
|
fProjInterface: ICECommonProject;
|
||||||
fDoc: TCESynMemo;
|
fDoc: TCESynMemo;
|
||||||
fNeedUpdate: boolean;
|
fNeedUpdate: boolean;
|
||||||
|
fExp: ICEExplorer;
|
||||||
fSymbols: array[TCESymbol] of string;
|
fSymbols: array[TCESymbol] of string;
|
||||||
procedure updateSymbols;
|
procedure updateSymbols;
|
||||||
//
|
//
|
||||||
|
@ -177,15 +178,22 @@ var
|
||||||
const
|
const
|
||||||
na = '``';
|
na = '``';
|
||||||
begin
|
begin
|
||||||
if not fNeedUpdate then exit;
|
//if not fNeedUpdate then
|
||||||
|
// exit;
|
||||||
fNeedUpdate := false;
|
fNeedUpdate := false;
|
||||||
//
|
|
||||||
hasNativeProj := fProj.isNotNil;
|
hasNativeProj := fProj.isNotNil;
|
||||||
hasProjItf := fProjInterface <> nil;
|
hasProjItf := fProjInterface <> nil;
|
||||||
hasDoc := fDoc.isNotNil;
|
hasDoc := fDoc.isNotNil;
|
||||||
//
|
if not assigned(fExp) then
|
||||||
|
fExp := getExplorer;
|
||||||
|
|
||||||
for e := FirstVariableSymbol to high(TCESymbol) do
|
for e := FirstVariableSymbol to high(TCESymbol) do
|
||||||
fSymbols[e] := na;
|
fSymbols[e] := na;
|
||||||
|
|
||||||
|
if assigned(fExp) then
|
||||||
|
fSymbols[MEP] := fExp.currentLocation;
|
||||||
|
|
||||||
// document
|
// document
|
||||||
if hasDoc then
|
if hasDoc then
|
||||||
begin
|
begin
|
||||||
|
@ -282,6 +290,7 @@ begin
|
||||||
//
|
//
|
||||||
'CAF', 'CoeditApplicationFile': Result += fSymbols[CAF];
|
'CAF', 'CoeditApplicationFile': Result += fSymbols[CAF];
|
||||||
'CAP', 'CoeditApplicationPath': Result += fSymbols[CAP];
|
'CAP', 'CoeditApplicationPath': Result += fSymbols[CAP];
|
||||||
|
'MEP', 'MiniExplorerPath': Result += fSymbols[MEP];
|
||||||
//
|
//
|
||||||
'CFF', 'CurrentFileFile' : Result += fSymbols[CFF];
|
'CFF', 'CurrentFileFile' : Result += fSymbols[CFF];
|
||||||
'CFR', 'CurrentFileRunnable' : Result += fSymbols[CFR];
|
'CFR', 'CurrentFileRunnable' : Result += fSymbols[CFR];
|
||||||
|
|
Loading…
Reference in New Issue