diff --git a/linphone-desktop/assets/languages/en.ts b/linphone-desktop/assets/languages/en.ts
index 9cea97000..262fa28de 100644
--- a/linphone-desktop/assets/languages/en.ts
+++ b/linphone-desktop/assets/languages/en.ts
@@ -304,6 +304,17 @@
+
+ CallSipAddress
+
+ cancel
+ CANCEL
+
+
+ callSipAddressDescription
+ Start a new call.
+
+
CallStatistics
diff --git a/linphone-desktop/assets/languages/fr.ts b/linphone-desktop/assets/languages/fr.ts
index ece79bc0e..d35c945b1 100644
--- a/linphone-desktop/assets/languages/fr.ts
+++ b/linphone-desktop/assets/languages/fr.ts
@@ -304,6 +304,17 @@
+
+ CallSipAddress
+
+ cancel
+ ANNULER
+
+
+ callSipAddressDescription
+ Lancer un nouvel appel.
+
+
CallStatistics
diff --git a/linphone-desktop/resources.qrc b/linphone-desktop/resources.qrc
index e03ccd40d..7e44c6f72 100644
--- a/linphone-desktop/resources.qrc
+++ b/linphone-desktop/resources.qrc
@@ -367,6 +367,7 @@
ui/views/App/Calls/CallsWindow.js
ui/views/App/Calls/CallsWindow.qml
ui/views/App/Calls/Conference.qml
+ ui/views/App/Calls/Dialogs/CallSipAddress.qml
ui/views/App/Calls/Dialogs/CallTransfer.qml
ui/views/App/Calls/Dialogs/ConferenceManager.qml
ui/views/App/Calls/EndedCall.qml
@@ -420,6 +421,7 @@
ui/views/App/Styles/Calls/CallStyle.qml
ui/views/App/Styles/Calls/CallsWindowStyle.qml
ui/views/App/Styles/Calls/ConferenceStyle.qml
+ ui/views/App/Styles/Calls/Dialogs/CallSipAddressStyle.qml
ui/views/App/Styles/Calls/Dialogs/CallTransferStyle.qml
ui/views/App/Styles/Calls/Dialogs/ConferenceManagerStyle.qml
ui/views/App/Styles/Main/Assistant/ActivateLinphoneSipAccountWithEmailStyle.qml
diff --git a/linphone-desktop/src/components/contacts/ContactsListModel.cpp b/linphone-desktop/src/components/contacts/ContactsListModel.cpp
index 13bde97a1..0ddc5e544 100644
--- a/linphone-desktop/src/components/contacts/ContactsListModel.cpp
+++ b/linphone-desktop/src/components/contacts/ContactsListModel.cpp
@@ -152,9 +152,9 @@ ContactModel *ContactsListModel::addContact (VcardModel *vcardModel) {
qInfo() << QStringLiteral("Add contact from vcard:") << contact << vcardModel;
- //make sure new subscribe is issued
+ // Make sure new subscribe is issued.
mLinphoneFriends->updateSubscriptions();
-
+
int row = mList.count();
beginInsertRows(QModelIndex(), row, row);
@@ -189,22 +189,15 @@ void ContactsListModel::cleanAvatars () {
// -----------------------------------------------------------------------------
void ContactsListModel::addContact (ContactModel *contact) {
- QObject::connect(
- contact, &ContactModel::contactUpdated,
- this, [this, contact]() {
+ QObject::connect(contact, &ContactModel::contactUpdated, this, [this, contact]() {
emit contactUpdated(contact);
- }
- );
- QObject::connect(
- contact, &ContactModel::sipAddressAdded, this, [this, contact](const QString &sipAddress) {
+ });
+ QObject::connect(contact, &ContactModel::sipAddressAdded, this, [this, contact](const QString &sipAddress) {
emit sipAddressAdded(contact, sipAddress);
- }
- );
- QObject::connect(
- contact, &ContactModel::sipAddressRemoved, this, [this, contact](const QString &sipAddress) {
+ });
+ QObject::connect(contact, &ContactModel::sipAddressRemoved, this, [this, contact](const QString &sipAddress) {
emit sipAddressRemoved(contact, sipAddress);
- }
- );
+ });
mList << contact;
}
diff --git a/linphone-desktop/ui/views/App/Calls/CallsWindow.js b/linphone-desktop/ui/views/App/Calls/CallsWindow.js
index 32075e981..8c3ff67ba 100644
--- a/linphone-desktop/ui/views/App/Calls/CallsWindow.js
+++ b/linphone-desktop/ui/views/App/Calls/CallsWindow.js
@@ -35,6 +35,10 @@ function handleClosing (close) {
// -----------------------------------------------------------------------------
+function openCallSipAddress () {
+ window.attachVirtualWindow(Qt.resolvedUrl('Dialogs/CallSipAddress.qml'))
+}
+
function openConferenceManager () {
window.attachVirtualWindow(Qt.resolvedUrl('Dialogs/ConferenceManager.qml'))
}
diff --git a/linphone-desktop/ui/views/App/Calls/CallsWindow.qml b/linphone-desktop/ui/views/App/Calls/CallsWindow.qml
index fcb940e6c..2a48b7575 100644
--- a/linphone-desktop/ui/views/App/Calls/CallsWindow.qml
+++ b/linphone-desktop/ui/views/App/Calls/CallsWindow.qml
@@ -103,7 +103,8 @@ Window {
ActionButton {
icon: 'new_call'
- // TODO: launch new call
+
+ onClicked: Logic.openCallSipAddress()
}
ActionButton {
diff --git a/linphone-desktop/ui/views/App/Calls/Dialogs/CallSipAddress.qml b/linphone-desktop/ui/views/App/Calls/Dialogs/CallSipAddress.qml
new file mode 100644
index 000000000..d3dfd4cd2
--- /dev/null
+++ b/linphone-desktop/ui/views/App/Calls/Dialogs/CallSipAddress.qml
@@ -0,0 +1,92 @@
+import QtQuick 2.7
+import QtQuick.Layouts 1.3
+
+import Common 1.0
+import Linphone 1.0
+
+import App.Styles 1.0
+
+// =============================================================================
+
+DialogPlus {
+ buttons: [
+ TextButtonA {
+ text: qsTr('cancel')
+
+ onClicked: exit(0)
+ }
+ ]
+
+ centeredButtons: true
+ descriptionText: qsTr('callSipAddressDescription')
+
+ height: CallSipAddressStyle.height
+ width: CallSipAddressStyle.width
+
+ // ---------------------------------------------------------------------------
+
+ ColumnLayout {
+ anchors {
+ fill: parent
+ leftMargin: CallSipAddressStyle.leftMargin
+ rightMargin: CallSipAddressStyle.rightMargin
+ }
+
+ spacing: 0
+
+ // -------------------------------------------------------------------------
+ // Address selector.
+ // -------------------------------------------------------------------------
+
+ Item {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+
+ ColumnLayout {
+ anchors.fill: parent
+ spacing: CallSipAddressStyle.spacing
+
+ TextField {
+ id: filter
+
+ Layout.fillWidth: true
+
+ icon: 'search'
+
+ onTextChanged: sipAddressesModel.setFilter(text)
+ }
+
+ ScrollableListViewField {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+
+ SipAddressesView {
+ anchors.fill: parent
+
+ actions: [{
+ icon: 'video_call',
+ handler: function (entry) {
+ CallsListModel.launchVideoCall(entry.sipAddress)
+ exit(1)
+ }
+ }, {
+ icon: 'call',
+ handler: function (entry) {
+ CallsListModel.launchAudioCall(entry.sipAddress)
+ exit(1)
+ }
+ }]
+
+ genSipAddress: filter.text
+
+ model: SipAddressesProxyModel {
+ id: sipAddressesModel
+ }
+
+ onEntryClicked: actions[0].handler(entry)
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/linphone-desktop/ui/views/App/Styles/Calls/Dialogs/CallSipAddressStyle.qml b/linphone-desktop/ui/views/App/Styles/Calls/Dialogs/CallSipAddressStyle.qml
new file mode 100644
index 000000000..8c3d0480b
--- /dev/null
+++ b/linphone-desktop/ui/views/App/Styles/Calls/Dialogs/CallSipAddressStyle.qml
@@ -0,0 +1,12 @@
+pragma Singleton
+import QtQuick 2.7
+
+// =============================================================================
+
+QtObject {
+ property int height: 420
+ property int leftMargin: 35
+ property int rightMargin: 35
+ property int spacing: 10
+ property int width: 450
+}
diff --git a/linphone-desktop/ui/views/App/Styles/qmldir b/linphone-desktop/ui/views/App/Styles/qmldir
index 7bd9c15f2..986011f59 100644
--- a/linphone-desktop/ui/views/App/Styles/qmldir
+++ b/linphone-desktop/ui/views/App/Styles/qmldir
@@ -8,6 +8,7 @@ singleton CallStyle 1.0 Calls/CallStyle.qml
singleton CallsWindowStyle 1.0 Calls/CallsWindowStyle.qml
singleton ConferenceStyle 1.0 Calls/ConferenceStyle.qml
+singleton CallSipAddressStyle 1.0 Calls/Dialogs/CallSipAddressStyle.qml
singleton CallTransferStyle 1.0 Calls/Dialogs/CallTransferStyle.qml
singleton ConferenceManagerStyle 1.0 Calls/Dialogs/ConferenceManagerStyle.qml
diff --git a/submodules/linphone b/submodules/linphone
index 4fccaf7b8..730d42f57 160000
--- a/submodules/linphone
+++ b/submodules/linphone
@@ -1 +1 @@
-Subproject commit 4fccaf7b8f2363cd3dee4bb1c1b6f44b3f54d599
+Subproject commit 730d42f576b3567484393f37fd96d7c1abaaaadc