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
0fadc4cb
Commit
0fadc4cb
authored
Nov 02, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(MainWindow/Contacts): display presence string
parent
0b56121f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
224 additions
and
82 deletions
+224
-82
en.ts
tests/assets/languages/en.ts
+43
-0
fr.ts
tests/assets/languages/fr.ts
+43
-0
resources.qrc
tests/resources.qrc
+3
-1
PresenceLevel.qml
tests/ui/modules/Linphone/Presence/PresenceLevel.qml
+0
-0
PresenceString.qml
tests/ui/modules/Linphone/Presence/PresenceString.qml
+40
-0
PresenceStringStyle.qml
.../modules/Linphone/Styles/Presence/PresenceStringStyle.qml
+11
-0
qmldir
tests/ui/modules/Linphone/Styles/qmldir
+3
-0
qmldir
tests/ui/modules/Linphone/qmldir
+3
-2
Contacts.qml
tests/ui/views/App/MainWindow/Contacts.qml
+78
-79
No files found.
tests/assets/languages/en.ts
View file @
0fadc4cb
...
...
@@ -287,6 +287,49 @@
<
translation
>
CANCEL
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
PresenceString
<
/name
>
<
message
>
<
source
>
presenceOnline
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
presenceOutToLunch
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
presenceDoNotDisturb
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
presenceMoved
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
presenceUsingAnotherMessagingService
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
presenceOffline
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
presenceUnknown
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
presenceBeRightBack
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
presenceAway
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
presenceOnThePhone
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
SelectContact
<
/name
>
<
message
>
...
...
tests/assets/languages/fr.ts
View file @
0fadc4cb
...
...
@@ -287,6 +287,49 @@
<
translation
>
ANNULER
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
PresenceString
<
/name
>
<
message
>
<
source
>
presenceOnline
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
presenceOutToLunch
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
presenceDoNotDisturb
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
presenceMoved
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
presenceUsingAnotherMessagingService
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
presenceOffline
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
presenceUnknown
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
presenceBeRightBack
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
presenceAway
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
presenceOnThePhone
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
SelectContact
<
/name
>
<
message
>
...
...
tests/resources.qrc
View file @
0fadc4cb
...
...
@@ -122,13 +122,15 @@
<file>
ui/modules/Linphone/Contact/Avatar.qml
</file>
<file>
ui/modules/Linphone/Contact/ContactDescription.qml
</file>
<file>
ui/modules/Linphone/Contact/Contact.qml
</file>
<file>
ui/modules/Linphone/PresenceLevel.qml
</file>
<file>
ui/modules/Linphone/Presence/PresenceLevel.qml
</file>
<file>
ui/modules/Linphone/Presence/PresenceString.qml
</file>
<file>
ui/modules/Linphone/qmldir
</file>
<file>
ui/modules/Linphone/Select/SelectContact.qml
</file>
<file>
ui/modules/Linphone/Styles/Account/AccountStatusStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/Contact/AvatarStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/Contact/ContactDescriptionStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/Contact/ContactStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/Presence/PresenceStringStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/qmldir
</file>
<file>
ui/modules/Linphone/Styles/TimelineStyle.qml
</file>
<file>
ui/modules/Linphone/Timeline.qml
</file>
...
...
tests/ui/modules/Linphone/PresenceLevel.qml
→
tests/ui/modules/Linphone/Presence
/Presence
Level.qml
View file @
0fadc4cb
File moved
tests/ui/modules/Linphone/Presence/PresenceString.qml
0 → 100644
View file @
0fadc4cb
import
QtQuick
2.7
import
Linphone
1.0
import
Linphone
.
Styles
1.0
// ===================================================================
Text
{
property
int
status
:
-
1
function
_getStatusString
()
{
switch
(
status
)
{
case
Presence.Online
:
return
qsTr
(
'
presenceOnline
'
)
case
Presence.BeRightBack
:
return
qsTr
(
'
presenceBeRightBack
'
)
case
Presence.Away
:
return
qsTr
(
'
presenceAway
'
)
case
Presence.OnThePhone
:
return
qsTr
(
'
presenceOnThePhone
'
)
case
Presence.OutToLunch
:
return
qsTr
(
'
presenceOutToLunch
'
)
case
Presence.DoNotDisturb
:
return
qsTr
(
'
presenceDoNotDisturb
'
)
case
Presence.Moved
:
return
qsTr
(
'
presenceMoved
'
)
case
Presence.UsingAnotherMessagingService
:
return
qsTr
(
'
presenceUsingAnotherMessagingService
'
)
case
Presence.Offline
:
return
qsTr
(
'
presenceOffline
'
)
default
:
return
qsTr
(
'
presenceUnknown
'
)
}
}
color
:
PresenceStringStyle
.
color
elide
:
Text
.
ElideRight
font.pointSize
:
PresenceStringStyle
.
fontSize
text
:
_getStatusString
()
}
tests/ui/modules/Linphone/Styles/Presence/PresenceStringStyle.qml
0 → 100644
View file @
0fadc4cb
pragma
Singleton
import
QtQuick
2.7
import
Common
1.0
// ===================================================================
QtObject
{
property
color
color
:
'
#A1A1A1
'
property
int
fontSize
:
10
}
tests/ui/modules/Linphone/Styles/qmldir
View file @
0fadc4cb
...
...
@@ -5,8 +5,11 @@ module Linphone.Style
# Components styles --------------------------------------------------
singleton AccountStatusStyle 1.0 Account/AccountStatusStyle.qml
singleton AvatarStyle 1.0 Contact/AvatarStyle.qml
singleton ContactDescriptionStyle 1.0 Contact/ContactDescriptionStyle.qml
singleton ContactStyle 1.0 Contact/ContactStyle.qml
singleton PresenceStringStyle 1.0 Presence/PresenceStringStyle.qml
singleton TimelineStyle 1.0 TimelineStyle.qml
tests/ui/modules/Linphone/qmldir
View file @
0fadc4cb
...
...
@@ -20,8 +20,9 @@ Avatar 1.0 Contact/Avatar.qml
Contact 1.0 Contact/Contact.qml
ContactDescription 1.0 Contact/ContactDescription.qml
# PresenceLevel
PresenceLevel 1.0 PresenceLevel.qml
# Presence
PresenceLevel 1.0 Presence/PresenceLevel.qml
PresenceString 1.0 Presence/PresenceString.qml
# Select
SelectContact 1.0 Select/SelectContact.qml
...
...
tests/ui/views/App/MainWindow/Contacts.qml
View file @
0fadc4cb
...
...
@@ -108,108 +108,107 @@ ColumnLayout {
anchors.fill
:
parent
color
:
ContactsStyle
.
contact
.
backgroundColor
.
normal
RowLayout
{
anchors
{
fill
:
parent
leftMargin
:
ContactsStyle
.
contact
.
leftMargin
rightMargin
:
ContactsStyle
.
contact
.
rightMargin
}
spacing
:
ContactsStyle
.
contact
.
spacing
// Avatar.
Avatar
{
Layout.preferredHeight
:
ContactsStyle
.
contact
.
avatarSize
Layout.preferredWidth
:
ContactsStyle
.
contact
.
avatarSize
image
:
$contact
.
avatar
username
:
$contact
.
username
}
// Username.
Text
{
Layout.preferredWidth
:
ContactsStyle
.
contact
.
username
.
width
color
:
ContactsStyle
.
contact
.
username
.
color
elide
:
Text
.
ElideRight
font.bold
:
true
text
:
$contact
.
username
}
// Container.
Item
{
Layout.fillWidth
:
true
Layout.fillHeight
:
true
Item
{
id
:
container1
MouseArea
{
id
:
mouseArea
anchors.fill
:
parent
anchors.fill
:
parent
hoverEnabled
:
true
PresenceLevel
{
anchors
{
left
:
parent
.
left
verticalCenter
:
parent
.
verticalCenter
}
height
:
ContactsStyle
.
contact
.
presenceLevelSize
width
:
ContactsStyle
.
contact
.
presenceLevelSize
RowLayout
{
anchors
{
fill
:
parent
leftMargin
:
ContactsStyle
.
contact
.
leftMargin
rightMargin
:
ContactsStyle
.
contact
.
rightMargin
}
spacing
:
ContactsStyle
.
contact
.
spacing
// Avatar.
Avatar
{
Layout.preferredHeight
:
ContactsStyle
.
contact
.
avatarSize
Layout.preferredWidth
:
ContactsStyle
.
contact
.
avatarSize
image
:
$contact
.
avatar
username
:
$contact
.
username
}
level
:
$contact
.
presenceLevel
}
// Username.
Text
{
Layout.preferredWidth
:
ContactsStyle
.
contact
.
username
.
width
color
:
ContactsStyle
.
contact
.
username
.
color
elide
:
Text
.
ElideRight
font.bold
:
true
text
:
$contact
.
username
}
// Container.
Item
{
id
:
container2
Layout.fillWidth
:
true
Layout.fillHeight
:
true
anchors.fill
:
parent
visible
:
false
RowLayout
{
id
:
container1
ActionBar
{
anchors
{
left
:
parent
.
left
verticalCenter
:
parent
.
verticalCenter
}
iconSize
:
ContactsStyle
.
contact
.
actionButtonsSize
anchors.fill
:
parent
ActionButton
{
icon
:
'
video_call
'
onClicked
:
CallsWindow
.
show
()
PresenceLevel
{
Layout.preferredHeight
:
ContactsStyle
.
contact
.
presenceLevelSize
Layout.preferredWidth
:
ContactsStyle
.
contact
.
presenceLevelSize
level
:
$contact
.
presenceLevel
}
ActionButton
{
icon
:
'
call
'
onClicked
:
CallsWindow
.
show
()
}
ActionButton
{
icon
:
'
chat
'
onClicked
:
window
.
setView
(
'
Conversation
'
)
PresenceString
{
Layout.fillWidth
:
true
status
:
$contact
.
presenceStatus
}
}
ActionButton
{
anchors
{
right
:
parent
.
right
verticalCenter
:
parent
.
verticalCenter
Item
{
id
:
container2
anchors.fill
:
parent
visible
:
false
ActionBar
{
anchors
{
left
:
parent
.
left
verticalCenter
:
parent
.
verticalCenter
}
iconSize
:
ContactsStyle
.
contact
.
actionButtonsSize
ActionButton
{
icon
:
'
video_call
'
onClicked
:
CallsWindow
.
show
()
}
ActionButton
{
icon
:
'
call
'
onClicked
:
CallsWindow
.
show
()
}
ActionButton
{
icon
:
'
chat
'
onClicked
:
window
.
setView
(
'
Conversation
'
)
}
}
icon
:
'
delete
'
iconSize
:
ContactsStyle
.
contact
.
deleteButtonSize
onClicked
:
_removeContact
(
$contact
)
ActionButton
{
anchors
{
right
:
parent
.
right
verticalCenter
:
parent
.
verticalCenter
}
icon
:
'
delete
'
iconSize
:
ContactsStyle
.
contact
.
deleteButtonSize
onClicked
:
_removeContact
(
$contact
)
}
}
}
}
}
MouseArea
{
anchors.fill
:
parent
hoverEnabled
:
true
onEntered
:
contact
.
state
=
'
hover
'
onExited
:
contact
.
state
=
''
}
// -----------------------------------------------------------
// ---------------------------------------------------------
states
:
State
{
name
:
'
hover
'
when
:
mouseArea
.
containsMouse
PropertyChanges
{
color
:
ContactsStyle
.
contact
.
backgroundColor
.
hovered
...
...
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