Skip to content

Commit

Permalink
Don't try and load systray on macOS or Windows test platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Jan 17, 2024
1 parent e5bad78 commit ca3bca0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/ui/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package ui

import (
"os"
"runtime"
"strings"
"sync"

Expand Down Expand Up @@ -234,7 +235,11 @@ func (d *deskSettings) load() {
d.launcherZoomScale = 2.0
}

moduleNames := fyne.CurrentApp().Preferences().StringWithFallback("modulenames", "Battery|Brightness|Compositor|Sound|Launcher: Calculate|Launcher: Open URLs|Network|Virtual Desktops|SystemTray")
defaultModules := "Battery|Brightness|Compositor|Sound|Launcher: Calculate|Launcher: Open URLs|Network|Virtual Desktops|SystemTray"
if runtime.GOOS == "darwin" || runtime.GOOS == "windows" { // testing
defaultModules = "Battery|Brightness|Sound|Launcher: Calculate|Launcher: Open URLs|Network|Virtual Desktops"
}
moduleNames := fyne.CurrentApp().Preferences().StringWithFallback("modulenames", defaultModules)
if moduleNames != "" {
d.moduleNames = strings.Split(moduleNames, "|")
}
Expand Down

0 comments on commit ca3bca0

Please sign in to comment.