Rename MP3File to WAVFile, as now using wav files

Also fix DarkMode.  Previously it wouldn't matter what was specified in
the config file for Eye-Reminder, we always used light mode.
master
Ronald1985 2 years ago
parent 45142d2596
commit 7eb1ad3bd2

@ -27,14 +27,14 @@ import (
const (
DEFAULT_TIME_INBETWEEN_NOTIFICATIONS = 20 * time.Minute
EYE_REMINDER_ICON_URL = "https://gitea.ronald1985.uk/ronald1985/Eye-Reminder/raw/branch/master/assets/Eye-Reminder-Icon.png"
DEFAULT_CONFIG_FILE = "Interval: 20\nSoundEnabled: false\nMP3File: \"\"\nDarkTheme: true"
DEFAULT_CONFIG_FILE = "Interval: 20\nSoundEnabled: false\nWAVFile: \"\"\nDarkTheme: true"
)
type Config struct {
Interval int `yaml:"Interval"`
SoundEnabled bool `yaml:"SoundEnabled"`
WAVFile string `yaml:"MP3File"`
darkTheme bool `yaml:"DarkTheme"`
WAVFile string `yaml:"WAVFile"`
DarkTheme bool `yaml:"DarkTheme"`
imageLocation string
}
@ -202,7 +202,7 @@ func systrayOnReady() {
)
systray.AddSeparator()
mDarkThemeEnabled := systray.AddMenuItemCheckbox(
"Dark mode enabled", "Whether the dark theme icons are used", ProgramConfig.darkTheme,
"Dark mode enabled", "Whether the dark theme icons are used", ProgramConfig.DarkTheme,
)
systray.AddSeparator()
mQuitOrig := systray.AddMenuItem("Quit", "Quit the whole app")
@ -229,7 +229,7 @@ func systrayOnReady() {
mStopSound.Enable()
if ProgramConfig.darkTheme {
if ProgramConfig.DarkTheme {
systray.SetIcon(lightmusicicon.Data)
} else {
systray.SetIcon(darkmusicicon.Data)
@ -285,7 +285,7 @@ func systrayOnReady() {
case <-mStopSound.ClickedCh:
stopSound = true
case <-mDarkThemeEnabled.ClickedCh:
ProgramConfig.darkTheme = !ProgramConfig.darkTheme
ProgramConfig.DarkTheme = !ProgramConfig.DarkTheme
if mDarkThemeEnabled.Checked() {
mDarkThemeEnabled.Uncheck()

Loading…
Cancel
Save