diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-04-28 12:27:06 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-04-29 08:41:30 +0200 |
commit | 51a410523acd4687a91ff6b48e05a4c7d711126a (patch) | |
tree | 1c3e6059569376c72336ba09f06e9a5ee5e1e833 /ui/tray.go | |
parent | go.mod: use forked winio with no thirdparty deps (diff) | |
download | wireguard-windows-51a410523acd4687a91ff6b48e05a4c7d711126a.tar.xz wireguard-windows-51a410523acd4687a91ff6b48e05a4c7d711126a.zip |
updater: add initial skeleton
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui/tray.go')
-rw-r--r-- | ui/tray.go | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -278,3 +278,16 @@ func (tray *Tray) SetTunnelState(tunnel *service.Tunnel, state service.TunnelSta tray.updateGlobalState() } + +func (tray *Tray) UpdateFound() { + action := walk.NewAction() + action.SetText("An Update is Available!") + action.SetImage(iconProvider.updateAvailableImage) + //TODO: Make bold + action.Triggered().Attach(func() { + tray.mtw.Show() + tray.mtw.tabs.SetCurrentIndex(2) + }) + tray.ContextMenu().Actions().Insert(tray.ContextMenu().Actions().Len()-2, action) + tray.ShowWarning("WireGuard Update Available", "An update to WireGuard is now available. You are advised to update as soon as possible.") +} |