summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/config/config.go3
-rw-r--r--pkg/systray/systray.go12
2 files changed, 14 insertions, 1 deletions
diff --git a/pkg/config/config.go b/pkg/config/config.go
index af1287c..33636ae 100644
--- a/pkg/config/config.go
+++ b/pkg/config/config.go
@@ -1,6 +1,6 @@
// Code generated by go generate; DO NOT EDIT.
// This file was generated by vendorize.py
-// At 2019-08-16 12:44:37
+// At 2019-10-11 16:05:25
package config
@@ -11,6 +11,7 @@ const (
ApplicationName = "RiseupVPN"
BinaryName = "riseup-vpn"
DonateURL = "https://riseup.net/donate"
+ AskForDonations = "true"
HelpURL = "https://riseup.net/support"
TosURL = "https://riseup.net/tos"
APIURL = "https://api.black.riseup.net/"
diff --git a/pkg/systray/systray.go b/pkg/systray/systray.go
index 714852d..6bd58b8 100644
--- a/pkg/systray/systray.go
+++ b/pkg/systray/systray.go
@@ -20,6 +20,7 @@ import (
"log"
"os"
"os/signal"
+ "strconv"
"time"
"0xacab.org/leap/bitmask-vpn/icon"
@@ -88,10 +89,21 @@ func (bt *bmTray) setUpSystray() {
bt.mHelp = systray.AddMenuItem(printer.Sprintf("Help..."), "")
bt.mDonate = systray.AddMenuItem(printer.Sprintf("Donate..."), "")
+
bt.mAbout = systray.AddMenuItem(printer.Sprintf("About..."), "")
systray.AddSeparator()
bt.mQuit = systray.AddMenuItem(printer.Sprintf("Quit"), "")
+
+ showDonate, err := strconv.ParseBool(config.AskForDonations)
+ if err != nil {
+ log.Printf("Error parsing AskForDonations: %v", err)
+ showDonate = true
+ }
+ if !showDonate {
+ bt.mDonate.Hide()
+ }
+
}
func (bt *bmTray) loop(bm bitmask.Bitmask, notify *notificator, as bitmask.Autostart) {