Skip to content

Commit

Permalink
Making the Driver menu items checked state toggled by clicking on them
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinDrab committed Jul 30, 2017
1 parent 1004834 commit 0635b2a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gui/MainForm.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,11 @@ object MainFrm: TMainFrm
Caption = 'Driver'
object UnloadOnExitMenuItem: TMenuItem
Caption = 'Unload on exit'
OnClick = DriverMenuItemClick
end
object UninstallOnExitMenuItem: TMenuItem
Caption = 'Uninstall on exit'
OnClick = DriverMenuItemClick
end
end
object ColumnsMenuItem: TMenuItem
Expand Down
9 changes: 9 additions & 0 deletions gui/MainForm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
procedure WatchDriverNameMenuItemClick(Sender: TObject);
procedure SortbyIDMenuItemClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure DriverMenuItemClick(Sender: TObject);
Private
{$IFDEF FPC}
FAppEvents: TApplicationProperties;
Expand Down Expand Up @@ -292,6 +293,14 @@
FModel.Clear;
end;

Procedure TMainFrm.DriverMenuItemClick(Sender: TObject);
Var
M : TMenuItem;
begin
M := Sender As TMenuItem;
M.Checked := Not M.Checked;
end;

Procedure TMainFrm.RefreshNameCacheMenuItemClick(Sender: TObject);
Var
err : Cardinal;
Expand Down

0 comments on commit 0635b2a

Please sign in to comment.