aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/tray.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-04-28 12:27:06 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-04-29 08:41:30 +0200
commite9682162ac908e9b9d81f3378faf8b38d1baa630 (patch)
tree1c3e6059569376c72336ba09f06e9a5ee5e1e833 /ui/tray.go
parentgo.mod: use forked winio with no thirdparty deps (diff)
downloadwireguard-windows-e9682162ac908e9b9d81f3378faf8b38d1baa630.tar.xz
wireguard-windows-e9682162ac908e9b9d81f3378faf8b38d1baa630.zip
updater: add initial skeleton
Diffstat (limited to 'ui/tray.go')
-rw-r--r--ui/tray.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/ui/tray.go b/ui/tray.go
index 22c37ab4..ca839a83 100644
--- a/ui/tray.go
+++ b/ui/tray.go
@@ -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.")
+}