diff options
author | Ruben Pollan <meskio@sindominio.net> | 2018-08-23 18:56:53 +0200 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2018-08-23 18:56:53 +0200 |
commit | 60310f3bf825989636904da411340bec8e711e2a (patch) | |
tree | f4f8c1e5b5b8cd3aee199dea4ab3cf114eb1e43e | |
parent | 7d6853c5d585bd9630792be1446dfc3c824a3b0d (diff) |
[feat] fake state on click
Let's change the systray state as soon as the user clicks on it, instead
of waiting for openvpn to notify the status change.
-rw-r--r-- | systray.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -105,14 +105,17 @@ func (bt *bmTray) onReady() { case <-bt.mTurnOn.ClickedCh: log.Println("on") + bt.changeStatus("starting") bt.bm.StartVPN(provider) bt.conf.setUserStoppedVPN(false) case <-bt.mTurnOff.ClickedCh: log.Println("off") + bt.changeStatus("stopping") bt.bm.StopVPN() bt.conf.setUserStoppedVPN(true) case <-bt.mCancel.ClickedCh: log.Println("cancel") + bt.changeStatus("stopping") bt.bm.StopVPN() bt.conf.setUserStoppedVPN(true) |