mirror of https://gitlab.com/basile.b/dexed.git
stylefix and cleanup
This commit is contained in:
parent
aea4d3c945
commit
084a476e5f
|
@ -98,9 +98,11 @@ var
|
||||||
outname: string;
|
outname: string;
|
||||||
begin
|
begin
|
||||||
lstCdbOut.Clear;
|
lstCdbOut.Clear;
|
||||||
if fProject = nil then exit;
|
if fProject = nil then
|
||||||
|
exit;
|
||||||
outname := fProject.outputFilename;
|
outname := fProject.outputFilename;
|
||||||
if not fileExists(outname) then exit;
|
if not fileExists(outname) then
|
||||||
|
exit;
|
||||||
//
|
//
|
||||||
killProcess(fCdbProc);
|
killProcess(fCdbProc);
|
||||||
fCdbProc := TAsyncProcess.create(nil);
|
fCdbProc := TAsyncProcess.create(nil);
|
||||||
|
@ -120,7 +122,8 @@ procedure TCECdbWidget.btnStepClick(Sender: TObject);
|
||||||
const
|
const
|
||||||
cmd = 'p'#13#10;
|
cmd = 'p'#13#10;
|
||||||
begin
|
begin
|
||||||
if fCdbProc = nil then exit;
|
if fCdbProc = nil then
|
||||||
|
exit;
|
||||||
fCdbProc.Input.Write(cmd[1], length(cmd));
|
fCdbProc.Input.Write(cmd[1], length(cmd));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -128,7 +131,8 @@ procedure TCECdbWidget.btnGoClick(Sender: TObject);
|
||||||
const
|
const
|
||||||
cmd = 'g'#13#10;
|
cmd = 'g'#13#10;
|
||||||
begin
|
begin
|
||||||
if fCdbProc = nil then exit;
|
if fCdbProc = nil then
|
||||||
|
exit;
|
||||||
fCdbProc.Input.Write(cmd[1], length(cmd));
|
fCdbProc.Input.Write(cmd[1], length(cmd));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -136,7 +140,8 @@ procedure TCECdbWidget.btnDisasmClick(Sender: TObject);
|
||||||
const
|
const
|
||||||
cmd = 'u'#13#10;
|
cmd = 'u'#13#10;
|
||||||
begin
|
begin
|
||||||
if fCdbProc = nil then exit;
|
if fCdbProc = nil then
|
||||||
|
exit;
|
||||||
fCdbProc.Input.Write(cmd[1], length(cmd));
|
fCdbProc.Input.Write(cmd[1], length(cmd));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -144,7 +149,8 @@ procedure TCECdbWidget.btnStopClick(Sender: TObject);
|
||||||
const
|
const
|
||||||
cmd = 'q'#13#10;
|
cmd = 'q'#13#10;
|
||||||
begin
|
begin
|
||||||
if fCdbProc <> nil then
|
if fCdbProc <> nil
|
||||||
|
then
|
||||||
fCdbProc.Input.Write(cmd[1], length(cmd));
|
fCdbProc.Input.Write(cmd[1], length(cmd));
|
||||||
killProcess(fCdbProc);
|
killProcess(fCdbProc);
|
||||||
end;
|
end;
|
||||||
|
@ -171,7 +177,8 @@ var
|
||||||
lst: TStringList;
|
lst: TStringList;
|
||||||
cnt: Integer;
|
cnt: Integer;
|
||||||
begin
|
begin
|
||||||
if fCdbProc = nil then exit;
|
if fCdbProc = nil then
|
||||||
|
exit;
|
||||||
//
|
//
|
||||||
lst := TStringList.Create;
|
lst := TStringList.Create;
|
||||||
try
|
try
|
||||||
|
|
|
@ -232,7 +232,8 @@ end;
|
||||||
procedure TReaderEx.ReadPersistent(aValue: TPersistent);
|
procedure TReaderEx.ReadPersistent(aValue: TPersistent);
|
||||||
begin
|
begin
|
||||||
ReadListBegin;
|
ReadListBegin;
|
||||||
while not EndOfList do ReadProperty(aValue);
|
while not EndOfList do
|
||||||
|
ReadProperty(aValue);
|
||||||
ReadListEnd;
|
ReadListEnd;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -250,13 +251,16 @@ end;
|
||||||
|
|
||||||
procedure TMRUList.clearOutOfRange;
|
procedure TMRUList.clearOutOfRange;
|
||||||
begin
|
begin
|
||||||
while Count > fMaxCount do delete(Count-1);
|
while Count > fMaxCount do
|
||||||
|
delete(Count-1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMRUList.setMaxCount(aValue: Integer);
|
procedure TMRUList.setMaxCount(aValue: Integer);
|
||||||
begin
|
begin
|
||||||
if aValue < 0 then aValue := 0;
|
if aValue < 0 then
|
||||||
if fMaxCount = aValue then exit;
|
aValue := 0;
|
||||||
|
if fMaxCount = aValue then
|
||||||
|
exit;
|
||||||
clearOutOfRange;
|
clearOutOfRange;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -265,30 +269,36 @@ var
|
||||||
i: NativeInt;
|
i: NativeInt;
|
||||||
begin
|
begin
|
||||||
i := indexOf(S);
|
i := indexOf(S);
|
||||||
if i = -1 then exit(true);
|
if i = -1 then
|
||||||
if i = 0 then exit(false);
|
exit(true);
|
||||||
if Count < 2 then exit(false);
|
if i = 0 then
|
||||||
|
exit(false);
|
||||||
|
if Count < 2 then
|
||||||
|
exit(false);
|
||||||
exchange(i, i-1);
|
exchange(i, i-1);
|
||||||
exit( false);
|
exit( false);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMRUList.Put(Index: Integer; const S: string);
|
procedure TMRUList.Put(Index: Integer; const S: string);
|
||||||
begin
|
begin
|
||||||
if not (checkItem(S)) then exit;
|
if not (checkItem(S)) then
|
||||||
|
exit;
|
||||||
inherited;
|
inherited;
|
||||||
clearOutOfRange;
|
clearOutOfRange;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMRUList.InsertItem(Index: Integer; const S: string);
|
procedure TMRUList.InsertItem(Index: Integer; const S: string);
|
||||||
begin
|
begin
|
||||||
if not (checkItem(S)) then exit;
|
if not (checkItem(S)) then
|
||||||
|
exit;
|
||||||
inherited;
|
inherited;
|
||||||
clearOutOfRange;
|
clearOutOfRange;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMRUList.Insert(Index: Integer; const S: string);
|
procedure TMRUList.Insert(Index: Integer; const S: string);
|
||||||
begin
|
begin
|
||||||
if not (checkItem(S)) then exit;
|
if not (checkItem(S)) then
|
||||||
|
exit;
|
||||||
inherited;
|
inherited;
|
||||||
clearOutOfRange;
|
clearOutOfRange;
|
||||||
end;
|
end;
|
||||||
|
@ -299,7 +309,8 @@ var
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
for i := Count-1 downto 0 do
|
for i := Count-1 downto 0 do
|
||||||
if not fileExists(Strings[i]) then Delete(i);
|
if not fileExists(Strings[i]) then
|
||||||
|
Delete(i);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMRUFileList.checkItem(const S: string): boolean;
|
function TMRUFileList.checkItem(const S: string): boolean;
|
||||||
|
@ -498,7 +509,8 @@ begin
|
||||||
while(i <> length(drv)+1) do
|
while(i <> length(drv)+1) do
|
||||||
begin
|
begin
|
||||||
Inc(sepCnt, Byte(aPath[i] = directorySeparator));
|
Inc(sepCnt, Byte(aPath[i] = directorySeparator));
|
||||||
if sepCnt = 2 then break;
|
if sepCnt = 2 then
|
||||||
|
break;
|
||||||
Dec(i);
|
Dec(i);
|
||||||
end;
|
end;
|
||||||
pth1 := aPath[i..length(aPath)];
|
pth1 := aPath[i..length(aPath)];
|
||||||
|
@ -518,7 +530,7 @@ begin
|
||||||
PIDL := nil;
|
PIDL := nil;
|
||||||
SHGetSpecialFolderLocation(0, CSIDL_APPDATA, PIDL);
|
SHGetSpecialFolderLocation(0, CSIDL_APPDATA, PIDL);
|
||||||
SHGetPathFromIDList(PIDL, Folder);
|
SHGetPathFromIDList(PIDL, Folder);
|
||||||
result:=Folder;
|
result := Folder;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$IFDEF UNIX}
|
{$IFDEF UNIX}
|
||||||
result := ExpandFileName('~/');
|
result := ExpandFileName('~/');
|
||||||
|
@ -600,7 +612,7 @@ begin
|
||||||
if aPath[length(aPath)] = '*' then
|
if aPath[length(aPath)] = '*' then
|
||||||
begin
|
begin
|
||||||
pth := aPath[1..length(aPath)-1];
|
pth := aPath[1..length(aPath)-1];
|
||||||
if pth[length(pth)] in ['/','\'] then
|
if pth[length(pth)] in ['/', '\'] then
|
||||||
pth := pth[1..length(pth)-1];
|
pth := pth[1..length(pth)-1];
|
||||||
if not directoryExists(pth) then exit(false);
|
if not directoryExists(pth) then exit(false);
|
||||||
//
|
//
|
||||||
|
|
|
@ -78,10 +78,10 @@ begin
|
||||||
if not dcdOn then exit;
|
if not dcdOn then exit;
|
||||||
//
|
//
|
||||||
if not DCD_server.Running then
|
if not DCD_server.Running then
|
||||||
DCD_server.Parameters.Add('-I'+ aFilename)
|
DCD_server.Parameters.Add('-I' + aFilename)
|
||||||
else if DCD_client <> nil then begin
|
else if DCD_client <> nil then begin
|
||||||
DCD_client.Parameters.Clear;
|
DCD_client.Parameters.Clear;
|
||||||
DCD_client.Parameters.Add('-I'+ aFilename);
|
DCD_client.Parameters.Add('-I' + aFilename);
|
||||||
DCD_client.Execute;
|
DCD_client.Execute;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -93,7 +93,8 @@ var
|
||||||
item: string;
|
item: string;
|
||||||
asComp, asTips: boolean;
|
asComp, asTips: boolean;
|
||||||
begin
|
begin
|
||||||
if not dcdOn then exit;
|
if not dcdOn then
|
||||||
|
exit;
|
||||||
lazyServerStart;
|
lazyServerStart;
|
||||||
//
|
//
|
||||||
DCD_client.Parameters.Clear;
|
DCD_client.Parameters.Clear;
|
||||||
|
@ -144,10 +145,11 @@ var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
str: string;
|
str: string;
|
||||||
begin
|
begin
|
||||||
if not dcdOn then exit;
|
if not dcdOn then
|
||||||
|
exit;
|
||||||
lazyServerStart;
|
lazyServerStart;
|
||||||
//
|
if DCD_client.Running then
|
||||||
if DCD_client.Running then exit;
|
exit;
|
||||||
//
|
//
|
||||||
DCD_client.Parameters.Clear;
|
DCD_client.Parameters.Clear;
|
||||||
DCD_client.Parameters.Add('-c');
|
DCD_client.Parameters.Add('-c');
|
||||||
|
@ -169,10 +171,11 @@ var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
str, loc: string;
|
str, loc: string;
|
||||||
begin
|
begin
|
||||||
if not dcdOn then exit;
|
if not dcdOn then
|
||||||
|
exit;
|
||||||
lazyServerStart;
|
lazyServerStart;
|
||||||
//
|
if DCD_client.Running then
|
||||||
if DCD_client.Running then exit;
|
exit;
|
||||||
//
|
//
|
||||||
DCD_client.Parameters.Clear;
|
DCD_client.Parameters.Clear;
|
||||||
DCD_client.Parameters.Add('-l');
|
DCD_client.Parameters.Add('-l');
|
||||||
|
@ -188,7 +191,8 @@ begin
|
||||||
if str <> '' then
|
if str <> '' then
|
||||||
begin
|
begin
|
||||||
i := Pos(#9, str);
|
i := Pos(#9, str);
|
||||||
if i = -1 then exit;
|
if i = -1 then
|
||||||
|
exit;
|
||||||
loc := str[i+1..length(str)];
|
loc := str[i+1..length(str)];
|
||||||
str := str[1..i-1];
|
str := str[1..i-1];
|
||||||
aFilename := str;
|
aFilename := str;
|
||||||
|
|
|
@ -280,7 +280,8 @@ var
|
||||||
begin
|
begin
|
||||||
savedReader := aReader;
|
savedReader := aReader;
|
||||||
savedPos := aPosition;
|
savedPos := aPosition;
|
||||||
if readDelim(aReader, aPosition, aDelim) then exit(true);
|
if readDelim(aReader, aPosition, aDelim) then
|
||||||
|
exit(true);
|
||||||
aReader := savedReader;
|
aReader := savedReader;
|
||||||
aPosition := savedPos;
|
aPosition := savedPos;
|
||||||
exit(false);
|
exit(false);
|
||||||
|
@ -293,7 +294,8 @@ var
|
||||||
begin
|
begin
|
||||||
savedReader := aReader;
|
savedReader := aReader;
|
||||||
savedPos := aPosition;
|
savedPos := aPosition;
|
||||||
if readDelim(aReader, aPosition, aDelim) then exit(true);
|
if readDelim(aReader, aPosition, aDelim) then
|
||||||
|
exit(true);
|
||||||
aReader := savedReader;
|
aReader := savedReader;
|
||||||
aPosition := savedPos;
|
aPosition := savedPos;
|
||||||
exit(false);
|
exit(false);
|
||||||
|
|
|
@ -360,10 +360,14 @@ end;
|
||||||
{$REGION TDocOpts --------------------------------------------------------------}
|
{$REGION TDocOpts --------------------------------------------------------------}
|
||||||
procedure TDocOpts.getOpts(const aList: TStrings);
|
procedure TDocOpts.getOpts(const aList: TStrings);
|
||||||
begin
|
begin
|
||||||
if fGenDoc then aList.Add('-D');
|
if fGenDoc then
|
||||||
if fGenJson then aList.Add('-X');
|
aList.Add('-D');
|
||||||
if fDocDir <> '' then aList.Add('-Dd' + CEMainForm.expandSymbolicString(fDocDir));
|
if fGenJson then
|
||||||
if fJsonFname <> '' then aList.Add('-Xf' + CEMainForm.expandSymbolicString(fJsonFname));
|
aList.Add('-X');
|
||||||
|
if fDocDir <> '' then
|
||||||
|
aList.Add('-Dd' + CEMainForm.expandSymbolicString(fDocDir));
|
||||||
|
if fJsonFname <> '' then
|
||||||
|
aList.Add('-Xf' + CEMainForm.expandSymbolicString(fJsonFname));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDocOpts.assign(aValue: TPersistent);
|
procedure TDocOpts.assign(aValue: TPersistent);
|
||||||
|
@ -389,7 +393,8 @@ begin
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
//
|
//
|
||||||
if fGenDoc = aValue then exit;
|
if fGenDoc = aValue then
|
||||||
|
exit;
|
||||||
fGenDoc := aValue;
|
fGenDoc := aValue;
|
||||||
doChanged;
|
doChanged;
|
||||||
end;
|
end;
|
||||||
|
@ -402,24 +407,29 @@ begin
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
//
|
//
|
||||||
if fGenJson = aValue then exit;
|
if fGenJson = aValue then
|
||||||
|
exit;
|
||||||
fGenJson := aValue;
|
fGenJson := aValue;
|
||||||
doChanged;
|
doChanged;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDocOpts.setDocDir(const aValue: string);
|
procedure TDocOpts.setDocDir(const aValue: string);
|
||||||
begin
|
begin
|
||||||
if fDocDir = aValue then exit;
|
if fDocDir = aValue then
|
||||||
|
exit;
|
||||||
fDocDir := patchPlateformPath(aValue);
|
fDocDir := patchPlateformPath(aValue);
|
||||||
if fDocDir <> '' then setGenDoc(true);
|
if fDocDir <> '' then
|
||||||
|
setGenDoc(true);
|
||||||
doChanged;
|
doChanged;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDocOpts.setJSONFile(const aValue: string);
|
procedure TDocOpts.setJSONFile(const aValue: string);
|
||||||
begin
|
begin
|
||||||
if fJsonFname = aValue then exit;
|
if fJsonFname = aValue then
|
||||||
|
exit;
|
||||||
fJsonFname := patchPlateformPath(aValue);
|
fJsonFname := patchPlateformPath(aValue);
|
||||||
if fJsonFname <> '' then setGenJSON(true);
|
if fJsonFname <> '' then
|
||||||
|
setGenJSON(true);
|
||||||
doChanged;
|
doChanged;
|
||||||
end;
|
end;
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
@ -849,7 +859,6 @@ end;
|
||||||
procedure TPathsOpts.assign(aValue: TPersistent);
|
procedure TPathsOpts.assign(aValue: TPersistent);
|
||||||
var
|
var
|
||||||
src: TPathsOpts;
|
src: TPathsOpts;
|
||||||
i: Integer;
|
|
||||||
begin
|
begin
|
||||||
if (aValue is TPathsOpts) then
|
if (aValue is TPathsOpts) then
|
||||||
begin
|
begin
|
||||||
|
|
|
@ -79,7 +79,7 @@ implementation
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
ce_main, ce_messages;
|
ce_main;
|
||||||
|
|
||||||
{$REGION Standard Comp/Obj------------------------------------------------------}
|
{$REGION Standard Comp/Obj------------------------------------------------------}
|
||||||
constructor TCEEditorWidget.create(aOwner: TComponent);
|
constructor TCEEditorWidget.create(aOwner: TComponent);
|
||||||
|
@ -182,7 +182,8 @@ function TCEEditorWidget.getEditorIndex: NativeInt;
|
||||||
begin
|
begin
|
||||||
if pageControl.PageCount > 0 then
|
if pageControl.PageCount > 0 then
|
||||||
result := pageControl.PageIndex
|
result := pageControl.PageIndex
|
||||||
else result := -1;
|
else
|
||||||
|
result := -1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCEEditorWidget.getEditor(index: NativeInt): TCESynMemo;
|
function TCEEditorWidget.getEditor(index: NativeInt): TCESynMemo;
|
||||||
|
@ -217,7 +218,7 @@ procedure TCEEditorWidget.completionCodeCompletion(var Value: string;
|
||||||
SourceValue: string; var SourceStart, SourceEnd: TPoint; KeyChar: TUTF8Char;
|
SourceValue: string; var SourceStart, SourceEnd: TPoint; KeyChar: TUTF8Char;
|
||||||
Shift: TShiftState);
|
Shift: TShiftState);
|
||||||
begin
|
begin
|
||||||
// warning: '20' depends on ce_dcd, case knd of...
|
// warning: '20' depends on ce_dcd, case knd of, string literals length
|
||||||
Value := Value[1..length(Value)-20];
|
Value := Value[1..length(Value)-20];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -383,7 +384,7 @@ const
|
||||||
begin
|
begin
|
||||||
if fDoc = nil then exit;
|
if fDoc = nil then exit;
|
||||||
//
|
//
|
||||||
editorStatus.Panels[0].Text := format('%d : %d',[fDoc.CaretY, fDoc.CaretX]);
|
editorStatus.Panels[0].Text := format('%d : %d', [fDoc.CaretY, fDoc.CaretX]);
|
||||||
editorStatus.Panels[1].Text := modstr[fDoc.modified];
|
editorStatus.Panels[1].Text := modstr[fDoc.modified];
|
||||||
editorStatus.Panels[2].Text := fDoc.fileName;
|
editorStatus.Panels[2].Text := fDoc.fileName;
|
||||||
end;
|
end;
|
||||||
|
|
|
@ -137,7 +137,7 @@ begin
|
||||||
if LibraryManager = nil then exit;
|
if LibraryManager = nil then exit;
|
||||||
for i:= 0 to LibraryManager.libraries.Count-1 do
|
for i:= 0 to LibraryManager.libraries.Count-1 do
|
||||||
begin
|
begin
|
||||||
itm := TLibraryItem( LibraryManager.libraries.Items[i]);
|
itm := TLibraryItem(LibraryManager.libraries.Items[i]);
|
||||||
row := List.Items.Add;
|
row := List.Items.Add;
|
||||||
row.Caption := itm.libAlias;
|
row.Caption := itm.libAlias;
|
||||||
row.SubItems.Add(itm.libFile);
|
row.SubItems.Add(itm.libFile);
|
||||||
|
|
|
@ -11,7 +11,6 @@ uses
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
|
||||||
(**
|
(**
|
||||||
* the struct linked to a log message. allow to be filtered.
|
* the struct linked to a log message. allow to be filtered.
|
||||||
*)
|
*)
|
||||||
|
@ -90,8 +89,6 @@ type
|
||||||
procedure lmClearbyData(aData: Pointer);
|
procedure lmClearbyData(aData: Pointer);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TMessageKind = (msgkUnknown, msgkInfo, msgkHint, msgkWarn, msgkError);
|
|
||||||
|
|
||||||
function guessMessageKind(const aMessg: string): TCEAppMessageKind;
|
function guessMessageKind(const aMessg: string): TCEAppMessageKind;
|
||||||
function getLineFromDmdMessage(const aMessage: string): TPoint;
|
function getLineFromDmdMessage(const aMessage: string): TPoint;
|
||||||
function openFileFromDmdMessage(const aMessage: string): boolean;
|
function openFileFromDmdMessage(const aMessage: string): boolean;
|
||||||
|
@ -197,9 +194,12 @@ end;
|
||||||
{$REGION ICESessionOptionsObserver ------------------------------------------------------}
|
{$REGION ICESessionOptionsObserver ------------------------------------------------------}
|
||||||
procedure TCEMessagesWidget.setMaxMessageCount(aValue: Integer);
|
procedure TCEMessagesWidget.setMaxMessageCount(aValue: Integer);
|
||||||
begin
|
begin
|
||||||
if aValue < 10 then aValue := 10;
|
if aValue < 10 then
|
||||||
if aValue > 1023 then aValue := 1023;
|
aValue := 10;
|
||||||
if fMaxMessCnt = aValue then exit;
|
if aValue > 1023 then
|
||||||
|
aValue := 1023;
|
||||||
|
if fMaxMessCnt = aValue then
|
||||||
|
exit;
|
||||||
fMaxMessCnt := aValue;
|
fMaxMessCnt := aValue;
|
||||||
clearOutOfRangeMessg;
|
clearOutOfRangeMessg;
|
||||||
end;
|
end;
|
||||||
|
@ -217,7 +217,8 @@ end;
|
||||||
procedure TCEMessagesWidget.sesoptDeclareProperties(aFiler: TFiler);
|
procedure TCEMessagesWidget.sesoptDeclareProperties(aFiler: TFiler);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
aFiler.DefineProperty(Name + '_MaxMessageCount', @optset_MaxMessageCount, @optget_MaxMessageCount, true);
|
aFiler.DefineProperty(Name + '_MaxMessageCount', @optset_MaxMessageCount,
|
||||||
|
@optget_MaxMessageCount, true);
|
||||||
end;
|
end;
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
|
||||||
|
@ -260,8 +261,9 @@ var
|
||||||
str: string;
|
str: string;
|
||||||
begin
|
begin
|
||||||
str := '';
|
str := '';
|
||||||
for i := 0 to List.Items.Count-1 do if List.Items[i].MultiSelected then
|
for i := 0 to List.Items.Count-1 do
|
||||||
str += List.Items[i].Text + LineEnding;
|
if List.Items[i].MultiSelected then
|
||||||
|
str += List.Items[i].Text + LineEnding;
|
||||||
Clipboard.AsText := str;
|
Clipboard.AsText := str;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -428,7 +430,8 @@ end;
|
||||||
|
|
||||||
procedure TCEMessagesWidget.scrollToBack;
|
procedure TCEMessagesWidget.scrollToBack;
|
||||||
begin
|
begin
|
||||||
if not Visible then exit;
|
if not Visible then
|
||||||
|
exit;
|
||||||
if List.BottomItem <> nil then
|
if List.BottomItem <> nil then
|
||||||
List.BottomItem.MakeVisible;
|
List.BottomItem.MakeVisible;
|
||||||
end;
|
end;
|
||||||
|
@ -438,12 +441,15 @@ var
|
||||||
pos: TPoint;
|
pos: TPoint;
|
||||||
msg: string;
|
msg: string;
|
||||||
begin
|
begin
|
||||||
if List.Selected = nil then exit;
|
if List.Selected = nil then
|
||||||
|
exit;
|
||||||
msg := List.Selected.Text;
|
msg := List.Selected.Text;
|
||||||
if not openFileFromDmdMessage(msg) then exit;
|
if not openFileFromDmdMessage(msg) then
|
||||||
// from here since a doc has the focus, List.Selected is nil
|
exit;
|
||||||
|
// from here, since a doc has the focus, List.Selected is nil
|
||||||
pos := getLineFromDmdMessage(msg);
|
pos := getLineFromDmdMessage(msg);
|
||||||
if fDoc = nil then exit;
|
if fDoc = nil then
|
||||||
|
exit;
|
||||||
fDoc.CaretXY := pos;
|
fDoc.CaretXY := pos;
|
||||||
fDoc.SelectLine;
|
fDoc.SelectLine;
|
||||||
end;
|
end;
|
||||||
|
@ -454,7 +460,8 @@ var
|
||||||
itm: TTreeNode;
|
itm: TTreeNode;
|
||||||
i: NativeInt;
|
i: NativeInt;
|
||||||
begin
|
begin
|
||||||
if updating then exit;
|
if updating then
|
||||||
|
exit;
|
||||||
for i := 0 to List.Items.Count-1 do
|
for i := 0 to List.Items.Count-1 do
|
||||||
begin
|
begin
|
||||||
itm := List.Items[i];
|
itm := List.Items[i];
|
||||||
|
@ -502,12 +509,14 @@ begin
|
||||||
result := amkBub;
|
result := amkBub;
|
||||||
while(true) do
|
while(true) do
|
||||||
begin
|
begin
|
||||||
if pos > length(aMessg) then exit;
|
if pos > length(aMessg) then
|
||||||
|
exit;
|
||||||
if aMessg[pos] in [#0..#32] then
|
if aMessg[pos] in [#0..#32] then
|
||||||
begin
|
begin
|
||||||
Inc(pos);
|
Inc(pos);
|
||||||
result := checkIdent;
|
result := checkIdent;
|
||||||
if result <> amkBub then exit;
|
if result <> amkBub then
|
||||||
|
exit;
|
||||||
idt := '';
|
idt := '';
|
||||||
continue;
|
continue;
|
||||||
end;
|
end;
|
||||||
|
@ -592,7 +601,7 @@ begin
|
||||||
if not fileExists(ident) then
|
if not fileExists(ident) then
|
||||||
exit;
|
exit;
|
||||||
ext := extractFileExt(ident);
|
ext := extractFileExt(ident);
|
||||||
// import(file) : ext may be different
|
// error in import(file) content: ext may be different
|
||||||
if not dExtList.IndexOf(ext) = -1 then
|
if not dExtList.IndexOf(ext) = -1 then
|
||||||
exit;
|
exit;
|
||||||
CEMainForm.openFile(ident);
|
CEMainForm.openFile(ident);
|
||||||
|
|
|
@ -5,9 +5,8 @@ unit ce_miniexplorer;
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
|
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, ExtCtrls, Menus, ComCtrls,
|
||||||
Menus, ComCtrls, Buttons, lcltype, strutils, ce_widget, ce_common,
|
Buttons, lcltype, strutils, ce_widget, ce_common, ce_interfaces, ce_observer;
|
||||||
ce_interfaces, ce_observer;
|
|
||||||
|
|
||||||
type
|
type
|
||||||
TCEMiniExplorerWidget = class(TCEWidget)
|
TCEMiniExplorerWidget = class(TCEWidget)
|
||||||
|
|
Loading…
Reference in New Issue