summaryrefslogtreecommitdiff
path: root/systray.go
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2018-05-24 01:38:27 +0200
committerRuben Pollan <meskio@sindominio.net>2018-05-24 01:38:27 +0200
commit5556a15effa0d3604085bc28306be72149d1adf1 (patch)
treeceaa7d942d8398f53f7be6d03b17d0f1c866fdbf /systray.go
parente710eec552c36b53b6be50d0be7f187f8839968c (diff)
[feat] add about page
And update links. - Resolves: #34
Diffstat (limited to 'systray.go')
-rw-r--r--systray.go16
1 files changed, 10 insertions, 6 deletions
diff --git a/systray.go b/systray.go
index e325844..add1ff2 100644
--- a/systray.go
+++ b/systray.go
@@ -28,6 +28,7 @@ import (
type bmTray struct {
bm *bitmask.Bitmask
conf *systrayConfig
+ notify *notificator
waitCh chan bool
mStatus *systray.MenuItem
mTurnOn *systray.MenuItem
@@ -42,8 +43,8 @@ type gatewayTray struct {
name string
}
-func run(bm *bitmask.Bitmask, conf *systrayConfig) {
- bt := bmTray{bm: bm, conf: conf}
+func run(bm *bitmask.Bitmask, conf *systrayConfig, notify *notificator) {
+ bt := bmTray{bm: bm, conf: conf, notify: notify}
systray.Run(bt.onReady, bt.onExit)
}
@@ -74,8 +75,9 @@ func (bt *bmTray) onReady() {
bt.addGateways()
}
- mHelp := systray.AddMenuItem(printer.Sprintf("Help ..."), "")
- bt.mDonate = systray.AddMenuItem(printer.Sprintf("Donate ..."), "")
+ mHelp := systray.AddMenuItem(printer.Sprintf("Help..."), "")
+ bt.mDonate = systray.AddMenuItem(printer.Sprintf("Donate..."), "")
+ mAbout := systray.AddMenuItem(printer.Sprintf("About..."), "")
systray.AddSeparator()
mQuit := systray.AddMenuItem(printer.Sprintf("Quit"), "")
@@ -108,10 +110,12 @@ func (bt *bmTray) onReady() {
bt.conf.setUserStoppedVPN(true)
case <-mHelp.ClickedCh:
- open.Run("https://riseup.net/vpn")
+ open.Run("https://riseup.net/vpn/support")
case <-bt.mDonate.ClickedCh:
bt.conf.setDonated()
- open.Run("https://riseup.net/donate-vpn")
+ open.Run("https://riseup.net/vpn/donate")
+ case <-mAbout.ClickedCh:
+ bt.notify.about()
case <-mQuit.ClickedCh:
systray.Quit()