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
a409da74
Commit
a409da74
authored
Feb 20, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/modules/Linphone/Calls/Calls): use `Connections`
parent
d9f1d862
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
Paned.qml
linphone-desktop/ui/modules/Common/Misc/Paned.qml
+1
-1
Calls.qml
linphone-desktop/ui/modules/Linphone/Calls/Calls.qml
+14
-8
No files found.
linphone-desktop/ui/modules/Common/Misc/Paned.qml
View file @
a409da74
...
...
@@ -237,7 +237,7 @@ Item {
onWidthChanged
:
_applyLimits
()
Component.onCompleted
:
{
// Unable to modify th
is
properties after creation.
// Unable to modify th
ese
properties after creation.
// It's a desired choice.
_maximumLeftLimit
=
_parseLimit
(
maximumLeftLimit
)
_maximumRightLimit
=
_parseLimit
(
maximumRightLimit
)
...
...
linphone-desktop/ui/modules/Linphone/Calls/Calls.qml
View file @
a409da74
...
...
@@ -103,8 +103,14 @@ ListView {
string
:
'
paused
'
}
})
}
// ---------------------------------------------------------------------------
model
.
rowsAboutToBeRemoved
.
connect
(
function
(
_
,
first
,
last
)
{
Connections
{
target
:
model
onRowsAboutToBeRemoved
:
{
var
index
=
calls
.
currentIndex
if
(
index
>=
first
&&
index
<=
last
)
{
// Remove current call.
...
...
@@ -118,9 +124,9 @@ ListView {
}
}
}
}
)
}
model
.
rowsRemoved
.
connect
(
function
(
_
,
first
,
last
)
{
onRowsRemoved
:
{
var
index
=
calls
.
currentIndex
// The current call has been removed.
...
...
@@ -136,10 +142,10 @@ ListView {
else
if
(
last
<
index
)
{
calls
.
currentIndex
=
index
-
(
last
-
first
+
1
)
}
}
)
}
// The last inserted outgoing element become the selected call.
model
.
rowsInserted
.
connect
(
function
(
_
,
first
,
last
)
{
onRowsInserted
:
{
for
(
var
index
=
last
;
index
>=
first
;
index
--
)
{
var
call
=
model
.
data
(
model
.
index
(
index
,
0
))
...
...
@@ -148,12 +154,12 @@ ListView {
_selectedCall
=
model
.
data
(
model
.
index
(
first
,
0
))
}
}
}
)
}
model
.
callRunning
.
connect
(
function
(
index
,
call
)
{
onCallRunning
:
{
calls
.
currentIndex
=
index
_selectedCall
=
call
}
)
}
}
// ---------------------------------------------------------------------------
...
...
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