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
7d319705
Commit
7d319705
authored
Mar 08, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/Main/Contacts): supports many sip addresses
parent
d64fe17e
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
192 additions
and
24 deletions
+192
-24
resources.qrc
linphone-desktop/resources.qrc
+7
-5
ActionMenu.qml
linphone-desktop/ui/modules/Common/Menus/ActionMenu.qml
+0
-0
ActionMenuEntry.qml
linphone-desktop/ui/modules/Common/Menus/ActionMenuEntry.qml
+0
-0
Menu.qml
linphone-desktop/ui/modules/Common/Menus/Menu.qml
+0
-0
ActionMenuStyle.qml
...esktop/ui/modules/Common/Styles/Menus/ActionMenuStyle.qml
+0
-0
MenuStyle.qml
...hone-desktop/ui/modules/Common/Styles/Menus/MenuStyle.qml
+0
-0
qmldir
linphone-desktop/ui/modules/Common/Styles/qmldir
+2
-2
qmldir
linphone-desktop/ui/modules/Common/qmldir
+3
-3
SipAddressesMenu.qml
...ne-desktop/ui/modules/Linphone/Menus/SipAddressesMenu.qml
+116
-0
SipAddressesMenuStyle.qml
...i/modules/Linphone/Styles/Menus/SipAddressesMenuStyle.qml
+29
-0
qmldir
linphone-desktop/ui/modules/Linphone/Styles/qmldir
+2
-0
qmldir
linphone-desktop/ui/modules/Linphone/qmldir
+2
-8
Contacts.qml
linphone-desktop/ui/views/App/Main/Contacts.qml
+31
-6
No files found.
linphone-desktop/resources.qrc
View file @
7d319705
...
...
@@ -212,9 +212,9 @@
<file>
ui/modules/Common/Helpers/InvertedMouseArea.qml
</file>
<file>
ui/modules/Common/Image/Icon.qml
</file>
<file>
ui/modules/Common/Image/RoundedImage.qml
</file>
<file>
ui/modules/Common/Menu/ActionMenuEntry.qml
</file>
<file>
ui/modules/Common/Menu/ActionMenu.qml
</file>
<file>
ui/modules/Common/Menu/Menu.qml
</file>
<file>
ui/modules/Common/Menu
s
/ActionMenuEntry.qml
</file>
<file>
ui/modules/Common/Menu
s
/ActionMenu.qml
</file>
<file>
ui/modules/Common/Menu
s
/Menu.qml
</file>
<file>
ui/modules/Common/Misc/Borders.qml
</file>
<file>
ui/modules/Common/Misc/Collapse.qml
</file>
<file>
ui/modules/Common/Misc/ForceScrollBar.qml
</file>
...
...
@@ -252,8 +252,8 @@
<file>
ui/modules/Common/Styles/Form/Tab/TabButtonStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/Tab/TabContainerStyle.qml
</file>
<file>
ui/modules/Common/Styles/Form/TransparentTextInputStyle.qml
</file>
<file>
ui/modules/Common/Styles/Menu/ActionMenuStyle.qml
</file>
<file>
ui/modules/Common/Styles/Menu/MenuStyle.qml
</file>
<file>
ui/modules/Common/Styles/Menu
s
/ActionMenuStyle.qml
</file>
<file>
ui/modules/Common/Styles/Menu
s
/MenuStyle.qml
</file>
<file>
ui/modules/Common/Styles/Misc/CollapseStyle.qml
</file>
<file>
ui/modules/Common/Styles/Misc/ForceScrollBarStyle.qml
</file>
<file>
ui/modules/Common/Styles/Misc/PanedStyle.qml
</file>
...
...
@@ -277,6 +277,7 @@
<file>
ui/modules/Linphone/Contact/ContactDescription.qml
</file>
<file>
ui/modules/Linphone/Contact/Contact.qml
</file>
<file>
ui/modules/Linphone/Contact/MessagesCounter.qml
</file>
<file>
ui/modules/Linphone/Menus/SipAddressesMenu.qml
</file>
<file>
ui/modules/Linphone/Notifications/Notification.qml
</file>
<file>
ui/modules/Linphone/Notifications/NotificationReceivedCall.qml
</file>
<file>
ui/modules/Linphone/Notifications/NotificationReceivedFileMessage.qml
</file>
...
...
@@ -294,6 +295,7 @@
<file>
ui/modules/Linphone/Styles/Contact/ContactDescriptionStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/Contact/ContactStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/Contact/MessagesCounterStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/Menus/SipAddressesMenuStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/Notifications/NotificationReceivedCallStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/Notifications/NotificationReceivedFileMessageStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/Notifications/NotificationReceivedMessageStyle.qml
</file>
...
...
linphone-desktop/ui/modules/Common/Menu/ActionMenu.qml
→
linphone-desktop/ui/modules/Common/Menu
s
/ActionMenu.qml
View file @
7d319705
File moved
linphone-desktop/ui/modules/Common/Menu/ActionMenuEntry.qml
→
linphone-desktop/ui/modules/Common/Menu
s
/ActionMenuEntry.qml
View file @
7d319705
File moved
linphone-desktop/ui/modules/Common/Menu/Menu.qml
→
linphone-desktop/ui/modules/Common/Menu
s
/Menu.qml
View file @
7d319705
File moved
linphone-desktop/ui/modules/Common/Styles/Menu/ActionMenuStyle.qml
→
linphone-desktop/ui/modules/Common/Styles/Menu
s
/ActionMenuStyle.qml
View file @
7d319705
File moved
linphone-desktop/ui/modules/Common/Styles/Menu/MenuStyle.qml
→
linphone-desktop/ui/modules/Common/Styles/Menu
s
/MenuStyle.qml
View file @
7d319705
File moved
linphone-desktop/ui/modules/Common/Styles/qmldir
View file @
7d319705
...
...
@@ -38,8 +38,8 @@ singleton FormVGroupStyle 1.0 Form/Placements/FormVGroupStyle.qml
singleton TabButtonStyle 1.0 Form/Tab/TabButtonStyle.qml
singleton TabContainerStyle 1.0 Form/Tab/TabContainerStyle.qml
singleton ActionMenuStyle 1.0 Menu/ActionMenuStyle.qml
singleton MenuStyle 1.0 Menu/MenuStyle.qml
singleton ActionMenuStyle 1.0 Menu
s
/ActionMenuStyle.qml
singleton MenuStyle 1.0 Menu
s
/MenuStyle.qml
singleton CollapseStyle 1.0 Misc/CollapseStyle.qml
singleton ForceScrollBarStyle 1.0 Misc/ForceScrollBarStyle.qml
...
...
linphone-desktop/ui/modules/Common/qmldir
View file @
7d319705
...
...
@@ -56,9 +56,9 @@ InvertedMouseArea 1.0 Helpers/InvertedMouseArea.qml
Icon 1.0 Image/Icon.qml
RoundedImage 1.0 Image/RoundedImage.qml
ActionMenu 1.0 Menu/ActionMenu.qml
ActionMenuEntry 1.0 Menu/ActionMenuEntry.qml
Menu 1.0 Menu/Menu.qml
ActionMenu 1.0 Menu
s
/ActionMenu.qml
ActionMenuEntry 1.0 Menu
s
/ActionMenuEntry.qml
Menu 1.0 Menu
s
/Menu.qml
Borders 1.0 Misc/Borders.qml
Collapse 1.0 Misc/Collapse.qml
...
...
linphone-desktop/ui/modules/Linphone/Menus/SipAddressesMenu.qml
0 → 100644
View file @
7d319705
import
QtQuick
2.7
import
Common
1.0
import
Linphone
.
Styles
1.0
// =============================================================================
Item
{
id
:
sipAddressesMenu
// ---------------------------------------------------------------------------
property
alias
launcher
:
menu
.
launcher
property
alias
relativeTo
:
menu
.
relativeTo
property
alias
relativeX
:
menu
.
relativeX
property
alias
relativeY
:
menu
.
relativeY
property
var
sipAddresses
:
[]
// ---------------------------------------------------------------------------
function
showMenu
()
{
var
length
=
sipAddresses
.
length
if
(
!
length
)
{
return
}
if
(
length
===
1
)
{
return
sipAddressesMenu
.
sipAddressClicked
(
sipAddresses
[
0
])
}
menu
.
showMenu
()
}
function
_fillModel
()
{
model
.
clear
()
sipAddresses
.
forEach
(
function
(
sipAddress
)
{
model
.
append
({
$sipAddress
:
sipAddress
})
})
}
// ---------------------------------------------------------------------------
signal
sipAddressClicked
(
string
sipAddress
)
// ---------------------------------------------------------------------------
onSipAddressesChanged
:
_fillModel
()
// ---------------------------------------------------------------------------
DropDownDynamicMenu
{
id
:
menu
parent
:
sipAddressesMenu
.
parent
entryHeight
:
SipAddressesMenuStyle
.
entry
.
height
maxMenuHeight
:
SipAddressesMenuStyle
.
maxHeight
width
:
SipAddressesMenuStyle
.
entry
.
width
ScrollableListView
{
id
:
list
anchors.fill
:
parent
spacing
:
SipAddressesMenuStyle
.
spacing
model
:
ListModel
{
id
:
model
Component.onCompleted
:
_fillModel
()
}
delegate
:
Rectangle
{
height
:
menu
.
entryHeight
width
:
parent
.
width
color
:
mouseArea
.
pressed
?
SipAddressesMenuStyle
.
entry
.
color
.
pressed
:
(
mouseArea
.
containsMouse
?
SipAddressesMenuStyle
.
entry
.
color
.
hovered
:
SipAddressesMenuStyle
.
entry
.
color
.
normal
)
Text
{
anchors
{
left
:
parent
.
left
leftMargin
:
SipAddressesMenuStyle
.
entry
.
leftMargin
right
:
parent
.
right
rightMargin
:
SipAddressesMenuStyle
.
entry
.
rightMargin
}
color
:
SipAddressesMenuStyle
.
entry
.
text
.
color
elide
:
Text
.
ElideRight
font.pointSize
:
SipAddressesMenuStyle
.
entry
.
text
.
fontSize
height
:
parent
.
height
text
:
$sipAddress
verticalAlignment
:
Text
.
AlignVCenter
}
MouseArea
{
id
:
mouseArea
anchors.fill
:
parent
hoverEnabled
:
true
onClicked
:
{
menu
.
hideMenu
()
sipAddressesMenu
.
sipAddressClicked
(
$sipAddress
)
}
}
}
}
}
}
linphone-desktop/ui/modules/Linphone/Styles/Menus/SipAddressesMenuStyle.qml
0 → 100644
View file @
7d319705
pragma
Singleton
import
QtQuick
2.7
import
Common
1.0
// =============================================================================
QtObject
{
property
int
spacing
:
1
property
int
maxHeight
:
164
property
QtObject
entry
:
QtObject
{
property
int
leftMargin
:
18
property
int
rightMargin
:
8
property
int
height
:
40
property
int
width
:
300
property
QtObject
color
:
QtObject
{
property
color
hovered
:
Colors
.
j
property
color
normal
:
Colors
.
g
property
color
pressed
:
Colors
.
i
}
property
QtObject
text
:
QtObject
{
property
color
color
:
Colors
.
k
property
int
fontSize
:
10
}
}
}
linphone-desktop/ui/modules/Linphone/Styles/qmldir
View file @
7d319705
...
...
@@ -18,6 +18,8 @@ singleton ContactDescriptionStyle 1.0 Contact/ContactDescriptionSty
singleton ContactStyle 1.0 Contact/ContactStyle.qml
singleton MessagesCounterStyle 1.0 Contact/MessagesCounterStyle.qml
singleton SipAddressesMenuStyle 1.0 Menus/SipAddressesMenuStyle.qml
singleton NotificationStyle 1.0 Notifications/NotificationStyle.qml
singleton NotificationReceivedCallStyle 1.0 Notifications/NotificationReceivedCallStyle.qml
singleton NotificationReceivedMessageStyle 1.0 Notifications/NotificationReceivedMessageStyle.qml
...
...
linphone-desktop/ui/modules/Linphone/qmldir
View file @
7d319705
...
...
@@ -6,29 +6,23 @@ module Linphone
# Components -------------------------------------------------------------------
# Account
AccountStatus 1.0 Account/AccountStatus.qml
# CardBlock
CardBlock 1.0 CardBlock.qml
# Calls
Calls 1.0 Calls/Calls.qml
# Chat
Chat 1.0 Chat/Chat.qml
# Contact
Avatar 1.0 Contact/Avatar.qml
Contact 1.0 Contact/Contact.qml
ContactDescription 1.0 Contact/ContactDescription.qml
# Presence
SipAddressesMenu 1.0 Menus/SipAddressesMenu.qml
PresenceLevel 1.0 Presence/PresenceLevel.qml
PresenceString 1.0 Presence/PresenceString.qml
# SmartSearchBar
SmartSearchBar 1.0 SmartSearchBar.qml
# Timeline
Timeline 1.0 Timeline.qml
linphone-desktop/ui/views/App/Main/Contacts.qml
View file @
7d319705
...
...
@@ -131,19 +131,17 @@ ColumnLayout {
ActionButton
{
icon
:
'
video_call
'
onClicked
:
CallsListModel
.
launchVideoCall
(
$contact
.
vcard
.
sipAddresses
[
0
])
// FIXME: Display menu if many addresses.
onClicked
:
actions
.
itemAt
(
0
).
showMenu
()
}
ActionButton
{
icon
:
'
call
'
onClicked
:
CallsListModel
.
launchAudioCall
(
$contact
.
vcard
.
sipAddresses
[
0
])
// FIXME: Display menu if many addresses.
onClicked
:
actions
.
itemAt
(
1
).
showMenu
()
}
ActionButton
{
icon
:
'
chat
'
onClicked
:
window
.
setView
(
'
Conversation
'
,
{
sipAddress
:
$contact
.
vcard
.
sipAddresses
[
0
]
// FIXME: Display menu if many addresses.
})
onClicked
:
actions
.
itemAt
(
2
).
showMenu
()
}
}
...
...
@@ -162,6 +160,33 @@ ColumnLayout {
// -------------------------------------------------------------------
Repeater
{
id
:
actions
readonly
property
var
handlers
:
[
CallsListModel
.
launchVideoCall
,
CallsListModel
.
launchAudioCall
,
function
(
sipAddress
)
{
window
.
setView
(
'
Conversation
'
,
{
sipAddress
:
sipAddress
})
}
]
model
:
handlers
SipAddressesMenu
{
relativeTo
:
loader
relativeY
:
loader
.
height
sipAddresses
:
$contact
.
vcard
.
sipAddresses
onSipAddressClicked
:
actions
.
handlers
[
index
](
sipAddress
)
}
}
// -------------------------------------------------------------------
Rectangle
{
id
:
indicator
...
...
@@ -185,7 +210,7 @@ ColumnLayout {
hoverEnabled
:
true
onClicked
:
window
.
setView
(
'
ContactEdit
'
,
{
sipAddress
:
$contact
.
vcard
.
sipAddresses
[
0
]
// FIXME: Display menu if many addresses.
sipAddress
:
$contact
.
vcard
.
sipAddresses
[
0
]
})
}
...
...
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