bugfixes
This commit is contained in:
parent
57b7e9ff91
commit
f6fac480fb
@ -63,7 +63,7 @@ echo wsl --install -d Debian
|
||||
echo.
|
||||
echo In Debian danach die Build-Abhaengigkeiten installieren:
|
||||
echo sudo apt update
|
||||
echo sudo apt install -y build-essential pkg-config libgtk-3-dev libayatana-appindicator3-dev
|
||||
echo sudo apt install -y build-essential pkg-config
|
||||
echo.
|
||||
call :cleanup_cache
|
||||
exit /b 1
|
||||
@ -89,7 +89,7 @@ echo In WSL fehlen Build-Abhaengigkeiten fuer den Linux-Build.
|
||||
echo.
|
||||
echo In Debian installieren:
|
||||
echo sudo apt update
|
||||
echo sudo apt install -y build-essential pkg-config libgtk-3-dev libayatana-appindicator3-dev
|
||||
echo sudo apt install -y build-essential pkg-config
|
||||
echo.
|
||||
call :cleanup_cache
|
||||
exit /b 1
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -1108,6 +1108,6 @@ func main() {
|
||||
}
|
||||
}()
|
||||
|
||||
runTray(shutdown, buildTrayStats)
|
||||
runTray(appCtx, shutdown, buildTrayStats)
|
||||
shutdown()
|
||||
}
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
//go:build windows
|
||||
|
||||
// backend\tray.go
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
_ "embed"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
@ -16,7 +19,7 @@ import (
|
||||
//go:embed assets/img/tray.ico
|
||||
var trayIcon []byte
|
||||
|
||||
func runTray(onQuit func(), statsFn func() TrayStats) {
|
||||
func runTray(ctx context.Context, onQuit func(), statsFn func() TrayStats) {
|
||||
systray.Run(func() {
|
||||
if len(trayIcon) > 0 {
|
||||
systray.SetIcon(trayIcon)
|
||||
@ -98,6 +101,11 @@ func runTray(onQuit func(), statsFn func() TrayStats) {
|
||||
|
||||
updateStatus()
|
||||
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
systray.Quit()
|
||||
}()
|
||||
|
||||
go func() {
|
||||
ticker := time.NewTicker(2 * time.Second)
|
||||
defer ticker.Stop()
|
||||
|
||||
11
backend/tray_other.go
Normal file
11
backend/tray_other.go
Normal file
@ -0,0 +1,11 @@
|
||||
//go:build !windows
|
||||
|
||||
package main
|
||||
|
||||
import "context"
|
||||
|
||||
func runTray(ctx context.Context, onQuit func(), statsFn func() TrayStats) {
|
||||
_ = onQuit
|
||||
_ = statsFn
|
||||
<-ctx.Done()
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user