mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-04-29 19:54:49 +02:00
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
This commit is contained in:
parent
def2e19abe
commit
ff5f94b34a
2 changed files with 26 additions and 8 deletions
2
daemon
2
daemon
|
@ -1 +1 @@
|
|||
Subproject commit 2771304c7065de05cd78712c76f81cb643824e10
|
||||
Subproject commit 95832cfc9d5f4bd09a7f3e3e7d26d8227b1fa3f2
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue