hook up playback config onchanged

This commit is contained in:
Drew Weymouth
2023-04-01 10:42:15 -07:00
parent 4740446c13
commit d84c0d71ed
5 changed files with 57 additions and 14 deletions
+6
View File
@@ -306,6 +306,12 @@ func (c *Controller) ShowAboutDialog() {
func (c *Controller) ShowSettingsDialog() {
dlg := dialogs.NewSettingsDialog(c.App.Config)
dlg.OnReplayGainSettingsChanged = func() {
c.App.PlaybackManager.SetReplayGainOptions(c.App.Config.ReplayGain)
}
dlg.OnAudioExclusiveSettingChanged = func() {
c.App.Player.SetAudioExclusive(c.App.Config.LocalPlayback.AudioExclusive)
}
pop := widget.NewModalPopUp(dlg, c.MainWindow.Canvas())
dlg.OnDismiss = func() {
pop.Hide()