mirror of https://gitlab.com/basile.b/dexed.git
refactor = -1 with equals(-1)
This commit is contained in:
parent
0196068b06
commit
b3da921d63
|
@ -463,7 +463,7 @@ var
|
||||||
rel: string;
|
rel: string;
|
||||||
lst: TStringList;
|
lst: TStringList;
|
||||||
begin
|
begin
|
||||||
if fConfIx = -1 then
|
if fConfIx.equals(-1) then
|
||||||
exit;
|
exit;
|
||||||
exc := TStringList.Create;
|
exc := TStringList.Create;
|
||||||
try
|
try
|
||||||
|
|
|
@ -153,11 +153,7 @@ end;
|
||||||
{$REGION config. things --------------------------------------------------------}
|
{$REGION config. things --------------------------------------------------------}
|
||||||
procedure TProjectConfigurationWidget.selConfChange(Sender: TObject);
|
procedure TProjectConfigurationWidget.selConfChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if fProj.isNil then
|
if fProj.isNil or Updating or selConf.ItemIndex.equals(-1) then
|
||||||
exit;
|
|
||||||
if Updating then
|
|
||||||
exit;
|
|
||||||
if selConf.ItemIndex = -1 then
|
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
beginImperativeUpdate;
|
beginImperativeUpdate;
|
||||||
|
@ -188,7 +184,7 @@ var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
i := fSynchroItem.IndexOf(Item);
|
i := fSynchroItem.IndexOf(Item);
|
||||||
if i = -1 then
|
if i.equals(-1) then
|
||||||
exit('');
|
exit('');
|
||||||
result := fSynchroValue[i];
|
result := fSynchroValue[i];
|
||||||
end;
|
end;
|
||||||
|
@ -214,7 +210,7 @@ begin
|
||||||
exit;
|
exit;
|
||||||
if inspector.TIObject.isNil then
|
if inspector.TIObject.isNil then
|
||||||
exit;
|
exit;
|
||||||
if inspector.ItemIndex = -1 then
|
if inspector.ItemIndex.equals(-1) then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
storage := nil;
|
storage := nil;
|
||||||
|
@ -385,7 +381,7 @@ end;
|
||||||
|
|
||||||
function TProjectConfigurationWidget.getGridTarget: TPersistent;
|
function TProjectConfigurationWidget.getGridTarget: TPersistent;
|
||||||
begin
|
begin
|
||||||
if fProj.isNil or (fProj.ConfigurationIndex = -1) or Tree.Selected.isNil then
|
if fProj.isNil or fProj.ConfigurationIndex.equals(-1) or Tree.Selected.isNil then
|
||||||
exit(nil);
|
exit(nil);
|
||||||
// Warning: TTreeNode.StateIndex is usually made for the images...it's not a tag
|
// Warning: TTreeNode.StateIndex is usually made for the images...it's not a tag
|
||||||
case Tree.Selected.StateIndex of
|
case Tree.Selected.StateIndex of
|
||||||
|
|
|
@ -371,7 +371,7 @@ begin
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
pge := TDexedPage(fPages[index]);
|
pge := TDexedPage(fPages[index]);
|
||||||
if (fSplittedPageIndex = -1) or (index = fSplittedPageIndex) then
|
if fSplittedPageIndex.equals(-1) or index.equals(fSplittedPageIndex) then
|
||||||
pge.Align:=alClient;
|
pge.Align:=alClient;
|
||||||
pge.Visible:=true;
|
pge.Visible:=true;
|
||||||
pge.Repaint;
|
pge.Repaint;
|
||||||
|
@ -390,14 +390,14 @@ begin
|
||||||
if (index < 0) then
|
if (index < 0) then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
if (fSplittedPageIndex = -1) or (index = fSplittedPageIndex) then
|
if fSplittedPageIndex.equals(-1) or index.equals(fSplittedPageIndex) then
|
||||||
begin
|
begin
|
||||||
hidePage(fPageIndex);
|
hidePage(fPageIndex);
|
||||||
fPageIndex := index;
|
fPageIndex := index;
|
||||||
showPage(fPageIndex);
|
showPage(fPageIndex);
|
||||||
fSplitter.Visible:= false;
|
fSplitter.Visible:= false;
|
||||||
end
|
end
|
||||||
else if (fSplittedPageIndex <> -1) then
|
else if not fSplittedPageIndex.equals(-1) then
|
||||||
begin
|
begin
|
||||||
hidePage(fPageIndex);
|
hidePage(fPageIndex);
|
||||||
fPageIndex := index;
|
fPageIndex := index;
|
||||||
|
@ -506,7 +506,7 @@ end;
|
||||||
|
|
||||||
function TDexedPageControl.getSplitPage: TDexedPage;
|
function TDexedPageControl.getSplitPage: TDexedPage;
|
||||||
begin
|
begin
|
||||||
if fSplittedPageIndex = -1 then
|
if fSplittedPageIndex.equals(-1) then
|
||||||
exit(nil)
|
exit(nil)
|
||||||
else
|
else
|
||||||
exit(getPage(fSplittedPageIndex));
|
exit(getPage(fSplittedPageIndex));
|
||||||
|
|
|
@ -758,7 +758,7 @@ procedure TD2SynPresetsLoaderForm.btnCloneClick(sender: TObject);
|
||||||
var
|
var
|
||||||
old: TD2SynPreset;
|
old: TD2SynPreset;
|
||||||
begin
|
begin
|
||||||
if fList.ItemIndex = -1 then
|
if fList.ItemIndex.equals(-1) then
|
||||||
exit;
|
exit;
|
||||||
old := fPresets[fList.ItemIndex];
|
old := fPresets[fList.ItemIndex];
|
||||||
btnAddClick(nil);
|
btnAddClick(nil);
|
||||||
|
@ -789,7 +789,7 @@ procedure TD2SynPresetsLoaderForm.updateEditor;
|
||||||
var
|
var
|
||||||
p: TD2SynPreset;
|
p: TD2SynPreset;
|
||||||
begin
|
begin
|
||||||
if fList.ItemIndex = -1 then
|
if fList.ItemIndex.equals(-1) then
|
||||||
exit;
|
exit;
|
||||||
p := fPresets[fList.ItemIndex];
|
p := fPresets[fList.ItemIndex];
|
||||||
fEditor.Color := p.background;
|
fEditor.Color := p.background;
|
||||||
|
|
|
@ -241,7 +241,7 @@ begin
|
||||||
for i := 0 to fProj.importsPathCount-1 do
|
for i := 0 to fProj.importsPathCount-1 do
|
||||||
begin
|
begin
|
||||||
fold := fProj.importPath(i);
|
fold := fProj.importPath(i);
|
||||||
if fold.dirExists and (folds.IndexOf(fold) = -1) then
|
if fold.dirExists and folds.IndexOf(fold).equals(-1) then
|
||||||
folds.Add(fold);
|
folds.Add(fold);
|
||||||
end;
|
end;
|
||||||
addImportFolders(folds);
|
addImportFolders(folds);
|
||||||
|
@ -628,7 +628,7 @@ begin
|
||||||
processOutputToStrings(fClient, fTempLines);
|
processOutputToStrings(fClient, fTempLines);
|
||||||
while fClient.Running do ;
|
while fClient.Running do ;
|
||||||
len := fTempLines.Count-1;
|
len := fTempLines.Count-1;
|
||||||
if len = -1 then
|
if len.equals(-1) then
|
||||||
updateServerlistening;
|
updateServerlistening;
|
||||||
for i := 0 to len do
|
for i := 0 to len do
|
||||||
begin
|
begin
|
||||||
|
@ -678,7 +678,7 @@ begin
|
||||||
if str.isNotEmpty then
|
if str.isNotEmpty then
|
||||||
begin
|
begin
|
||||||
i := Pos(#9, str);
|
i := Pos(#9, str);
|
||||||
if i = -1 then
|
if i.equals(-1) then
|
||||||
exit;
|
exit;
|
||||||
loc := str[i+1..str.length];
|
loc := str[i+1..str.length];
|
||||||
fname := TrimFilename(str[1..i-1]);
|
fname := TrimFilename(str[1..i-1]);
|
||||||
|
|
|
@ -1082,7 +1082,7 @@ begin
|
||||||
continue;
|
continue;
|
||||||
p += byte(t^.Data = ')');
|
p += byte(t^.Data = ')');
|
||||||
p -= byte(t^.Data = '(');
|
p -= byte(t^.Data = '(');
|
||||||
if p = -1 then
|
if p.equals(-1) then
|
||||||
begin
|
begin
|
||||||
result := t^.position;
|
result := t^.position;
|
||||||
result.x += 2;
|
result.x += 2;
|
||||||
|
@ -1111,7 +1111,7 @@ begin
|
||||||
continue;
|
continue;
|
||||||
p += byte(t^.Data = ')');
|
p += byte(t^.Data = ')');
|
||||||
p -= byte(t^.Data = '(');
|
p -= byte(t^.Data = '(');
|
||||||
if p = -1 then
|
if p.equals(-1) then
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
p := 0;
|
p := 0;
|
||||||
|
@ -1278,7 +1278,7 @@ begin
|
||||||
itm := ''
|
itm := ''
|
||||||
else if (tok^.Data = ';') or (tok^.Data = ':') or (tok^.Data = ',') then
|
else if (tok^.Data = ';') or (tok^.Data = ':') or (tok^.Data = ',') then
|
||||||
begin
|
begin
|
||||||
if (length(itm) <> 0) and (imports.IndexOf(itm) = -1) then
|
if not length(itm).equals(0) and imports.IndexOf(itm).equals(-1) then
|
||||||
imports.Add(itm);
|
imports.Add(itm);
|
||||||
itm := '';
|
itm := '';
|
||||||
if (tok^.Data = ';') or (tok^.Data = ':') then
|
if (tok^.Data = ';') or (tok^.Data = ':') then
|
||||||
|
|
|
@ -924,7 +924,7 @@ begin
|
||||||
list.Add('-gc');
|
list.Add('-gc');
|
||||||
if fGenMap then
|
if fGenMap then
|
||||||
list.Add('-map');
|
list.Add('-map');
|
||||||
if fGenFrame and (list.IndexOf('-gs') = -1) then
|
if fGenFrame and list.IndexOf('-gs').equals(-1) then
|
||||||
list.Add('-gs');
|
list.Add('-gs');
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
|
@ -946,7 +946,7 @@ begin
|
||||||
list.Add('-gc');
|
list.Add('-gc');
|
||||||
if baseopt.fGenMap or fGenMap then
|
if baseopt.fGenMap or fGenMap then
|
||||||
list.Add('-map');
|
list.Add('-map');
|
||||||
if (baseopt.fGenFrame or fGenFrame) and (list.IndexOf('-gs') = -1) then
|
if (baseopt.fGenFrame or fGenFrame) and list.IndexOf('-gs').equals(-1) then
|
||||||
list.Add('-gs');
|
list.Add('-gs');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
|
@ -1544,7 +1544,7 @@ begin
|
||||||
if (fDoc.fileName <> newdocPageCaption) then
|
if (fDoc.fileName <> newdocPageCaption) then
|
||||||
begin
|
begin
|
||||||
fSynchronizingBreakpoints:= true;
|
fSynchronizingBreakpoints:= true;
|
||||||
if fSynchronizedDocuments.IndexOf(document.fileName) = -1 then
|
if fSynchronizedDocuments.IndexOf(document.fileName).equals(-1) then
|
||||||
begin
|
begin
|
||||||
fSynchronizedDocuments.Add(document.fileName);
|
fSynchronizedDocuments.Add(document.fileName);
|
||||||
for i:= 0 to fBreakPoints.count-1 do
|
for i:= 0 to fBreakPoints.count-1 do
|
||||||
|
@ -2941,7 +2941,7 @@ const
|
||||||
var
|
var
|
||||||
nme: string;
|
nme: string;
|
||||||
begin
|
begin
|
||||||
if lstVariables.ItemIndex = -1 then
|
if lstVariables.ItemIndex.equals(-1) then
|
||||||
exit;
|
exit;
|
||||||
nme := lstVariables.Items[lstVariables.ItemIndex].Caption;
|
nme := lstVariables.Items[lstVariables.ItemIndex].Caption;
|
||||||
gdbCommand(cmd[fAddWatchPointKind] + nme);
|
gdbCommand(cmd[fAddWatchPointKind] + nme);
|
||||||
|
@ -2997,7 +2997,7 @@ begin
|
||||||
exit;
|
exit;
|
||||||
lne := StrToIntDef(lstThreads.Selected.SubItems[5], -1);
|
lne := StrToIntDef(lstThreads.Selected.SubItems[5], -1);
|
||||||
nme := lstThreads.Selected.SubItems[4];
|
nme := lstThreads.Selected.SubItems[4];
|
||||||
if not nme.fileExists or (lne = -1) then
|
if not nme.fileExists or lne.equals(-1) then
|
||||||
exit;
|
exit;
|
||||||
fDocHandler.openDocument(nme);
|
fDocHandler.openDocument(nme);
|
||||||
doc := fDocHandler.findDocument(nme);
|
doc := fDocHandler.findDocument(nme);
|
||||||
|
@ -3061,7 +3061,7 @@ begin
|
||||||
cmd := edit1.Text;
|
cmd := edit1.Text;
|
||||||
if cmd.isEmpty then
|
if cmd.isEmpty then
|
||||||
exit;
|
exit;
|
||||||
if edit1.Items.IndexOf(cmd) = -1 then
|
if edit1.Items.IndexOf(cmd).equals(-1) then
|
||||||
edit1.Items.Add(cmd);
|
edit1.Items.Add(cmd);
|
||||||
cmd := fSyms.expand(cmd);
|
cmd := fSyms.expand(cmd);
|
||||||
if (cmd.length > 1) and (cmd[1] = '>') and assigned(fInput) then
|
if (cmd.length > 1) and (cmd[1] = '>') and assigned(fInput) then
|
||||||
|
|
|
@ -523,7 +523,7 @@ procedure TLibraryManager.getLibFiles(aliases, list: TStrings);
|
||||||
if (x = 'app.d') or (x = 'main.d') then
|
if (x = 'app.d') or (x = 'main.d') then
|
||||||
continue;
|
continue;
|
||||||
e := f.extractFileExt;
|
e := f.extractFileExt;
|
||||||
if ((e = libExt) or (e = '.d')) and (list.IndexOf(f) = -1) then
|
if ((e = libExt) or (e = '.d')) and list.IndexOf(f).equals(-1) then
|
||||||
list.Add(f);
|
list.Add(f);
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
|
@ -669,7 +669,7 @@ begin
|
||||||
if b.isNotNil and b.enabled then
|
if b.isNotNil and b.enabled then
|
||||||
begin
|
begin
|
||||||
s := b.libFile;
|
s := b.libFile;
|
||||||
if (opts.IndexOf(s) = -1) and (not s.isEmpty) then
|
if opts.IndexOf(s).equals(-1) and not s.isEmpty then
|
||||||
begin
|
begin
|
||||||
opts.Add(s);
|
opts.Add(s);
|
||||||
opts.Add('-I' + b.libSourcePath);
|
opts.Add('-I' + b.libSourcePath);
|
||||||
|
|
|
@ -1101,7 +1101,7 @@ begin
|
||||||
grp := getProjectGroup;
|
grp := getProjectGroup;
|
||||||
if fProjectGroup.isNotEmpty and fProjectGroup.fileExists then
|
if fProjectGroup.isNotEmpty and fProjectGroup.fileExists then
|
||||||
grp.openGroup(fProjectGroup);
|
grp.openGroup(fProjectGroup);
|
||||||
if (fProjectIndex = -1) and assigned(dst.fFreeProj) then
|
if fProjectIndex.equals(-1) and assigned(dst.fFreeProj) then
|
||||||
dst.fFreeProj.activate
|
dst.fFreeProj.activate
|
||||||
else if (fProjectIndex >= 0) and (grp.projectCount > 0)
|
else if (fProjectIndex >= 0) and (grp.projectCount > 0)
|
||||||
and (fProjectIndex < grp.projectCount) then
|
and (fProjectIndex < grp.projectCount) then
|
||||||
|
|
|
@ -731,7 +731,7 @@ procedure TMiniExplorerWidget.lstFilesFileAdded(Sender: TObject;
|
||||||
Item: TListItem);
|
Item: TListItem);
|
||||||
begin
|
begin
|
||||||
Item.ImageIndex:=0;
|
Item.ImageIndex:=0;
|
||||||
if lstFiles.SortColumn = -1 then
|
if lstFiles.SortColumn.equals(-1) then
|
||||||
lstFIles.SortColumn := 0;
|
lstFIles.SortColumn := 0;
|
||||||
lstFiles.Sort;
|
lstFiles.Sort;
|
||||||
end;
|
end;
|
||||||
|
|
|
@ -667,7 +667,7 @@ procedure TProjectGroupWidget.btnAsyncClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
prj: TProjectGroupItem;
|
prj: TProjectGroupItem;
|
||||||
begin
|
begin
|
||||||
if lstProj.ItemIndex = -1 then
|
if lstProj.ItemIndex.equals(-1) then
|
||||||
exit;
|
exit;
|
||||||
prj := projectGroup.item[lstProj.ItemIndex];
|
prj := projectGroup.item[lstProj.ItemIndex];
|
||||||
case prj.asyncMode of
|
case prj.asyncMode of
|
||||||
|
@ -679,7 +679,7 @@ end;
|
||||||
|
|
||||||
procedure TProjectGroupWidget.btnMoveDownClick(Sender: TObject);
|
procedure TProjectGroupWidget.btnMoveDownClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if (lstProj.ItemIndex = -1) or (lstProj.ItemIndex = lstProj.Items.Count-1) then
|
if lstProj.ItemIndex.equals(-1) or lstProj.ItemIndex.equals(lstProj.Items.Count-1) then
|
||||||
exit;
|
exit;
|
||||||
projectGroup.items.Exchange(lstProj.ItemIndex, lstProj.ItemIndex + 1);
|
projectGroup.items.Exchange(lstProj.ItemIndex, lstProj.ItemIndex + 1);
|
||||||
lstProj.Items.Exchange(lstProj.ItemIndex, lstProj.ItemIndex + 1);
|
lstProj.Items.Exchange(lstProj.ItemIndex, lstProj.ItemIndex + 1);
|
||||||
|
@ -699,7 +699,7 @@ end;
|
||||||
|
|
||||||
procedure TProjectGroupWidget.btnRemProjClick(Sender: TObject);
|
procedure TProjectGroupWidget.btnRemProjClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if lstProj.ItemIndex = -1 then
|
if lstProj.ItemIndex.equals(-1) then
|
||||||
exit;
|
exit;
|
||||||
projectGroup.items.Delete(lstProj.Selected.Index);
|
projectGroup.items.Delete(lstProj.Selected.Index);
|
||||||
updateList;
|
updateList;
|
||||||
|
@ -707,7 +707,7 @@ end;
|
||||||
|
|
||||||
procedure TProjectGroupWidget.lstProjDblClick(Sender: TObject);
|
procedure TProjectGroupWidget.lstProjDblClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if lstProj.ItemIndex = -1 then
|
if lstProj.ItemIndex.equals(-1) then
|
||||||
exit;
|
exit;
|
||||||
TProjectGroupItem(lstProj.Selected.Data).lazyLoad;
|
TProjectGroupItem(lstProj.Selected.Data).lazyLoad;
|
||||||
subjProjFocused(fProjSubj, TProjectGroupItem(lstProj.Selected.Data).project);
|
subjProjFocused(fProjSubj, TProjectGroupItem(lstProj.Selected.Data).project);
|
||||||
|
@ -737,7 +737,7 @@ var
|
||||||
asc: TProjectAsyncMode;
|
asc: TProjectAsyncMode;
|
||||||
begin
|
begin
|
||||||
idx := lstProj.ItemIndex;
|
idx := lstProj.ItemIndex;
|
||||||
if idx = -1 then
|
if idx.equals(-1) then
|
||||||
begin
|
begin
|
||||||
btnMoveDown.Enabled:= false;
|
btnMoveDown.Enabled:= false;
|
||||||
btnMoveUp.Enabled:= false;
|
btnMoveUp.Enabled:= false;
|
||||||
|
@ -746,8 +746,8 @@ begin
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
btnMoveDown.Enabled:= idx <> projectGroup.projectCount-1;
|
btnMoveDown.Enabled:= not idx.equals(projectGroup.projectCount-1);
|
||||||
btnMoveUp.Enabled:= idx <> 0;
|
btnMoveUp.Enabled:= not idx.equals(0);
|
||||||
btnRemProj.Enabled:= true;
|
btnRemProj.Enabled:= true;
|
||||||
btnAsync.Enabled:= true;
|
btnAsync.Enabled:= true;
|
||||||
asc := projectGroup.item[idx].asyncMode;
|
asc := projectGroup.item[idx].asyncMode;
|
||||||
|
|
|
@ -524,7 +524,7 @@ begin
|
||||||
proj := TNativeProject(fProj.getProject);
|
proj := TNativeProject(fProj.getProject);
|
||||||
fname := Tree.Selected.Text;
|
fname := Tree.Selected.Text;
|
||||||
i := proj.Sources.IndexOf(fname);
|
i := proj.Sources.IndexOf(fname);
|
||||||
if i = -1 then
|
if i.equals(-1) then
|
||||||
exit;
|
exit;
|
||||||
fname := fProj.sourceAbsolute(i);
|
fname := fProj.sourceAbsolute(i);
|
||||||
dir := fname.extractFilePath;
|
dir := fname.extractFilePath;
|
||||||
|
|
|
@ -838,7 +838,7 @@ begin
|
||||||
// - CollapsedLineForFoldAtLine() does not handle the sub-folding.
|
// - CollapsedLineForFoldAtLine() does not handle the sub-folding.
|
||||||
// - TextView visibility is increased so this is not the standard way of getting the infos.
|
// - TextView visibility is increased so this is not the standard way of getting the infos.
|
||||||
start := fMemo.TextView.CollapsedLineForFoldAtLine(i);
|
start := fMemo.TextView.CollapsedLineForFoldAtLine(i);
|
||||||
if start = -1 then
|
if start.equals(-1) then
|
||||||
continue;
|
continue;
|
||||||
if start = prev then
|
if start = prev then
|
||||||
continue;
|
continue;
|
||||||
|
@ -1765,7 +1765,7 @@ begin
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
leftTokIndex := getIndexOfTokenLeftTo(fLexToks, CaretXY);
|
leftTokIndex := getIndexOfTokenLeftTo(fLexToks, CaretXY);
|
||||||
if (leftTokIndex = -1) or (leftTokIndex >= fLexToks.Count) then
|
if leftTokIndex.equals(-1) or (leftTokIndex >= fLexToks.Count) then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
// goto previous opened brace
|
// goto previous opened brace
|
||||||
|
@ -1774,7 +1774,7 @@ begin
|
||||||
f := fLexToks[i];
|
f := fLexToks[i];
|
||||||
b += Byte((f^.kind = ltkSymbol) and (f^.Data[1] = '}'));
|
b += Byte((f^.kind = ltkSymbol) and (f^.Data[1] = '}'));
|
||||||
b -= Byte((f^.kind = ltkSymbol) and (f^.Data[1] = '{'));
|
b -= Byte((f^.kind = ltkSymbol) and (f^.Data[1] = '{'));
|
||||||
if b = -1 then
|
if b.equals(-1) then
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
// retrieve the indent of the opened brace
|
// retrieve the indent of the opened brace
|
||||||
|
@ -2081,7 +2081,7 @@ begin
|
||||||
for i:= high(locs) downto 0 do
|
for i:= high(locs) downto 0 do
|
||||||
begin
|
begin
|
||||||
loc := locs[i];
|
loc := locs[i];
|
||||||
if loc = -1 then
|
if loc.equals(-1) then
|
||||||
continue;
|
continue;
|
||||||
BeginUndoBlock;
|
BeginUndoBlock;
|
||||||
SelStart := loc + 1;
|
SelStart := loc + 1;
|
||||||
|
|
|
@ -94,14 +94,14 @@ end;
|
||||||
procedure TToolsEditorWidget.lstToolsSelectionChange(Sender: TObject;
|
procedure TToolsEditorWidget.lstToolsSelectionChange(Sender: TObject;
|
||||||
User: boolean);
|
User: boolean);
|
||||||
begin
|
begin
|
||||||
if lstTools.ItemIndex = -1 then
|
if lstTools.ItemIndex.equals(-1) then
|
||||||
exit;
|
exit;
|
||||||
propsEd.TIObject := CustomTools[lstTools.ItemIndex];
|
propsEd.TIObject := CustomTools[lstTools.ItemIndex];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TToolsEditorWidget.propsEdModified(Sender: TObject);
|
procedure TToolsEditorWidget.propsEdModified(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if propsEd.ItemIndex = -1 then
|
if propsEd.ItemIndex.equals(-1) then
|
||||||
exit;
|
exit;
|
||||||
case propsEd.Rows[propsEd.ItemIndex].Name of
|
case propsEd.Rows[propsEd.ItemIndex].Name of
|
||||||
'toolAlias': updateToolList;
|
'toolAlias': updateToolList;
|
||||||
|
@ -123,7 +123,7 @@ procedure TToolsEditorWidget.btnCloneClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
itm: TToolItem;
|
itm: TToolItem;
|
||||||
begin
|
begin
|
||||||
if lstTools.ItemIndex = -1 then
|
if lstTools.ItemIndex.equals(-1) then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
itm := CustomTools.addTool;
|
itm := CustomTools.addTool;
|
||||||
|
@ -159,7 +159,7 @@ procedure TToolsEditorWidget.btnKillClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
p: TDexedProcess;
|
p: TDexedProcess;
|
||||||
begin
|
begin
|
||||||
if lstTools.ItemIndex = -1 then
|
if lstTools.ItemIndex.equals(-1) then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
p := CustomTools.tool[lstTools.ItemIndex].process;
|
p := CustomTools.tool[lstTools.ItemIndex].process;
|
||||||
|
@ -169,7 +169,7 @@ end;
|
||||||
|
|
||||||
procedure TToolsEditorWidget.btnRemToolClick(Sender: TObject);
|
procedure TToolsEditorWidget.btnRemToolClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if lstTools.ItemIndex = -1 then
|
if lstTools.ItemIndex.equals(-1) then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
clearInspector;
|
clearInspector;
|
||||||
|
@ -190,7 +190,7 @@ end;
|
||||||
|
|
||||||
procedure TToolsEditorWidget.btnMoveDownClick(Sender: TObject);
|
procedure TToolsEditorWidget.btnMoveDownClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if (lstTools.ItemIndex = -1) or (lstTools.ItemIndex = lstTools.Items.Count-1) then
|
if lstTools.ItemIndex.equals(-1) or lstTools.ItemIndex.equals(lstTools.Items.Count-1) then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
CustomTools.tools.Exchange(lstTools.ItemIndex, lstTools.ItemIndex + 1);
|
CustomTools.tools.Exchange(lstTools.ItemIndex, lstTools.ItemIndex + 1);
|
||||||
|
@ -200,7 +200,7 @@ end;
|
||||||
|
|
||||||
procedure TToolsEditorWidget.executeSelectedTool;
|
procedure TToolsEditorWidget.executeSelectedTool;
|
||||||
begin
|
begin
|
||||||
if lstTools.ItemIndex = -1 then
|
if lstTools.ItemIndex.equals(-1) then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
CustomTools.executeTool(lstTools.ItemIndex);
|
CustomTools.executeTool(lstTools.ItemIndex);
|
||||||
|
|
Loading…
Reference in New Issue