summaryrefslogtreecommitdiff
path: root/notificator.go
diff options
context:
space:
mode:
Diffstat (limited to 'notificator.go')
-rw-r--r--notificator.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/notificator.go b/notificator.go
index d57e931..07e1b26 100644
--- a/notificator.go
+++ b/notificator.go
@@ -16,6 +16,7 @@
package main
import (
+ "io/ioutil"
"os"
"path"
"runtime"
@@ -71,6 +72,12 @@ func (n *notificator) donations() {
}
func (n *notificator) about(version string) {
+ if version == "" && os.Getenv("SNAP") != "" {
+ _version, err := ioutil.ReadFile(os.Getenv("SNAP") + "/snap/version.txt")
+ if err == nil {
+ version = string(_version)
+ }
+ }
dialog.Message(printer.Sprintf(aboutText, applicationName, version)).
Title(printer.Sprintf("About")).
Icon(getIconPath()).