sound: Prevent duplicate sound device entries

Merged velsinki requested to merge velsinki/gnome-control-center:duplicate-sound-input-fix into main

For unknown reasons, GVC mixer control can sometimes signal a new device with the same id as one that was added before. This means that in device_added_cb, a duplicate entry with that id is created, in my case with a different name. However, the last one added is valid, but that one cannot be selected because all other logic in the sound panel assumes the first hit in get_iter is valid. This breaks sound input selection then.

The fix is easy; only add a new list entry if none with that id exists.

Fixes #2403 (closed).

Edited by velsinki

Merge request reports