mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-03 16:39:36 +01:00
LazControls: Replace property Data with property Items in ListFilterEdit. Issue #22100
git-svn-id: trunk@37394 -
This commit is contained in:
parent
910d439bb1
commit
4c1213e99f
@ -55,7 +55,8 @@ type
|
||||
procedure RestoreSelection; override;
|
||||
public
|
||||
property SelectionList: TStringList read fSelectionList;
|
||||
property Data: TStringList read fOriginalData;
|
||||
property Items: TStringList read fOriginalData;
|
||||
property Data: TStringList read fOriginalData; deprecated 'Use property Items instead';
|
||||
published
|
||||
property FilteredListbox: TCustomListBox read fFilteredListbox write SetFilteredListbox;
|
||||
end;
|
||||
|
||||
@ -194,7 +194,7 @@ begin
|
||||
begin
|
||||
AComponent := FComponentList[i];
|
||||
AClassName := AComponent.ComponentClass.ClassName;
|
||||
ListFilterEd.Data.AddObject(AClassName, AComponent);
|
||||
ListFilterEd.Items.AddObject(AClassName, AComponent);
|
||||
end;
|
||||
finally
|
||||
ComponentsListbox.Items.EndUpdate;
|
||||
|
||||
@ -271,7 +271,7 @@ begin
|
||||
// First move the source editor tab
|
||||
SrcEdit.SourceNotebook.MoveEditor(SrcEdit.PageIndex, SrcEdit.PageIndex+1);
|
||||
// Then switch the list items
|
||||
FilterEdit.Data.Exchange(i, i+1); // CheckListBox1.Items.Exchange(i, i+1);
|
||||
FilterEdit.Items.Exchange(i, i+1);
|
||||
FilterEdit.InvalidateFilter;
|
||||
UpdateMoveButtons(i+1);
|
||||
end;
|
||||
@ -291,7 +291,7 @@ begin
|
||||
// First move the source editor tab
|
||||
SrcEdit.SourceNotebook.MoveEditor(SrcEdit.PageIndex, SrcEdit.PageIndex-1);
|
||||
// Then switch the list items
|
||||
FilterEdit.Data.Exchange(i, i-1);
|
||||
FilterEdit.Items.Exchange(i, i-1);
|
||||
FilterEdit.InvalidateFilter;
|
||||
UpdateMoveButtons(i-1);
|
||||
end;
|
||||
@ -331,7 +331,7 @@ var
|
||||
sw: TSourceNotebook;
|
||||
Modi: String;
|
||||
begin
|
||||
FilterEdit.Data.Clear;
|
||||
FilterEdit.Items.Clear;
|
||||
with SourceEditorManager do
|
||||
for i:=0 to SourceWindowCount-1 do begin
|
||||
sw:=SourceWindows[i];
|
||||
@ -342,7 +342,7 @@ begin
|
||||
Modi:='* '
|
||||
else
|
||||
Modi:='';
|
||||
FilterEdit.Data.Add(Modi+SrcEdit.FileName);
|
||||
FilterEdit.Items.Add(Modi+SrcEdit.FileName);
|
||||
end;
|
||||
end;
|
||||
FilterEdit.InvalidateFilter;
|
||||
|
||||
@ -104,7 +104,7 @@ end;
|
||||
|
||||
destructor TCompilerMessagesOptionsFrame.Destroy;
|
||||
begin
|
||||
editMsgFilter.Data.Clear;
|
||||
editMsgFilter.Items.Clear;
|
||||
chklistCompMsg.Clear;
|
||||
chklistCompMsg.Items.Clear;
|
||||
TempMessages.Free;
|
||||
@ -142,14 +142,14 @@ begin
|
||||
MsgFileBrowseButton.Enabled:=UseMsgFileCheckBox.Checked;
|
||||
|
||||
// Copy data to filter component
|
||||
editMsgFilter.Data.Clear;
|
||||
editMsgFilter.Items.Clear;
|
||||
for i := 0 to TempMessages.Count - 1 do
|
||||
begin
|
||||
m := TempMessages.Msg[i];
|
||||
if m.MsgType in [etNote, etHint, etWarning] then
|
||||
begin
|
||||
s := Format('(%s) %s', [MsgTypeStr[m.MsgType], m.GetUserText([])]);
|
||||
editMsgFilter.Data.AddObject(s, m);
|
||||
editMsgFilter.Items.AddObject(s, m);
|
||||
end;
|
||||
end;
|
||||
editMsgFilter.InvalidateFilter;
|
||||
|
||||
@ -104,7 +104,7 @@ type
|
||||
|
||||
procedure TListFileSearcher.DoFileFound;
|
||||
begin
|
||||
fForm.ProjectFilter.Data.Add(FileName) // fForm.ProjectsListBox.Items.Add(FileName)
|
||||
fForm.ProjectFilter.Items.Add(FileName);
|
||||
end;
|
||||
|
||||
constructor TListFileSearcher.Create(aForm: TManageExamplesForm);
|
||||
@ -227,7 +227,7 @@ begin
|
||||
try
|
||||
Screen.Cursor:=crHourGlass;
|
||||
Application.ProcessMessages;
|
||||
ProjectFilter.Data.Clear; // ProjectsListBox.Items.Clear;
|
||||
ProjectFilter.Items.Clear;
|
||||
Searcher:=TListFileSearcher.Create(Self);
|
||||
Searcher.Search(RootDirectoryEdit.Text, '*.lpi');
|
||||
ProjectFilter.InvalidateFilter;
|
||||
|
||||
@ -100,11 +100,11 @@ begin
|
||||
// automatic choice of dest uses-section by cursor position
|
||||
UseUnitDlg.DetermineUsesSection(SrcEdit.CodeBuffer, SrcEdit.GetCursorTextXY);
|
||||
|
||||
if UseUnitDlg.FilterEdit.Data.Count = 0 then
|
||||
if UseUnitDlg.FilterEdit.Items.Count = 0 then
|
||||
// no available units from current project => turn on "all units"
|
||||
UseUnitDlg.AllUnitsCheckBox.Checked := True;
|
||||
|
||||
if UseUnitDlg.FilterEdit.Data.Count = 0 then begin
|
||||
if UseUnitDlg.FilterEdit.Items.Count = 0 then begin
|
||||
// No available units. This may not be a pascal source file.
|
||||
ShowMessage(dlgNoAvailableUnits);
|
||||
Exit(mrCancel);
|
||||
@ -168,9 +168,9 @@ begin
|
||||
if InterfaceSelected then
|
||||
AddImplUsedUnits
|
||||
else
|
||||
for i := FilterEdit.Data.Count - 1 downto 0 do
|
||||
if FilterEdit.Data.Objects[i] is TCodeTreeNode then
|
||||
FilterEdit.Data.Delete(i);
|
||||
for i := FilterEdit.Items.Count - 1 downto 0 do
|
||||
if FilterEdit.Items.Objects[i] is TCodeTreeNode then
|
||||
FilterEdit.Items.Delete(i);
|
||||
FilterEdit.InvalidateFilter;
|
||||
if Visible then
|
||||
FilterEdit.SetFocus;
|
||||
@ -184,12 +184,12 @@ begin
|
||||
if AllUnitsCheckBox.Checked then begin // Add other units
|
||||
if not Assigned(FOtherUnits) then
|
||||
CreateOtherUnitsList;
|
||||
FilterEdit.Data.AddStrings(FOtherUnits);
|
||||
FilterEdit.Items.AddStrings(FOtherUnits);
|
||||
end
|
||||
else
|
||||
for i := FilterEdit.Data.Count-1 downto 0 do
|
||||
if FilterEdit.Data.Objects[i] is TIdentifierListItem then
|
||||
FilterEdit.Data.Delete(i);
|
||||
for i := FilterEdit.Items.Count-1 downto 0 do
|
||||
if FilterEdit.Items.Objects[i] is TIdentifierListItem then
|
||||
FilterEdit.Items.Delete(i);
|
||||
if Visible then
|
||||
FilterEdit.SetFocus;
|
||||
FilterEdit.InvalidateFilter;
|
||||
@ -248,7 +248,7 @@ begin
|
||||
i := 0; j := 0;
|
||||
ImplNode := FImplUsedUnits.Objects[0];
|
||||
newUnit := FImplUsedUnits[j];
|
||||
with FilterEdit.Data do
|
||||
with FilterEdit.Items do
|
||||
begin
|
||||
BeginUpdate;
|
||||
try
|
||||
@ -408,13 +408,13 @@ var
|
||||
begin
|
||||
if not (Assigned(FMainUsedUnits) and Assigned(FImplUsedUnits)) then Exit;
|
||||
if not Assigned(FProjUnits) then Exit;
|
||||
FilterEdit.Data.Clear;
|
||||
FilterEdit.Items.Clear;
|
||||
for i := 0 to FProjUnits.Count - 1 do
|
||||
begin
|
||||
curUnit := FProjUnits[i];
|
||||
if (FMainUsedUnits.IndexOf(curUnit) < 0)
|
||||
and (FImplUsedUnits.IndexOf(curUnit) < 0) then
|
||||
FilterEdit.Data.Add(FProjUnits[i]);
|
||||
FilterEdit.Items.Add(FProjUnits[i]);
|
||||
end;
|
||||
FilterEdit.InvalidateFilter;
|
||||
end;
|
||||
|
||||
@ -116,7 +116,7 @@ begin
|
||||
// Data items
|
||||
for i:=0 to Entries.Count-1 do begin
|
||||
UEntry:=TViewUnitsEntry(Entries.Objects[i]);
|
||||
FilterEdit.Data.Add(UEntry.Name);
|
||||
FilterEdit.Items.Add(UEntry.Name);
|
||||
end;
|
||||
FilterEdit.InvalidateFilter;
|
||||
// Initial selection
|
||||
|
||||
Loading…
Reference in New Issue
Block a user