diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-04 10:01:00 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-04 10:01:11 +0200 |
commit | 3dea9a4ac612fb7790fce6d1182455437bd8eea4 (patch) | |
tree | f76d8a6a959dc9f9077432bff7ba2134f0d13722 /ui/tray.go | |
parent | firewall: do not add unused permit rules when !restrictAll (diff) | |
download | wireguard-windows-3dea9a4ac612fb7790fce6d1182455437bd8eea4.tar.xz wireguard-windows-3dea9a4ac612fb7790fce6d1182455437bd8eea4.zip |
ui: show custom connected and disconnected icons in balloon
Diffstat (limited to '')
-rw-r--r-- | ui/tray.go | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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) } } } |