summaryrefslogtreecommitdiff
path: root/systray.go
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2018-06-08 10:26:58 +0200
committerRuben Pollan <meskio@sindominio.net>2018-06-20 12:18:03 +0200
commitfcc7514ec5f1b35068b1033d8ac4278c45043a80 (patch)
tree0ad4d5f4d650ab2a01879e4f31faedf848c39287 /systray.go
parent11094e0f58e1f28f5333a91f3c4129b56ad154e6 (diff)
[feat] pure go bitmask vpn implemenation
- Resolves: #42
Diffstat (limited to 'systray.go')
-rw-r--r--systray.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/systray.go b/systray.go
index dd8a77c..aea8d04 100644
--- a/systray.go
+++ b/systray.go
@@ -27,7 +27,7 @@ import (
)
type bmTray struct {
- bm *bitmask.Bitmask
+ bm bitmask.Bitmask
conf *systrayConfig
notify *notificator
waitCh chan bool
@@ -44,7 +44,7 @@ type gatewayTray struct {
name string
}
-func run(bm *bitmask.Bitmask, conf *systrayConfig, notify *notificator) {
+func run(bm bitmask.Bitmask, conf *systrayConfig, notify *notificator) {
bt := bmTray{bm: bm, conf: conf, notify: notify}
systray.Run(bt.onReady, bt.onExit)
}
@@ -117,13 +117,13 @@ func (bt *bmTray) onReady() {
open.Run("https://riseup.net/vpn/donate")
case <-mAbout.ClickedCh:
bitmaskVersion, err := bt.bm.Version()
+ versionStr := version
if err != nil {
log.Printf("Error getting version: %v", err)
- bt.notify.about(version)
- } else {
- versionStr := fmt.Sprintf("%s (bitmaskd %s)", version, bitmaskVersion)
- bt.notify.about(versionStr)
+ } else if bitmaskVersion != "" {
+ versionStr = fmt.Sprintf("%s (bitmaskd %s)", version, bitmaskVersion)
}
+ bt.notify.about(versionStr)
case <-mQuit.ClickedCh:
systray.Quit()