Skip to content

Commit d5d3ae2

Browse files
committed
use updated systray package
1 parent f153d14 commit d5d3ae2

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

hub.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,10 @@ func checkCmd(m []byte) {
241241
go broadcast(s)
242242
} else if strings.HasPrefix(sl, "restart") {
243243
log.Println("Received restart from the daemon. Why? Boh")
244+
quitSystray()
244245
restart("")
245246
} else if strings.HasPrefix(sl, "exit") {
247+
quitSystray()
246248
exit()
247249
} else if strings.HasPrefix(sl, "memstats") {
248250
memoryStats()

trayicon.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ import (
3434
"runtime"
3535

3636
log "github.com/Sirupsen/logrus"
37-
"github.com/facchinm/systray"
3837
"github.com/facchinm/systray/example/icon"
38+
"github.com/getlantern/systray"
3939
"github.com/skratchdot/open-golang/open"
4040
"go.bug.st/serial.v1"
4141
)
@@ -117,6 +117,7 @@ func setupSysTrayHibernate() {
117117
<-mOpen.ClickedCh
118118
*hibernate = false
119119
log.Println("Restart for hubernation")
120+
systray.Quit()
120121
restart("")
121122
}()
122123

@@ -126,3 +127,7 @@ func setupSysTrayHibernate() {
126127
exit()
127128
}()
128129
}
130+
131+
func quitSystray() {
132+
systray.Quit()
133+
}

trayicon_linux_arm.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@ func setupSysTray() {
3636
func addRebootTrayElement() {
3737
select {}
3838
}
39+
40+
func quitSystray() {
41+
}

0 commit comments

Comments
 (0)