From 7eb1ad3bd240d574509ec8636c68a43388f1e028 Mon Sep 17 00:00:00 2001 From: Ronald1985 Date: Tue, 17 Oct 2023 21:39:56 +0100 Subject: [PATCH] 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. --- main.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.go b/main.go index ce80f0d..df1250a 100644 --- a/main.go +++ b/main.go @@ -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()