mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-07 15:08:24 +00:00
- Contact update propagated through timelines and more robust display name showing by using cpp. - ContactEdit : don't use the conference URI when adding the contact to friend on secure chat room - Conference View : Resize record, add record file notification. - Group Chat : timed invitation (30s) where it will hide if no response. It will be shown if the participant accept later. - Hide/Show empty chats : set defaults to avoid differences from SDK value. - Calls actions : Dynamic width on transfer menu to show all text, set texts to uppercase. - Timeline : Add a tooltip (right-clic) to show the last time update. - File Messages : add search shortcut on avatar like messages, remove conflicts between right-clic menu and thumbnails increase (on hovering mouse). - Call : hold view with a correct symbol (#10073 instead of 2 differents symbols for 2 vertical bars) - Languages : remove '-----' artifacts in language files
100 lines
2.5 KiB
QML
100 lines
2.5 KiB
QML
import QtQuick 2.7
|
|
import QtQuick.Layouts 1.3
|
|
|
|
import Clipboard 1.0
|
|
import Common 1.0
|
|
import Linphone 1.0
|
|
|
|
import Common.Styles 1.0
|
|
import Linphone.Styles 1.0
|
|
import TextToSpeech 1.0
|
|
import Utils 1.0
|
|
import Units 1.0
|
|
import UtilsCpp 1.0
|
|
import LinphoneEnums 1.0
|
|
|
|
import 'Message.js' as Logic
|
|
|
|
// =============================================================================
|
|
|
|
Item {
|
|
id: container
|
|
property string lastTextSelected
|
|
property string content
|
|
property int deliveryCount : 0
|
|
property bool deliveryVisible: false
|
|
|
|
signal deliveryStatusClicked()
|
|
signal removeEntryRequested()
|
|
|
|
function open(){
|
|
messageMenu.popup()
|
|
}
|
|
|
|
|
|
Menu {
|
|
id: messageMenu
|
|
menuStyle : MenuStyle.aux
|
|
MenuItem {
|
|
//: 'Copy all' : Text menu to copy all message text into clipboard
|
|
text: (container.lastTextSelected == '' ? qsTr('menuCopyAll')
|
|
//: 'Copy' : Text menu to copy selected text in message into clipboard
|
|
: qsTr('menuCopy'))
|
|
iconMenu: 'menu_copy_text'
|
|
iconSizeMenu: 17
|
|
iconLayoutDirection: Qt.RightToLeft
|
|
menuItemStyle : MenuItemStyle.aux
|
|
onTriggered: Clipboard.text = (container.lastTextSelected == '' ? container.content : container.lastTextSelected)
|
|
visible: content != ''
|
|
}
|
|
|
|
MenuItem {
|
|
enabled: TextToSpeech.available
|
|
text: qsTr('menuPlayMe')
|
|
iconMenu: 'speaker'
|
|
iconSizeMenu: 17
|
|
iconLayoutDirection: Qt.RightToLeft
|
|
menuItemStyle : MenuItemStyle.aux
|
|
onTriggered: TextToSpeech.say(container.content)
|
|
visible: content != ''
|
|
}
|
|
MenuItem {
|
|
//: 'Hide delivery status' : Item menu that lead to IMDN of a message
|
|
text: (deliveryVisible ? qsTr('menuHideDeliveryStatus')
|
|
//: 'Delivery status' : Item menu that lead to IMDN of a message
|
|
: qsTr('menuDeliveryStatus')
|
|
)
|
|
iconMenu: 'menu_imdn_info'
|
|
iconSizeMenu: 17
|
|
iconLayoutDirection: Qt.RightToLeft
|
|
menuItemStyle : MenuItemStyle.aux
|
|
visible: container.deliveryCount > 0
|
|
onTriggered: container.deliveryStatusClicked()
|
|
}
|
|
MenuItem {
|
|
//: 'Delete' : Item menu to delete a message
|
|
text: qsTr('menuDelete')
|
|
iconMenu: 'menu_delete'
|
|
iconSizeMenu: 17
|
|
iconLayoutDirection: Qt.RightToLeft
|
|
menuItemStyle : MenuItemStyle.auxRed
|
|
onTriggered: container.removeEntryRequested()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Handle hovered link.
|
|
MouseArea {
|
|
anchors.fill: parent
|
|
//height: messageMenu.height
|
|
//width: messageMenu.width
|
|
|
|
acceptedButtons: Qt.RightButton
|
|
propagateComposedEvents:true
|
|
cursorShape: parent.hoveredLink
|
|
? Qt.PointingHandCursor
|
|
: Qt.IBeamCursor
|
|
onClicked: mouse.button === Qt.RightButton && messageMenu.popup()
|
|
}
|
|
}
|