aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-02-28 03:58:43 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-02-28 08:05:02 +0100
commit2c40b69ae2bda312e2c2afb596a30c440405c90a (patch)
treefe870bd30b6990d87e1d1ce01e109f3975f676c3 /ui
parentREADME: backports are missing 1.12 for now (diff)
downloadwireguard-windows-2c40b69ae2bda312e2c2afb596a30c440405c90a.tar.xz
wireguard-windows-2c40b69ae2bda312e2c2afb596a30c440405c90a.zip
ipc: implement event system with pipes
Also use Go 1.12's Sysconn
Diffstat (limited to 'ui')
-rw-r--r--ui/ui.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/ui/ui.go b/ui/ui.go
index 39d2ba23..abb528b3 100644
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -132,10 +132,9 @@ func RunUI() {
}
})
- err := service.IPCClientRegisterAsNotificationThread()
- if err != nil {
- walk.MsgBox(mw, "Unable to register for notifications", err.Error(), walk.MsgBoxIconError)
- os.Exit(1)
- }
+ service.IPCClientRegisterTunnelChange(func(tunnel string) {
+ walk.MsgBox(mw, "Tunnel Changed", "The tunnel that changed is: "+tunnel, walk.MsgBoxIconInformation)
+ })
+
mw.Run()
}