mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-07-20 15:35:25 +02:00
misc: update audio devices and language list language changes
GitLab: #964 Change-Id: I70e5ba12c237a1623667c1783ead78fed76b3bc0
This commit is contained in:
parent
ad1bc98b6e
commit
251d8d8123
2 changed files with 23 additions and 0 deletions
|
@ -38,6 +38,16 @@ ColumnLayout {
|
||||||
AUDIOMANAGER
|
AUDIOMANAGER
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: UtilsAdapter
|
||||||
|
|
||||||
|
function onChangeLanguage() {
|
||||||
|
inputAudioModel.reset()
|
||||||
|
outputAudioModel.reset()
|
||||||
|
ringtoneAudioModel.reset()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function populateAudioSettings() {
|
function populateAudioSettings() {
|
||||||
inputComboBoxSetting.modelIndex = inputComboBoxSetting.comboModel.getCurrentIndex()
|
inputComboBoxSetting.modelIndex = inputComboBoxSetting.comboModel.getCurrentIndex()
|
||||||
outputComboBoxSetting.modelIndex = outputComboBoxSetting.comboModel.getCurrentIndex()
|
outputComboBoxSetting.modelIndex = outputComboBoxSetting.comboModel.getCurrentIndex()
|
||||||
|
@ -68,6 +78,7 @@ ColumnLayout {
|
||||||
labelText: JamiStrings.microphone
|
labelText: JamiStrings.microphone
|
||||||
fontPointSize: JamiTheme.settingsFontSize
|
fontPointSize: JamiTheme.settingsFontSize
|
||||||
comboModel: AudioDeviceModel {
|
comboModel: AudioDeviceModel {
|
||||||
|
id: inputAudioModel
|
||||||
lrcInstance: LRCInstance
|
lrcInstance: LRCInstance
|
||||||
type: AudioDeviceModel.Type.Record
|
type: AudioDeviceModel.Type.Record
|
||||||
}
|
}
|
||||||
|
@ -105,6 +116,7 @@ ColumnLayout {
|
||||||
labelText: JamiStrings.outputDevice
|
labelText: JamiStrings.outputDevice
|
||||||
fontPointSize: JamiTheme.settingsFontSize
|
fontPointSize: JamiTheme.settingsFontSize
|
||||||
comboModel: AudioDeviceModel {
|
comboModel: AudioDeviceModel {
|
||||||
|
id: outputAudioModel
|
||||||
lrcInstance: LRCInstance
|
lrcInstance: LRCInstance
|
||||||
type: AudioDeviceModel.Type.Playback
|
type: AudioDeviceModel.Type.Playback
|
||||||
}
|
}
|
||||||
|
@ -129,6 +141,7 @@ ColumnLayout {
|
||||||
labelText: JamiStrings.ringtoneDevice
|
labelText: JamiStrings.ringtoneDevice
|
||||||
fontPointSize: JamiTheme.settingsFontSize
|
fontPointSize: JamiTheme.settingsFontSize
|
||||||
comboModel: AudioDeviceModel {
|
comboModel: AudioDeviceModel {
|
||||||
|
id: ringtoneAudioModel
|
||||||
lrcInstance: LRCInstance
|
lrcInstance: LRCInstance
|
||||||
type: AudioDeviceModel.Type.Ringtone
|
type: AudioDeviceModel.Type.Ringtone
|
||||||
}
|
}
|
||||||
|
|
|
@ -202,6 +202,7 @@ ColumnLayout {
|
||||||
tipText: JamiStrings.language
|
tipText: JamiStrings.language
|
||||||
fontPointSize: JamiTheme.settingsFontSize
|
fontPointSize: JamiTheme.settingsFontSize
|
||||||
comboModel: ListModel {
|
comboModel: ListModel {
|
||||||
|
id: langModel
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
var supported = UtilsAdapter.supportedLang();
|
var supported = UtilsAdapter.supportedLang();
|
||||||
var keys = Object.keys(supported);
|
var keys = Object.keys(supported);
|
||||||
|
@ -236,6 +237,15 @@ ColumnLayout {
|
||||||
themeModel.append({ textDisplay: JamiStrings.light })
|
themeModel.append({ textDisplay: JamiStrings.light })
|
||||||
themeModel.append({ textDisplay: JamiStrings.dark })
|
themeModel.append({ textDisplay: JamiStrings.dark })
|
||||||
themeComboBoxSettings.modelIndex = idx
|
themeComboBoxSettings.modelIndex = idx
|
||||||
|
|
||||||
|
var langIdx = langComboBoxSetting.modelIndex
|
||||||
|
langModel.clear()
|
||||||
|
var supported = UtilsAdapter.supportedLang();
|
||||||
|
var keys = Object.keys(supported);
|
||||||
|
for (var i = 0 ; i < keys.length ; ++i) {
|
||||||
|
langModel.append({ textDisplay: supported[keys[i]], id: keys[i] })
|
||||||
|
}
|
||||||
|
langComboBoxSetting.modelIndex = langIdx
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue