Skip to content

Commit

Permalink
Merge branch 'irp54'
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinDrab committed Feb 8, 2020
2 parents 17364d3 + 42f65d8 commit d9033cf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 43 deletions.
13 changes: 9 additions & 4 deletions gui/MainForm.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,10 @@ object MainFrm: TMainFrm
TabOrder = 0
object RequestTabSheet: TTabSheet
Caption = 'Requests'
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object RequestListView: TListView
Left = 0
Top = 0
Expand All @@ -895,12 +899,17 @@ object MainFrm: TMainFrm
TabOrder = 0
ViewStyle = vsReport
OnDblClick = RequestDetailsMenuItemClick
ExplicitTop = -2
end
end
object DataParsersTabSheet: TTabSheet
Caption = 'Data Parsers'
ImageIndex = 1
OnShow = DataParsersTabSheetShow
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object DataParsersListView: TListView
Left = 0
Top = 0
Expand Down Expand Up @@ -1002,10 +1011,6 @@ object MainFrm: TMainFrm
object N6: TMenuItem
Caption = '-'
end
object SortbyIDMenuItem: TMenuItem
Caption = 'Sort by ID'
OnClick = SortbyIDMenuItemClick
end
object ClearMenuItem: TMenuItem
Caption = 'Clear'
OnClick = ClearMenuItemClick
Expand Down
8 changes: 0 additions & 8 deletions gui/MainForm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
WatchedClassesMenuItem: TMenuItem;
WatchDriverNameMenuItem: TMenuItem;
WatchedDriversMenuItem: TMenuItem;
SortbyIDMenuItem: TMenuItem;
DriverMenuItem: TMenuItem;
UnloadOnExitMenuItem: TMenuItem;
UninstallOnExitMenuItem: TMenuItem;
Expand Down Expand Up @@ -94,7 +93,6 @@
procedure SaveMenuItemClick(Sender: TObject);
procedure WatchClassMenuItemClick(Sender: TObject);
procedure WatchDriverNameMenuItemClick(Sender: TObject);
procedure SortbyIDMenuItemClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure DriverMenuItemClick(Sender: TObject);
procedure Documentation1Click(Sender: TObject);
Expand Down Expand Up @@ -692,7 +690,6 @@
2 : fn := ChangeFIleExt(fn, '.bin');
end;

FModel.Sort;
FModel.SaveToFile(fn, LogSaveDialog.FilterIndex = 2, CompressMenuItem.Checked);
end;
end;
Expand All @@ -708,11 +705,6 @@
EnumerateHooks;
end;

Procedure TMainFrm.SortbyIDMenuItemClick(Sender: TObject);
begin
FModel.Sort;
end;

Procedure TMainFrm.StatusTimerTimer(Sender: TObject);
Var
err : Cardinal;
Expand Down
31 changes: 0 additions & 31 deletions gui/RequestListModel.pas
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,6 @@
Property HighlightColor : Cardinal Read FHighlightColor Write FHighlightColor;
end;

TDriverRequestComparer = Class (TComparer<TDriverRequest>)
Public
{$IFDEF FPC}
Function Compare(Constref Left, Right:TDriverRequest):Integer; Override;
{$ELSE}
Function Compare(Const Left, Right:TDriverRequest):Integer; Override;
{$ENDIF}
end;

TDriverUnloadRequest = Class (TDriverRequest)
Public
Constructor Create(Var ARequest:REQUEST_UNLOAD); Overload;
Expand Down Expand Up @@ -242,7 +233,6 @@
Constructor Create; Reintroduce;
Destructor Destroy; Override;
Function RefreshMaps:Cardinal;
Procedure Sort;

Procedure Clear; Override;
Function RowCount : Cardinal; Override;
Expand All @@ -266,16 +256,6 @@
XXXDetectedRequests, FileObjectNameXXXRequest,
ProcessXXXRequests, Utils, BinaryLogHeader;

(** TDriverRequestComparer **)

{$IFDEF FPC}
Function TDriverRequestComparer.Compare(Constref Left, Right:TDriverRequest):Integer;
{$ELSE}
Function TDriverRequestComparer.Compare(Const Left, Right:TDriverRequest):Integer;
{$ENDIF}
begin
Result := Integer(Left.Id - Right.Id);
end;

(** TDriverRequest **)

Expand Down Expand Up @@ -963,17 +943,6 @@
end;
end;

Procedure TRequestListModel.Sort;
Var
c : TDriverRequestComparer;
begin
c := TDriverRequestComparer.Create;
FRequests.Sort(c);
c.Free;
If Assigned(Displayer) Then
Displayer.Invalidate;
end;

Procedure TRequestListModel.OnAdvancedCustomDrawItemCallback(Sender: TCustomListView; Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage; var DefaultDraw: Boolean);
Var
dr : TDriverRequest;
Expand Down

0 comments on commit d9033cf

Please sign in to comment.