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
054f3907
Commit
054f3907
authored
May 11, 2017
by
Sylvain Berfini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added declined call reason in ended call window
parent
28ae7fe7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
83 additions
and
1 deletion
+83
-1
en.ts
linphone-desktop/assets/languages/en.ts
+16
-0
fr.ts
linphone-desktop/assets/languages/fr.ts
+16
-0
CallModel.cpp
linphone-desktop/src/components/call/CallModel.cpp
+28
-1
CallModel.hpp
linphone-desktop/src/components/call/CallModel.hpp
+5
-0
EndedCall.qml
linphone-desktop/ui/views/App/Calls/EndedCall.qml
+13
-0
CallStyle.qml
linphone-desktop/ui/views/App/Styles/Calls/CallStyle.qml
+5
-0
No files found.
linphone-desktop/assets/languages/en.ts
View file @
054f3907
...
...
@@ -252,6 +252,22 @@
<
source
>
iceStateInvalid
<
/source
>
<
translation
>
Invalid
<
/translation
>
<
/message
>
<
message
>
<
source
>
User
declined
the
call
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
User
not
found
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
User
is
busy
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
Incompatible
media
params
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
CallStatistics
<
/name
>
...
...
linphone-desktop/assets/languages/fr.ts
View file @
054f3907
...
...
@@ -252,6 +252,22 @@
<
source
>
iceStateInvalid
<
/source
>
<
translation
>
Invalide
<
/translation
>
<
/message
>
<
message
>
<
source
>
User
declined
the
call
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
User
not
found
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
User
is
busy
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
Incompatible
media
params
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
CallStatistics
<
/name
>
...
...
linphone-desktop/src/components/call/CallModel.cpp
View file @
054f3907
...
...
@@ -40,6 +40,7 @@ CallModel::CallModel (shared_ptr<linphone::Call> call) {
Q_ASSERT
(
call
!=
nullptr
);
mCall
=
call
;
mCall
->
setData
(
"call-model"
,
*
this
);
mReason
=
""
;
// Deal with auto-answer.
{
...
...
@@ -63,8 +64,9 @@ CallModel::CallModel (shared_ptr<linphone::Call> call) {
return
;
switch
(
state
)
{
case
linphone
:
:
CallStateEnd
:
case
linphone
:
:
CallStateError
:
setReason
(
call
->
getReason
());
case
linphone
:
:
CallStateEnd
:
stopAutoAnswerTimer
();
mPausedByRemote
=
false
;
break
;
...
...
@@ -284,6 +286,31 @@ CallModel::CallStatus CallModel::getStatus () const {
// -----------------------------------------------------------------------------
void
CallModel
::
setReason
(
linphone
::
Reason
reason
)
{
switch
(
reason
)
{
case
linphone
:
:
ReasonDeclined
:
mReason
=
tr
(
"User declined the call"
);
break
;
case
linphone
:
:
ReasonNotFound
:
mReason
=
tr
(
"User not found"
);
break
;
case
linphone
:
:
ReasonBusy
:
mReason
=
tr
(
"User is busy"
);
break
;
case
linphone
:
:
ReasonNotAcceptable
:
mReason
=
tr
(
"Incompatible media params"
);
break
;
default:
break
;
}
}
QString
CallModel
::
getReason
()
const
{
return
mReason
;
}
// -----------------------------------------------------------------------------
int
CallModel
::
getDuration
()
const
{
return
mCall
->
getDuration
();
}
...
...
linphone-desktop/src/components/call/CallModel.hpp
View file @
054f3907
...
...
@@ -33,6 +33,7 @@ class CallModel : public QObject {
Q_PROPERTY
(
QString
sipAddress
READ
getSipAddress
CONSTANT
);
Q_PROPERTY
(
CallStatus
status
READ
getStatus
NOTIFY
statusChanged
);
Q_PROPERTY
(
QString
reason
READ
getReason
NOTIFY
statusChanged
);
Q_PROPERTY
(
bool
isOutgoing
READ
isOutgoing
CONSTANT
);
...
...
@@ -106,6 +107,10 @@ private:
return
mCall
->
getDir
()
==
linphone
::
CallDirOutgoing
;
}
QString
mReason
;
void
setReason
(
linphone
::
Reason
reason
);
QString
getReason
()
const
;
int
getDuration
()
const
;
float
getQuality
()
const
;
float
getMicroVu
()
const
;
...
...
linphone-desktop/ui/views/App/Calls/EndedCall.qml
View file @
054f3907
...
...
@@ -75,6 +75,19 @@ Rectangle {
Item
{
Layout.fillWidth
:
true
Layout.preferredHeight
:
CallStyle
.
actionArea
.
height
Text
{
width
:
parent
.
width
color
:
CallStyle
.
header
.
reason
.
color
font.pointSize
:
CallStyle
.
header
.
reason
.
fontSize
horizontalAlignment
:
Text
.
AlignHCenter
text
:
{
var
call
=
endedCall
.
call
return
call
.
reason
}
}
}
}
}
linphone-desktop/ui/views/App/Styles/Calls/CallStyle.qml
View file @
054f3907
...
...
@@ -70,5 +70,10 @@ QtObject {
property
QtObject
stats
:
QtObject
{
property
int
relativeY
:
90
}
property
QtObject
reason
:
QtObject
{
property
color
color
:
Colors
.
i
property
int
fontSize
:
12
}
}
}
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