Commit f65938cc authored by Adrian Georgescu's avatar Adrian Georgescu

Switch to the new plugged-in device automatically if we have active sessions

parent 21970068
......@@ -565,7 +565,7 @@ class MainWindow(base_class, ui_class):
for action in self.alert_device_menu.actions():
self.alert_devices_group.removeAction(action)
self.alert_device_menu.removeAction(action)
# TODO replace the following code with a device switch choosing window
if self.session_model.active_sessions:
old_devices = set(notification.data.old_devices)
new_devices = set(notification.data.new_devices)
added_devices = new_devices - old_devices
......@@ -575,6 +575,7 @@ class MainWindow(base_class, ui_class):
settings.audio.input_device = new_device
settings.audio.output_device = new_device
settings.save()
# TODO: Add a confirmation window when no active sessions
self.load_audio_devices()
def _NH_CFGSettingsObjectDidChange(self, notification):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment