Skip to content

Commit

Permalink
Merge branch 'irp50'
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinDrab committed Jan 11, 2020
2 parents b884483 + 48efaf4 commit 15faf6e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
9 changes: 9 additions & 0 deletions gui/FillterForm.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ object FilterFrm: TFilterFrm
Height = 145
Align = alTop
TabOrder = 0
ExplicitTop = -6
object Label1: TLabel
Left = 0
Top = 13
Expand Down Expand Up @@ -200,6 +201,14 @@ object FilterFrm: TFilterFrm
TabOrder = 14
OnClick = AddButtonClick
end
object EphemeralCheckBox: TCheckBox
Left = 346
Top = 80
Width = 73
Height = 17
Caption = 'Ephemeral'
TabOrder = 15
end
end
object LowerPanel: TPanel
Left = 0
Expand Down
6 changes: 6 additions & 0 deletions gui/FillterForm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
Label6: TLabel;
NameEdit: TEdit;
ApplyButton: TButton;
EphemeralCheckBox: TCheckBox;
Procedure FormCreate(Sender: TObject);
procedure FilterTypeComboBoxChange(Sender: TObject);
procedure FilterColumnComboBoxChange(Sender: TObject);
Expand Down Expand Up @@ -267,6 +268,9 @@
Font.Color := ClBlack
Else Font.Color := ClWhite;
end;

If f.Ephemeral Then
Font.Style := Font.Style + [fsItalic];
end;

DefaultDraw := True;
Expand Down Expand Up @@ -342,6 +346,7 @@
HighlightColorColorBox.Selected := f.HighlightColor;
NegateCheckBox.Checked := f.Negate;
EnabledCheckBox.Checked := f.Enabled;
EphemeralCheckBox.Checked := f.Ephemeral;
end;
end;

Expand Down Expand Up @@ -607,6 +612,7 @@
end;

f.Enabled := EnabledCheckBox.Checked;
f.Ephemeral := EphemeralCheckBox.Checked;
FilterListViewData(FilterListView, L);
f := Nil;
Finally
Expand Down
1 change: 1 addition & 0 deletions gui/MainForm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,7 @@ procedure TMainFrm.PopupFilterClick(Sender: TObject);
rq := FModel.Selected;
rf := TRequestFilter.NewInstance(rq.RequestType);
rf.Enabled := True;
rf.Ephemeral := True;
columnType := ERequestListModelColumnType(M.Tag);
ret := rq.GetColumnValueRaw(columnType, d, l);
If ret Then
Expand Down
12 changes: 9 additions & 3 deletions gui/RequestFilter.pas
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
FIntValue : UInt64;
FRequestType : ERequestType;
FEnabled : Boolean;
FEphemeral : Boolean;
FAction : EFilterAction;
FNegate : Boolean;
FColumnName : WideString;
Expand Down Expand Up @@ -105,6 +106,7 @@
Property IntValue : UInt64 Read FIntValue;
Property RequestType : ERequesttype Read FRequestType;
Property Enabled : Boolean Read FEnabled Write SetEnable;
Property Ephemeral : Boolean Read FEphemeral Write FEphemeral;
Property Action : EFilterAction Read FAction;
Property HighlightColor : Cardinal Read FHighlightColor;
Property Negate : Boolean Read FNegate Write FNegate;
Expand Down Expand Up @@ -307,9 +309,12 @@

For rf In AList Do
begin
Result := rf.Save(iniFile);
If Not Result Then
Break;
If Not rf.Ephemeral Then
begin
Result := rf.Save(iniFile);
If Not Result Then
Break;
end;
end;
Except
Result := False;
Expand Down Expand Up @@ -701,6 +706,7 @@
Result.FStringValue := FStringValue;
Result.FIntValue := FIntValue;
Result.FEnabled := FEnabled;
Result.FEphemeral := FEphemeral;
Result.FAction := FAction;
Result.FNegate := FNegate;
Result.FColumnName := FColumnName;
Expand Down

0 comments on commit 15faf6e

Please sign in to comment.