mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-24 08:44:03 +02:00
callbuttons: hide audio only
GitLab: #729 Change-Id: Ib444fdf5515f9242bbe627d695d05fafb16214d6
This commit is contained in:
parent
f8cfb86f6a
commit
08c78f49e7
5 changed files with 27 additions and 3 deletions
|
@ -48,6 +48,7 @@ extern const QString defaultDownloadPath;
|
||||||
X(BaseZoom, 1.0) \
|
X(BaseZoom, 1.0) \
|
||||||
X(ParticipantsSide, false) \
|
X(ParticipantsSide, false) \
|
||||||
X(HideSelf, false) \
|
X(HideSelf, false) \
|
||||||
|
X(HideAudioOnly, false) \
|
||||||
X(AutoUpdate, true) \
|
X(AutoUpdate, true) \
|
||||||
X(StartMinimized, false) \
|
X(StartMinimized, false) \
|
||||||
X(ShowChatviewHorizontally, true) \
|
X(ShowChatviewHorizontally, true) \
|
||||||
|
|
|
@ -76,6 +76,7 @@ class GenericParticipantsFilterModel final : public QSortFilterProxyModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
QML_PROPERTY(bool, hideSelf)
|
QML_PROPERTY(bool, hideSelf)
|
||||||
|
QML_PROPERTY(bool, hideAudioOnly)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit GenericParticipantsFilterModel(LRCInstance* lrcInstance,
|
explicit GenericParticipantsFilterModel(LRCInstance* lrcInstance,
|
||||||
|
@ -98,6 +99,11 @@ public:
|
||||||
sourceModel()->rowCount() > 1 &&
|
sourceModel()->rowCount() > 1 &&
|
||||||
sourceModel()->data(index, CallParticipant::Role::IsLocal).toBool())
|
sourceModel()->data(index, CallParticipant::Role::IsLocal).toBool())
|
||||||
acceptState = false;
|
acceptState = false;
|
||||||
|
if (acceptState &&
|
||||||
|
hideAudioOnly_ &&
|
||||||
|
sourceModel()->rowCount() > 1 &&
|
||||||
|
sourceModel()->data(index, CallParticipant::Role::VideoMuted).toBool())
|
||||||
|
acceptState = false;
|
||||||
|
|
||||||
return acceptState;
|
return acceptState;
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,6 +253,7 @@ Item {
|
||||||
property string participantsSide: qsTr("On the side")
|
property string participantsSide: qsTr("On the side")
|
||||||
property string participantsTop: qsTr("On the top")
|
property string participantsTop: qsTr("On the top")
|
||||||
property string hideSelf: qsTr("Hide self")
|
property string hideSelf: qsTr("Hide self")
|
||||||
|
property string hideAudioOnly: qsTr("Hide participant without video")
|
||||||
|
|
||||||
// LineEditContextMenu
|
// LineEditContextMenu
|
||||||
property string copy: qsTr("Copy")
|
property string copy: qsTr("Copy")
|
||||||
|
|
|
@ -176,19 +176,25 @@ Control {
|
||||||
case JamiStrings.hideSelf:
|
case JamiStrings.hideSelf:
|
||||||
UtilsAdapter.setAppValue(Settings.HideSelf, !layoutModel.get(index).ActiveSetting)
|
UtilsAdapter.setAppValue(Settings.HideSelf, !layoutModel.get(index).ActiveSetting)
|
||||||
GenericParticipantsFilterModel.hideSelf = UtilsAdapter.getAppValue(Settings.HideSelf)
|
GenericParticipantsFilterModel.hideSelf = UtilsAdapter.getAppValue(Settings.HideSelf)
|
||||||
|
GenericParticipantsFilterModel.hideAudioOnly = UtilsAdapter.getAppValue(Settings.HideAudioOnly)
|
||||||
|
GenericParticipantsFilterModel.reset()
|
||||||
|
break
|
||||||
|
case JamiStrings.hideAudioOnly:
|
||||||
|
UtilsAdapter.setAppValue(Settings.HideAudioOnly, !layoutModel.get(index).ActiveSetting)
|
||||||
|
GenericParticipantsFilterModel.hideSelf = UtilsAdapter.getAppValue(Settings.HideSelf)
|
||||||
|
GenericParticipantsFilterModel.hideAudioOnly = UtilsAdapter.getAppValue(Settings.HideAudioOnly)
|
||||||
GenericParticipantsFilterModel.reset()
|
GenericParticipantsFilterModel.reset()
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
layoutModel.clear()
|
layoutModel.clear()
|
||||||
if (!isGrid && isConference) {
|
if (isConference) {
|
||||||
layoutModel.append({"Name": JamiStrings.mosaic,
|
layoutModel.append({"Name": JamiStrings.mosaic,
|
||||||
"IconSource": JamiResources.mosaic_black_24dp_svg,
|
"IconSource": JamiResources.mosaic_black_24dp_svg,
|
||||||
"ActiveSetting": isGrid})
|
"ActiveSetting": isGrid})
|
||||||
layoutModel.append({})
|
layoutModel.append({})
|
||||||
}
|
|
||||||
if (isConference) {
|
|
||||||
var onTheSide = UtilsAdapter.getAppValue(Settings.ParticipantsSide)
|
var onTheSide = UtilsAdapter.getAppValue(Settings.ParticipantsSide)
|
||||||
layoutModel.append({"Name": onTheSide ? JamiStrings.participantsSide : JamiStrings.participantsTop,
|
layoutModel.append({"Name": onTheSide ? JamiStrings.participantsSide : JamiStrings.participantsTop,
|
||||||
"IconSource": onTheSide ? JamiResources.ontheside_black_24dp_svg : JamiResources.onthetop_black_24dp_svg,
|
"IconSource": onTheSide ? JamiResources.ontheside_black_24dp_svg : JamiResources.onthetop_black_24dp_svg,
|
||||||
|
@ -202,6 +208,12 @@ Control {
|
||||||
layoutModel.append({"Name": JamiStrings.viewFullScreen,
|
layoutModel.append({"Name": JamiStrings.viewFullScreen,
|
||||||
"IconSource": JamiResources.open_in_full_24dp_svg,
|
"IconSource": JamiResources.open_in_full_24dp_svg,
|
||||||
"ActiveSetting": layoutManager.isCallFullscreen})
|
"ActiveSetting": layoutManager.isCallFullscreen})
|
||||||
|
if (isConference) {
|
||||||
|
layoutModel.append({})
|
||||||
|
layoutModel.append({"Name": JamiStrings.hideAudioOnly,
|
||||||
|
"IconSource": JamiResources.videocam_off_24dp_svg,
|
||||||
|
"ActiveSetting": UtilsAdapter.getAppValue(Settings.HideAudioOnly)})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Action {
|
Action {
|
||||||
|
|
|
@ -37,6 +37,7 @@ Item {
|
||||||
|
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
GenericParticipantsFilterModel.hideSelf = UtilsAdapter.getAppValue(Settings.HideSelf)
|
GenericParticipantsFilterModel.hideSelf = UtilsAdapter.getAppValue(Settings.HideSelf)
|
||||||
|
GenericParticipantsFilterModel.hideAudioOnly = UtilsAdapter.getAppValue(Settings.HideAudioOnly)
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
@ -45,6 +46,9 @@ Item {
|
||||||
function onHideSelfChanged() {
|
function onHideSelfChanged() {
|
||||||
GenericParticipantsFilterModel.reset()
|
GenericParticipantsFilterModel.reset()
|
||||||
}
|
}
|
||||||
|
function onHideAudioOnlyChanged() {
|
||||||
|
GenericParticipantsFilterModel.reset()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
|
|
Loading…
Add table
Reference in a new issue