aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-05-04 10:01:00 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-05-04 10:01:11 +0200
commit3dea9a4ac612fb7790fce6d1182455437bd8eea4 (patch)
treef76d8a6a959dc9f9077432bff7ba2134f0d13722 /ui
parentfirewall: do not add unused permit rules when !restrictAll (diff)
downloadwireguard-windows-3dea9a4ac612fb7790fce6d1182455437bd8eea4.tar.xz
wireguard-windows-3dea9a4ac612fb7790fce6d1182455437bd8eea4.zip
ui: show custom connected and disconnected icons in balloon
Diffstat (limited to 'ui')
-rw-r--r--ui/tray.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/tray.go b/ui/tray.go
index 4a11984a..3fed2114 100644
--- a/ui/tray.go
+++ b/ui/tray.go
@@ -255,6 +255,8 @@ func (tray *Tray) SetTunnelState(tunnel *service.Tunnel, state service.TunnelSta
wasChecked := tunnelAction.Checked()
+ icon, _ := iconProvider.IconWithOverlayForState(state)
+
switch state {
case service.TunnelStarted:
activeCIDRsAction.SetText("")
@@ -277,13 +279,13 @@ func (tray *Tray) SetTunnelState(tunnel *service.Tunnel, state service.TunnelSta
tunnelAction.SetEnabled(true)
tunnelAction.SetChecked(true)
if !wasChecked && showNotifications {
- tray.ShowInfo("WireGuard Activated", fmt.Sprintf("The %s tunnel has been activated.", tunnel.Name))
+ tray.ShowCustom("WireGuard Activated", fmt.Sprintf("The %s tunnel has been activated.", tunnel.Name), icon)
}
case service.TunnelStopped:
tunnelAction.SetChecked(false)
if wasChecked && showNotifications {
- tray.ShowInfo("WireGuard Deactivated", fmt.Sprintf("The %s tunnel has been deactivated.", tunnel.Name))
+ tray.ShowCustom("WireGuard Deactivated", fmt.Sprintf("The %s tunnel has been deactivated.", tunnel.Name), icon)
}
}
}