Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
3de09416
Commit
3de09416
authored
Mar 22, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/Calls/CallsWindow): handle correctly close
parent
e4076f8e
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
61 additions
and
0 deletions
+61
-0
en.ts
linphone-desktop/assets/languages/en.ts
+4
-0
fr.ts
linphone-desktop/assets/languages/fr.ts
+4
-0
resources.qrc
linphone-desktop/resources.qrc
+1
-0
CallsListModel.cpp
linphone-desktop/src/components/calls/CallsListModel.cpp
+10
-0
CallsListModel.hpp
linphone-desktop/src/components/calls/CallsListModel.hpp
+4
-0
CallsWindow.js
linphone-desktop/ui/views/App/Calls/CallsWindow.js
+30
-0
CallsWindow.qml
linphone-desktop/ui/views/App/Calls/CallsWindow.qml
+8
-0
No files found.
linphone-desktop/assets/languages/en.ts
View file @
3de09416
...
@@ -219,6 +219,10 @@
...
@@ -219,6 +219,10 @@
<
source
>
callsTitle
<
/source
>
<
source
>
callsTitle
<
/source
>
<
translation
>
Calls
<
/translation
>
<
translation
>
Calls
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
source
>
acceptClosingDescription
<
/source
>
<
translation
>
Are
you
sure
you
want
to
terminate
all
calls
?
<
/translation
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
context
>
<
name
>
Chat
<
/name
>
<
name
>
Chat
<
/name
>
...
...
linphone-desktop/assets/languages/fr.ts
View file @
3de09416
...
@@ -219,6 +219,10 @@
...
@@ -219,6 +219,10 @@
<
source
>
callsTitle
<
/source
>
<
source
>
callsTitle
<
/source
>
<
translation
>
Appels
<
/translation
>
<
translation
>
Appels
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
source
>
acceptClosingDescription
<
/source
>
<
translation
>
Voulez
-
vous
vraiment
quitter
tous
vos
appels
en
cours
?
<
/translation
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
context
>
<
name
>
Chat
<
/name
>
<
name
>
Chat
<
/name
>
...
...
linphone-desktop/resources.qrc
View file @
3de09416
...
@@ -311,6 +311,7 @@
...
@@ -311,6 +311,7 @@
<file>
ui/scripts/Utils/uri-tools.js
</file>
<file>
ui/scripts/Utils/uri-tools.js
</file>
<file>
ui/scripts/Utils/utils.js
</file>
<file>
ui/scripts/Utils/utils.js
</file>
<file>
ui/views/App/Calls/AbstractStartingCall.qml
</file>
<file>
ui/views/App/Calls/AbstractStartingCall.qml
</file>
<file>
ui/views/App/Calls/CallsWindow.js
</file>
<file>
ui/views/App/Calls/CallsWindow.qml
</file>
<file>
ui/views/App/Calls/CallsWindow.qml
</file>
<file>
ui/views/App/Calls/IncallFullscreenWindow.qml
</file>
<file>
ui/views/App/Calls/IncallFullscreenWindow.qml
</file>
<file>
ui/views/App/Calls/Incall.js
</file>
<file>
ui/views/App/Calls/Incall.js
</file>
...
...
linphone-desktop/src/components/calls/CallsListModel.cpp
View file @
3de09416
...
@@ -138,6 +138,16 @@ void CallsListModel::launchVideoCall (const QString &sip_uri) const {
...
@@ -138,6 +138,16 @@ void CallsListModel::launchVideoCall (const QString &sip_uri) const {
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
int
CallsListModel
::
getRunningCallsNumber
()
const
{
return
CoreManager
::
getInstance
()
->
getCore
()
->
getCallsNb
();
}
void
CallsListModel
::
terminateAllCalls
()
const
{
CoreManager
::
getInstance
()
->
getCore
()
->
terminateAllCalls
();
}
// -----------------------------------------------------------------------------
bool
CallsListModel
::
removeRow
(
int
row
,
const
QModelIndex
&
parent
)
{
bool
CallsListModel
::
removeRow
(
int
row
,
const
QModelIndex
&
parent
)
{
return
removeRows
(
row
,
1
,
parent
);
return
removeRows
(
row
,
1
,
parent
);
}
}
...
...
linphone-desktop/src/components/calls/CallsListModel.hpp
View file @
3de09416
...
@@ -48,6 +48,10 @@ public:
...
@@ -48,6 +48,10 @@ public:
Q_INVOKABLE
void
launchAudioCall
(
const
QString
&
sip_uri
)
const
;
Q_INVOKABLE
void
launchAudioCall
(
const
QString
&
sip_uri
)
const
;
Q_INVOKABLE
void
launchVideoCall
(
const
QString
&
sip_uri
)
const
;
Q_INVOKABLE
void
launchVideoCall
(
const
QString
&
sip_uri
)
const
;
Q_INVOKABLE
int
getRunningCallsNumber
()
const
;
Q_INVOKABLE
void
terminateAllCalls
()
const
;
signals:
signals:
void
callRunning
(
int
index
,
CallModel
*
call
);
void
callRunning
(
int
index
,
CallModel
*
call
);
...
...
linphone-desktop/ui/views/App/Calls/CallsWindow.js
0 → 100644
View file @
3de09416
// =============================================================================
// `CallsWindow.qml` Logic.
// =============================================================================
.
import
Linphone
1.0
as
Linphone
.
import
'
qrc:/ui/scripts/Utils/utils.js
'
as
Utils
// =============================================================================
var
forceClose
=
false
function
handleClosing
(
close
)
{
var
callsList
=
Linphone
.
CallsListModel
if
(
forceClose
||
callsList
.
getRunningCallsNumber
()
===
0
)
{
callsList
.
terminateAllCalls
()
return
}
window
.
attachVirtualWindow
(
Utils
.
buildDialogUri
(
'
ConfirmDialog
'
),
{
descriptionText
:
qsTr
(
'
acceptClosingDescription
'
),
},
function
(
status
)
{
if
(
status
)
{
forceClose
=
true
window
.
close
()
}
})
close
.
accepted
=
false
}
linphone-desktop/ui/views/App/Calls/CallsWindow.qml
View file @
3de09416
...
@@ -8,6 +8,8 @@ import Linphone 1.0
...
@@ -8,6 +8,8 @@ import Linphone 1.0
import
App
.
Styles
1.0
import
App
.
Styles
1.0
import
'
CallsWindow.js
'
as
Logic
// =============================================================================
// =============================================================================
Window
{
Window
{
...
@@ -36,6 +38,12 @@ Window {
...
@@ -36,6 +38,12 @@ Window {
minimumWidth
:
CallsWindowStyle
.
minimumWidth
minimumWidth
:
CallsWindowStyle
.
minimumWidth
title
:
qsTr
(
'
callsTitle
'
)
title
:
qsTr
(
'
callsTitle
'
)
// ---------------------------------------------------------------------------
onClosing
:
Logic
.
handleClosing
(
close
)
// ---------------------------------------------------------------------------
Paned
{
Paned
{
anchors.fill
:
parent
anchors.fill
:
parent
defaultChildAWidth
:
CallsWindowStyle
.
callsList
.
defaultWidth
defaultChildAWidth
:
CallsWindowStyle
.
callsList
.
defaultWidth
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment