From 6c0bb455c72671fcb8fcd776bc14e0ab31310eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= <sebastien.blin@savoirfairelinux.com> Date: Fri, 7 Apr 2023 15:09:40 -0400 Subject: [PATCH] audiosettings: select correct audio manager Else, on GNU/Linux it will select "alsa" in the UI. Also AVSettingsPage is unused. Change-Id: I5744b2c8dc02b65d97e6ea2bf8dcec477ae0042c --- src/app/settingsview/SettingsView.qml | 6 -- .../components/AudioSettingsPage.qml | 3 +- .../settingsview/components/AvSettingPage.qml | 68 ------------------- 3 files changed, 2 insertions(+), 75 deletions(-) delete mode 100644 src/app/settingsview/components/AvSettingPage.qml diff --git a/src/app/settingsview/SettingsView.qml b/src/app/settingsview/SettingsView.qml index 1021282aa..ff7b2760d 100644 --- a/src/app/settingsview/SettingsView.qml +++ b/src/app/settingsview/SettingsView.qml @@ -78,12 +78,6 @@ ListSelectionView { property int selectedMenu: index - onSelectedMenuChanged: { - if (selectedMenu === SettingsView.Media) { - avSettings.populateAVSettings() - } - } - rightPaneItem: StackView { id: settingsView objectName: "settingsView" diff --git a/src/app/settingsview/components/AudioSettingsPage.qml b/src/app/settingsview/components/AudioSettingsPage.qml index de2e919f3..a91a2ba92 100644 --- a/src/app/settingsview/components/AudioSettingsPage.qml +++ b/src/app/settingsview/components/AudioSettingsPage.qml @@ -182,6 +182,8 @@ SettingsPageBase { widthOfComboBox: itemWidth role: "ID_UTF8" + Component.onCompleted: currentAccountEnableColumnLayout.populateAudioSettings() + onActivated: { AvAdapter.stopAudioMeter() var selectedAudioManager = comboModel.data( @@ -193,4 +195,3 @@ SettingsPageBase { } } } - diff --git a/src/app/settingsview/components/AvSettingPage.qml b/src/app/settingsview/components/AvSettingPage.qml deleted file mode 100644 index d1f190f72..000000000 --- a/src/app/settingsview/components/AvSettingPage.qml +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2019-2023 Savoir-faire Linux Inc. - * Author: Yang Wang <yang.wang@savoirfairelinux.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -import QtQuick -import QtQuick.Layouts - -import net.jami.Models 1.1 -import net.jami.Adapters 1.1 -import net.jami.Constants 1.1 - -import "../../commoncomponents" - -Rectangle { - id: root - - property int preferredColumnWidth: Math.min(root.width / 2 - 50, 275) - property int contentWidth: avSettingsColumnLayout.width - property int preferredHeight: avSettingsColumnLayout.implicitHeight - - function populateAVSettings() { - audioSettings.populateAudioSettings() - } - - color: JamiTheme.secondaryBackgroundColor - - ColumnLayout { - id: avSettingsColumnLayout - - anchors.horizontalCenter: root.horizontalCenter - - width: Math.min(JamiTheme.maximumWidthSettingsView, root.width) - - AudioSettings { - id: audioSettings - - Layout.fillWidth: true - Layout.leftMargin: JamiTheme.preferredMarginSize - Layout.rightMargin: JamiTheme.preferredMarginSize - - itemWidth: preferredColumnWidth - } - - VideoSettings { - id: videoSettings - - Layout.fillWidth: true - Layout.leftMargin: JamiTheme.preferredMarginSize - Layout.rightMargin: JamiTheme.preferredMarginSize - - itemWidth: preferredColumnWidth - } - } -} -- GitLab