diff --git a/linphone-desktop/assets/languages/en.ts b/linphone-desktop/assets/languages/en.ts
index ee113cdb4..790bc8d7d 100644
--- a/linphone-desktop/assets/languages/en.ts
+++ b/linphone-desktop/assets/languages/en.ts
@@ -364,6 +364,13 @@ Server url not configured.
CONFERENCE
+
+ ConferenceControls
+
+ conference
+
+
+
ConferenceManager
diff --git a/linphone-desktop/assets/languages/fr.ts b/linphone-desktop/assets/languages/fr.ts
index e55f42f3e..333098fdc 100644
--- a/linphone-desktop/assets/languages/fr.ts
+++ b/linphone-desktop/assets/languages/fr.ts
@@ -364,6 +364,13 @@ Url du serveur non configurée.
CONFÉRENCE
+
+ ConferenceControls
+
+ conference
+
+
+
ConferenceManager
diff --git a/linphone-desktop/resources.qrc b/linphone-desktop/resources.qrc
index 68673b2df..d3e27e9df 100644
--- a/linphone-desktop/resources.qrc
+++ b/linphone-desktop/resources.qrc
@@ -297,6 +297,7 @@
ui/modules/Linphone/Calls/Calls.js
ui/modules/Linphone/Calls/Calls.qml
ui/modules/Linphone/Calls/CallStatistics.qml
+ ui/modules/Linphone/Calls/ConferenceControls.qml
ui/modules/Linphone/Chat/Chat.js
ui/modules/Linphone/Chat/Chat.qml
ui/modules/Linphone/Chat/Event.qml
diff --git a/linphone-desktop/ui/modules/Linphone/Calls/CallControls.qml b/linphone-desktop/ui/modules/Linphone/Calls/CallControls.qml
index f6fb10281..bf3209db2 100644
--- a/linphone-desktop/ui/modules/Linphone/Calls/CallControls.qml
+++ b/linphone-desktop/ui/modules/Linphone/Calls/CallControls.qml
@@ -27,7 +27,6 @@ Rectangle {
color: CallControlsStyle.color
height: CallControlsStyle.height
- width: CallControlsStyle.width
MouseArea {
anchors.fill: parent
@@ -70,11 +69,7 @@ Rectangle {
id: content
Layout.fillHeight: true
-
- Component.onCompleted: Layout.preferredWidth = data[0].width
+ Layout.preferredWidth: callControls._content[0].width
}
}
-
- // ---------------------------------------------------------------------------
-
}
diff --git a/linphone-desktop/ui/modules/Linphone/Calls/Calls.js b/linphone-desktop/ui/modules/Linphone/Calls/Calls.js
index c6c8a7a8b..42737e6ae 100644
--- a/linphone-desktop/ui/modules/Linphone/Calls/Calls.js
+++ b/linphone-desktop/ui/modules/Linphone/Calls/Calls.js
@@ -113,16 +113,14 @@ function setIndexWithCall (call) {
return
}
}
+
+ updateSelectedCall(call, -1)
}
// -----------------------------------------------------------------------------
// View handlers.
// -----------------------------------------------------------------------------
-function handleSelectedCall (call) {
- setIndexWithCall(call)
-}
-
function handleCountChanged (count) {
if (count === 0) {
return
@@ -144,7 +142,7 @@ function handleCountChanged (count) {
// -----------------------------------------------------------------------------
function handleCallRunning (call) {
- updateSelectedCall(call)
+ setIndexWithCall(call)
}
function handleRowsAboutToBeRemoved (_, first, last) {
diff --git a/linphone-desktop/ui/modules/Linphone/Calls/Calls.qml b/linphone-desktop/ui/modules/Linphone/Calls/Calls.qml
index d2d9cfe23..1b9bc22e0 100644
--- a/linphone-desktop/ui/modules/Linphone/Calls/Calls.qml
+++ b/linphone-desktop/ui/modules/Linphone/Calls/Calls.qml
@@ -26,7 +26,6 @@ ListView {
// ---------------------------------------------------------------------------
onCountChanged: Logic.handleCountChanged(count)
- onSelectedCall: Logic.handleSelectedCall(call)
Connections {
target: model
@@ -87,6 +86,14 @@ ListView {
}
}
+ // ---------------------------------------------------------------------------
+ // Conference.
+ // ---------------------------------------------------------------------------
+
+ header: ConferenceControls {
+ width: parent.width
+ }
+
// ---------------------------------------------------------------------------
// Calls.
// ---------------------------------------------------------------------------
diff --git a/linphone-desktop/ui/modules/Linphone/Calls/ConferenceControls.qml b/linphone-desktop/ui/modules/Linphone/Calls/ConferenceControls.qml
new file mode 100644
index 000000000..329a38c06
--- /dev/null
+++ b/linphone-desktop/ui/modules/Linphone/Calls/ConferenceControls.qml
@@ -0,0 +1,62 @@
+import QtQuick 2.7
+import QtQuick.Layouts 1.3
+
+import Common 1.0
+import Linphone 1.0
+import Linphone.Styles 1.0
+
+// =============================================================================
+
+Rectangle {
+ id: callControls
+
+ // ---------------------------------------------------------------------------
+
+ property alias signIcon: signIcon.icon
+ property alias textColor: text.color
+
+ // ---------------------------------------------------------------------------
+
+ signal clicked
+
+ // ---------------------------------------------------------------------------
+
+ color: CallControlsStyle.color
+ height: CallControlsStyle.height
+
+ MouseArea {
+ anchors.fill: parent
+
+ onClicked: callControls.clicked()
+ }
+
+ Icon {
+ id: signIcon
+
+ anchors {
+ left: parent.left
+ top: parent.top
+ }
+
+ iconSize: CallControlsStyle.signSize
+ }
+
+ RowLayout {
+ anchors {
+ fill: parent
+ leftMargin: CallControlsStyle.leftMargin
+ rightMargin: CallControlsStyle.rightMargin
+ }
+
+ spacing: 0
+
+ Text {
+ id: text
+
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+
+ text: qsTr('conference')
+ }
+ }
+}
diff --git a/linphone-desktop/ui/modules/Linphone/Styles/Calls/CallControlsStyle.qml b/linphone-desktop/ui/modules/Linphone/Styles/Calls/CallControlsStyle.qml
index 0151f6c15..ec1d016ca 100644
--- a/linphone-desktop/ui/modules/Linphone/Styles/Calls/CallControlsStyle.qml
+++ b/linphone-desktop/ui/modules/Linphone/Styles/Calls/CallControlsStyle.qml
@@ -11,5 +11,4 @@ QtObject {
property int leftMargin: 12
property int rightMargin: 12
property int signSize: 40
- property int width: 240
}
diff --git a/linphone-desktop/ui/views/App/Calls/AbstractStartingCall.qml b/linphone-desktop/ui/views/App/Calls/AbstractStartingCall.qml
index 33a9bc1b3..6e3318677 100644
--- a/linphone-desktop/ui/views/App/Calls/AbstractStartingCall.qml
+++ b/linphone-desktop/ui/views/App/Calls/AbstractStartingCall.qml
@@ -74,8 +74,8 @@ Rectangle {
var width = container.width
var size = height < CallStyle.container.avatar.maxSize && height > 0
- ? height
- : CallStyle.container.avatar.maxSize
+ ? height
+ : CallStyle.container.avatar.maxSize
return size < width ? size : width
}
diff --git a/linphone-desktop/ui/views/App/Calls/CallsWindow.js b/linphone-desktop/ui/views/App/Calls/CallsWindow.js
index 7098f40e1..554932a4d 100644
--- a/linphone-desktop/ui/views/App/Calls/CallsWindow.js
+++ b/linphone-desktop/ui/views/App/Calls/CallsWindow.js
@@ -33,6 +33,37 @@ function handleClosing (close) {
close.accepted = false
}
+// -----------------------------------------------------------------------------
+
function openConferenceManager () {
window.attachVirtualWindow(Qt.resolvedUrl('ConferenceManager.qml'))
}
+
+// -----------------------------------------------------------------------------
+
+function getContent () {
+ var call = window.call
+ if (call == null) {
+ return null
+ }
+
+ var status = call.status
+ if (status == null) {
+ return null
+ }
+
+ var CallModel = Linphone.CallModel
+ if (status === CallModel.CallStatusIncoming) {
+ return incomingCall
+ }
+
+ if (status === CallModel.CallStatusOutgoing) {
+ return outgoingCall
+ }
+
+ if (status === CallModel.CallStatusEnded) {
+ return endedCall
+ }
+
+ return incall
+}
diff --git a/linphone-desktop/ui/views/App/Calls/CallsWindow.qml b/linphone-desktop/ui/views/App/Calls/CallsWindow.qml
index df7da1216..35a61e9a3 100644
--- a/linphone-desktop/ui/views/App/Calls/CallsWindow.qml
+++ b/linphone-desktop/ui/views/App/Calls/CallsWindow.qml
@@ -18,7 +18,7 @@ Window {
// ---------------------------------------------------------------------------
// `{}` is a workaround to avoid `TypeError: Cannot read property...`.
- property var call: calls.selectedCall || ({
+ readonly property var call: calls.selectedCall || ({
callError: '',
isOutgoing: true,
recording: false,
@@ -187,31 +187,7 @@ Window {
childA: Loader {
anchors.fill: parent
-
- sourceComponent: {
- if (!window.call) {
- return null
- }
-
- var status = window.call.status
- if (status == null) {
- return null
- }
-
- if (status === CallModel.CallStatusIncoming) {
- return incomingCall
- }
-
- if (status === CallModel.CallStatusOutgoing) {
- return outgoingCall
- }
-
- if (status === CallModel.CallStatusEnded) {
- return endedCall
- }
-
- return incall
- }
+ sourceComponent: Logic.getContent()
}
childB: Loader {
diff --git a/linphone-desktop/ui/views/App/Calls/Conference.qml b/linphone-desktop/ui/views/App/Calls/Conference.qml
index 16ea9434a..b628c9ee5 100644
--- a/linphone-desktop/ui/views/App/Calls/Conference.qml
+++ b/linphone-desktop/ui/views/App/Calls/Conference.qml
@@ -11,6 +11,12 @@ import App.Styles 1.0
// =============================================================================
Rectangle {
+ id: conference
+
+ property var conferenceModel
+
+ // ---------------------------------------------------------------------------
+
color: CallStyle.backgroundColor
// ---------------------------------------------------------------------------
@@ -71,13 +77,13 @@ Rectangle {
iconSize: CallStyle.header.iconSize
ActionSwitch {
- enabled: conference.recording
+ enabled: conference.conferenceModel.recording
icon: 'record'
useStates: false
onClicked: !enabled
- ? conference.startRecording()
- : conference.stopRecording()
+ ? conference.conferenceModel.startRecording()
+ : conference.conferenceModel.stopRecording()
}
}
}
@@ -101,9 +107,7 @@ Rectangle {
cellHeight: ConferenceStyle.grid.cell.height
cellWidth: ConferenceStyle.grid.cell.width
- model: ConferenceModel {
- id: conference
- }
+ model: conference.conferenceModel
delegate: Item {
height: grid.cellHeight
@@ -187,7 +191,7 @@ Rectangle {
ActionButton {
icon: 'hangup'
- onClicked: conference.terminate()
+ onClicked: conference.conferenceModel.terminate()
}
}
}