From e9682162ac908e9b9d81f3378faf8b38d1baa630 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 28 Apr 2019 12:27:06 +0200 Subject: updater: add initial skeleton --- ui/tray.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'ui/tray.go') 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.") +} -- cgit v1.2.3-59-g8ed1b