Skip to content

player: Synchronize Player and PlayerPlaylist repeat_mode

Marinus Schraal requested to merge cherry-pick-0d474cb4 into gnome-3-30

Repeat mode is saved in a setting. PlayerToolbar repeat_mode property is initialized from this setting and listens to its changes.

There are two ways to change the repeat mode. First, from the PlayerToolbar. It updates an action associated with the setting. This change triggers the 'changed::repeat' signal of the setting which updates PlayerPlaylist repeat_mode property. It also updates Player repeat_mode property because of a binding. However, this binding is unidirectional. It is also possible to change the repeat mode by using shortcuts (for example Ctrl + r). This updates Player repeat_mode property but not the PlayerPlaylist one as the binding is unidirectional. Therefore, the player toolbar icon is not updated and the setting is unchanged.

Make the binding bidirectional to fix this issue. Create the binding at instantion time because it does not need to be updated when a playlist changes. Update The repeat setting in PlayerPlaylist repeat_mode setter.

(cherry picked from commit 0d474cb4)

Merge request reports