Compare commits

..

1 Commits

Author SHA1 Message Date
ff5f94b34a settings: update devices list when devices changed
When a new device is connected/disconnected update audio devices list in
the media settings.

This commit also bumps jami-daemon to support DevicesChanged events on
Windows.

Gitlab: #689
Gitlab: #1878
Change-Id: Ibb607939897853794fdbd09eab72f378257d458c
2025-04-24 13:14:28 -04:00
2 changed files with 26 additions and 8 deletions

2
daemon

Submodule daemon updated: 2771304c70...95832cfc9d

View File

@ -25,7 +25,7 @@ import "../../commoncomponents"
SettingsPageBase {
id: root
property int itemWidth: 188
property int itemWidth: 250
title: JamiStrings.audio
flickableContent: ColumnLayout {
@ -45,16 +45,34 @@ SettingsPageBase {
target: UtilsAdapter
function onChangeLanguage() {
inputAudioModel.reset();
outputAudioModel.reset();
ringtoneAudioModel.reset();
rootLayout.resetDeviceModels();
rootLayout.resetDeviceIndices();
}
}
function resetDeviceModels() {
inputAudioModel.reset();
outputAudioModel.reset();
ringtoneAudioModel.reset();
}
function resetDeviceIndices() {
inputComboBoxSetting.modelIndex = inputComboBoxSetting.comboModel.getCurrentIndex();
outputComboBoxSetting.modelIndex = outputComboBoxSetting.comboModel.getCurrentIndex();
ringtoneComboBoxSetting.modelIndex = ringtoneComboBoxSetting.comboModel.getCurrentIndex();
}
Connections {
target: AvAdapter
function onAudioDeviceListChanged(inputs, outputs) {
rootLayout.resetDeviceModels();
rootLayout.resetDeviceIndices();
}
}
function populateAudioSettings() {
inputComboBoxSetting.modelIndex = inputComboBoxSetting.comboModel.getCurrentIndex();
outputComboBoxSetting.modelIndex = outputComboBoxSetting.comboModel.getCurrentIndex();
ringtoneComboBoxSetting.modelIndex = ringtoneComboBoxSetting.comboModel.getCurrentIndex();
rootLayout.resetDeviceIndices();
if (audioManagerComboBoxSetting.comboModel.rowCount() > 0) {
audioManagerComboBoxSetting.modelIndex = audioManagerComboBoxSetting.comboModel.getCurrentSettingIndex();
}