diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-11-18 17:35:05 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-11-18 18:03:41 +0100 |
commit | fd718663811d8bd24e8e950012ba99ec2cbc05ef (patch) | |
tree | 9ccf02764c82f3744674c72d2a95786b5c918d2c | |
parent | declarative/TableView: Guard against invalid index, fixes #740 (diff) | |
download | wireguard-windows-fd718663811d8bd24e8e950012ba99ec2cbc05ef.tar.xz wireguard-windows-fd718663811d8bd24e8e950012ba99ec2cbc05ef.zip |
action: provide a Menu() getter
It's useful for abstractions to be able to get the Menu back out of an
action after putting it in, so this commit adds a simple accessor for
it.
-rw-r--r-- | action.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -95,6 +95,10 @@ func (a *Action) release() { } } +func (a *Action) Menu() *Menu { + return a.menu +} + func (a *Action) Checkable() bool { return a.checkable } |