summaryrefslogtreecommitdiff
path: root/UCore.pas
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2025-01-04 20:41:26 +0100
committerTomas Bzatek <tbzatek@redhat.com>2025-11-27 21:42:57 +0100
commit90db8b6652f73ddc335922d3a7c593878d83c45e (patch)
tree6b3f8ed57d4dc3358c2965bf41f6e613b8b80bf0 /UCore.pas
parent63ff1bea9bb1e87a7e2643f680d04f2b9c00d072 (diff)
downloadtuxcmd-90db8b6652f73ddc335922d3a7c593878d83c45e.tar.xz
Basic ListView CSS styling
Diffstat (limited to 'UCore.pas')
-rw-r--r--UCore.pas22
1 files changed, 4 insertions, 18 deletions
diff --git a/UCore.pas b/UCore.pas
index 5933cd4..a41a7fd 100644
--- a/UCore.pas
+++ b/UCore.pas
@@ -175,34 +175,25 @@ var DataList: TList;
ListItem : TGTKListItem;
Ext, s, s2 : string;
SortOrder: TGTKTreeViewSortOrder;
- Time1, Time2: TDateTime;
IsRoot: boolean;
UsrManager: TUserManager;
begin
Result := False;
- try
+// try
UsrManager := nil;
if LeftPanel then DataList := LeftPanelData
else DataList := RightPanelData;
IsRoot := (Engine.Path = '/') and (not ((Engine is TVFSEngine) and (Engine as TVFSEngine).ArchiveMode));
-{ Time1 := Now;
- Time2 := Now;
- DebugMsg(['Get Listing: ', SecondOf(Time2 - Time1), ':', MillisecondOf(Time2 - Time1)]); }
- Time1 := Now;
SortColumnID := ListView.SortColumnID;
SortOrder := ListView.SortOrder;
ListView.SetSortInfo(-1, soAscending);
ClearListData(DataList);
if List.Count + Ord(not IsRoot) < ListView.Items.Count then
for i := ListView.Items.Count - 1 downto List.Count + Ord(not IsRoot) do
- ListView.Items.Delete(i);
+ ListView.Items.Delete(i);
ItemCount := ListView.Items.Count;
- Time2 := Now;
- DebugMsg(['Items clear: ', SecondOf(Time2 - Time1), ':', MillisecondOf(Time2 - Time1)]);
-
- Time1 := Now;
if ((Engine is TVFSEngine) and (Engine as TVFSEngine).ArchiveMode) or (Engine.Path <> '/') then AddUpDirItem(ListView, DataList);
if List.Count > 0 then
@@ -276,25 +267,20 @@ begin
DataList.Add(List[i]);
ListItem.Data := DataList[DataList.Count - 1];
end;
- Time2 := Now;
- DebugMsg(['Fill panel: ', SecondOf(Time2 - Time1), ':', MillisecondOf(Time2 - Time1)]);
// DebugWriteList(DataList);
if Assigned(UsrManager) then UsrManager.Free;
- Time1 := Now;
ListView.SetSortInfo(SortColumnID, SortOrder);
- Time2 := Now;
- DebugMsg(['Sorting: ', SecondOf(Time2 - Time1), ':', MillisecondOf(Time2 - Time1)]);
DebugMsg(['------------------------------']);
Result := True;
- except
+{ except
on E: Exception do begin
Application.MessageBox(Format(LANGErrorGettingListingForSPanelNoPath, [LANGPanelStrings[LeftPanel], E.Message]), [mbOK], mbError, mbNone, mbOK);
Exit;
end;
end;
-end;
+}end;
(********************************************************************************************************************************)
procedure FindNextSelected(ListView: TGTKListView; DataList: TList; var Item1, Item2: string);