- Fix history view

- Allow to add license in packages (windows with NSIS/mac with dmg)
This commit is contained in:
Julien Wadel 2021-11-09 11:36:23 +01:00
parent 1163688f78
commit 5adb1eb4dd
7 changed files with 199 additions and 143 deletions

View file

@ -7,11 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## 4.4.0 - [Undefined]
## Added
- Features:
* messages features : Reply
## Fixed
## 4.3.2
### Fixed
- Changing volume in settings has a overall effect.
- ALSA volumes can be view/changed while being in call.
- Remove constraints on actions (call/chat) that were based on friends capabilities.
- Unblock secure group chat activation.
- Unselect current contact if history call view is displayed.
- Show chat actions in history view
## 4.3.1 - 2021-11-04

View file

@ -113,6 +113,8 @@ option(ENABLE_VIDEO "Enable Video support." YES)
option(ENABLE_DAEMON "Enable the linphone daemon interface." NO)
option(ENABLE_CONSOLE_UI "Turn on or off compilation of console interface." NO)
option(ENABLE_APP_LICENSE "Enable the license in packages." YES)
@ -138,6 +140,8 @@ list(APPEND APP_OPTIONS "-DENABLE_BUILD_EXAMPLES=${ENABLE_BUILD_EXAMPLES}")
list(APPEND APP_OPTIONS "-DENABLE_DAEMON=${ENABLE_DAEMON}")
list(APPEND APP_OPTIONS "-DENABLE_CONSOLE_UI=${ENABLE_CONSOLE_UI}")
list(APPEND APP_OPTIONS "-DENABLE_VIDEO=${ENABLE_VIDEO}")
list(APPEND APP_OPTIONS "-DENABLE_APP_LICENSE=${ENABLE_APP_LICENSE}")
if(ENABLE_V4L)

View file

@ -348,7 +348,14 @@ if(${ENABLE_APP_PACKAGING})
set(CPACK_PACKAGE_VERSION_PATCH ${LINPHONE_MICRO_VERSION})
endif ()
set(CPACK_PACKAGE_EXECUTABLES "${EXECUTABLE_NAME};${APPLICATION_NAME}")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/../../../LICENSE.txt")
if(ENABLE_APP_LICENSE)
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/../../../LICENSE.txt")
else()
unset(CPACK_RESOURCE_FILE_LICENSE)
endif()
set(CPACK_RESOURCE_FILE_LICENSE_PROVIDED ENABLE_APP_LICENSE)
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${APPLICATION_NAME}")
set(CPACK_PACKAGE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/Packages")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/../../assets/icon.ico")

View file

@ -549,7 +549,10 @@ FunctionEnd
;Pages
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "@CPACK_RESOURCE_FILE_LICENSE@"
!if @CPACK_RESOURCE_FILE_LICENSE_PROVIDED@
!insertmacro MUI_PAGE_LICENSE "@CPACK_RESOURCE_FILE_LICENSE@"
!endif
Page custom InstallOptionsPage
!insertmacro MUI_PAGE_DIRECTORY

View file

@ -12,143 +12,166 @@ import 'HistoryView.js' as Logic
// =============================================================================
ColumnLayout {
id: historyView
property string peerAddress
property string fullPeerAddress
readonly property var _sipAddressObserver: peerAddress?SipAddressesModel.getSipAddressObserver((fullPeerAddress?fullPeerAddress:peerAddress), ''):null
// ---------------------------------------------------------------------------
spacing: 0
// ---------------------------------------------------------------------------
// Contact bar.
// ---------------------------------------------------------------------------
Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: peerAddress?HistoryViewStyle.bar.height:HistoryViewStyle.bar.height/2
color: HistoryViewStyle.bar.backgroundColor
RowLayout {
anchors {
fill: parent
leftMargin: HistoryViewStyle.bar.leftMargin
rightMargin: HistoryViewStyle.bar.rightMargin
}
spacing: HistoryViewStyle.bar.spacing
layoutDirection: peerAddress?Qt.LeftToRight :Qt.RightToLeft
Avatar {
id: avatar
Layout.preferredHeight: HistoryViewStyle.bar.avatarSize
Layout.preferredWidth: HistoryViewStyle.bar.avatarSize
image: peerAddress?Logic.getAvatar():null
presenceLevel: historyView._sipAddressObserver?Presence.getPresenceLevel(
historyView._sipAddressObserver.presenceStatus
):null
username: peerAddress? UtilsCpp.getDisplayName(historyView._sipAddressObserver.peerAddress):null
visible:peerAddress
}
ContactDescription {
Layout.fillHeight: true
Layout.fillWidth: true
sipAddress: historyView.peerAddress
sipAddressColor: HistoryViewStyle.bar.description.sipAddressColor
username: avatar.username
usernameColor: HistoryViewStyle.bar.description.usernameColor
visible:peerAddress
}
Row {
Layout.fillHeight: true
spacing: HistoryViewStyle.bar.actions.spacing
ActionBar {
anchors.verticalCenter: parent.verticalCenter
iconSize: HistoryViewStyle.bar.actions.call.iconSize
ActionButton {
isCustom: true
backgroundRadius: 90
colorSet: HistoryViewStyle.videoCall
visible: peerAddress && SettingsModel.videoSupported && SettingsModel.outgoingCallsEnabled && SettingsModel.showStartVideoCallButton
onClicked: CallsListModel.launchVideoCall(historyView.peerAddress)
}
ActionButton {
isCustom: true
backgroundRadius: 90
colorSet: HistoryViewStyle.call
visible: peerAddress && SettingsModel.outgoingCallsEnabled
onClicked: CallsListModel.launchAudioCall(historyView.peerAddress)
}
}
ActionBar {
anchors.verticalCenter: parent.verticalCenter
ActionButton {
isCustom: true
backgroundRadius: 4
colorSet: historyView._sipAddressObserver && historyView._sipAddressObserver.contact ? ConversationStyle.bar.actions.edit.viewContact : ConversationStyle.bar.actions.edit.addContact
iconSize: HistoryViewStyle.bar.actions.edit.iconSize
visible: peerAddress && SettingsModel.contactsEnabled
onClicked: window.setView('ContactEdit', { sipAddress: historyView.peerAddress })
tooltipText: peerAddress?Logic.getEditTooltipText():''
}
ActionButton {
isCustom: true
backgroundRadius: 90
colorSet: HistoryViewStyle.deleteAction
onClicked: Logic.removeAllEntries()
tooltipText: qsTr('cleanHistory')
}
}
}
}
}
// ---------------------------------------------------------------------------
// History.
// ---------------------------------------------------------------------------
History {
Layout.fillHeight: true
Layout.fillWidth: true
onEntryClicked:{
historyView.fullPeerAddress=sipAddress
historyView.peerAddress=sipAddress
historyProxyModel.resetMessageCount()
}
proxyModel: HistoryProxyModel {
id: historyProxyModel
Component.onCompleted: {
setEntryTypeFilter()
resetMessageCount()
}
}
}
id: historyView
property string peerAddress
property string fullPeerAddress
readonly property var _sipAddressObserver: peerAddress?SipAddressesModel.getSipAddressObserver((fullPeerAddress?fullPeerAddress:peerAddress), ''):null
// ---------------------------------------------------------------------------
spacing: 0
// ---------------------------------------------------------------------------
// Contact bar.
// ---------------------------------------------------------------------------
Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: peerAddress?HistoryViewStyle.bar.height:HistoryViewStyle.bar.height/2
color: HistoryViewStyle.bar.backgroundColor
RowLayout {
anchors {
fill: parent
leftMargin: HistoryViewStyle.bar.leftMargin
rightMargin: HistoryViewStyle.bar.rightMargin
}
spacing: HistoryViewStyle.bar.spacing
layoutDirection: peerAddress?Qt.LeftToRight :Qt.RightToLeft
Avatar {
id: avatar
Layout.preferredHeight: HistoryViewStyle.bar.avatarSize
Layout.preferredWidth: HistoryViewStyle.bar.avatarSize
image: peerAddress?Logic.getAvatar():null
presenceLevel: historyView._sipAddressObserver?Presence.getPresenceLevel(
historyView._sipAddressObserver.presenceStatus
):null
username: peerAddress? UtilsCpp.getDisplayName(historyView._sipAddressObserver.peerAddress):null
visible:peerAddress
}
ContactDescription {
Layout.fillHeight: true
Layout.fillWidth: true
sipAddress: historyView.peerAddress
sipAddressColor: HistoryViewStyle.bar.description.sipAddressColor
username: avatar.username
usernameColor: HistoryViewStyle.bar.description.usernameColor
visible:peerAddress
}
Row {
Layout.fillHeight: true
spacing: HistoryViewStyle.bar.actions.spacing
ActionBar {
anchors.verticalCenter: parent.verticalCenter
iconSize: HistoryViewStyle.bar.actions.call.iconSize
ActionButton {
isCustom: true
backgroundRadius: 90
colorSet: HistoryViewStyle.videoCall
visible: peerAddress && SettingsModel.videoSupported && SettingsModel.outgoingCallsEnabled && SettingsModel.showStartVideoCallButton
onClicked: CallsListModel.launchVideoCall(historyView.peerAddress)
}
ActionButton {
isCustom: true
backgroundRadius: 90
colorSet: HistoryViewStyle.call
visible: peerAddress && SettingsModel.outgoingCallsEnabled
onClicked: CallsListModel.launchAudioCall(historyView.peerAddress)
}
ActionButton {
isCustom: true
backgroundRadius: 90
colorSet: HistoryViewStyle.chat
visible: peerAddress && SettingsModel.standardChatEnabled && SettingsModel.getShowStartChatButton()
onClicked: CallsListModel.launchChat(historyView.peerAddress, 0)
}
ActionButton {
isCustom: true
backgroundRadius: 1000
colorSet: HistoryViewStyle.chat
visible: peerAddress && SettingsModel.secureChatEnabled && SettingsModel.getShowStartChatButton()
onClicked: CallsListModel.launchChat(historyView.peerAddress, 1)
Icon{
icon:'secure_level_1'
iconSize:15
anchors.right:parent.right
anchors.top:parent.top
anchors.topMargin: -3
}
}
}
ActionBar {
anchors.verticalCenter: parent.verticalCenter
ActionButton {
isCustom: true
backgroundRadius: 4
colorSet: historyView._sipAddressObserver && historyView._sipAddressObserver.contact ? ConversationStyle.bar.actions.edit.viewContact : ConversationStyle.bar.actions.edit.addContact
iconSize: HistoryViewStyle.bar.actions.edit.iconSize
visible: peerAddress && SettingsModel.contactsEnabled
onClicked: window.setView('ContactEdit', { sipAddress: historyView.peerAddress })
tooltipText: peerAddress?Logic.getEditTooltipText():''
}
ActionButton {
isCustom: true
backgroundRadius: 90
colorSet: HistoryViewStyle.deleteAction
onClicked: Logic.removeAllEntries()
tooltipText: qsTr('cleanHistory')
}
}
}
}
}
// ---------------------------------------------------------------------------
// History.
// ---------------------------------------------------------------------------
History {
Layout.fillHeight: true
Layout.fillWidth: true
onEntryClicked:{
historyView.fullPeerAddress=sipAddress
historyView.peerAddress=sipAddress
historyProxyModel.resetMessageCount()
}
proxyModel: HistoryProxyModel {
id: historyProxyModel
Component.onCompleted: {
setEntryTypeFilter()
resetMessageCount()
}
}
}
}

View file

@ -332,6 +332,7 @@ ApplicationWindow {
menu.resetSelectedEntry()
}
onShowHistoryRequest: {
timeline.model.unselectAll()
window.setView('HistoryView')
}
}

View file

@ -80,4 +80,15 @@ QtObject {
property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'l_h_b_fg').color
property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'l_p_b_fg').color
}
property QtObject chat: QtObject {
property int iconSize: 40
property string name : 'chat'
property string icon : 'chat_custom'
property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 's_n_b_bg').color
property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 's_h_b_bg').color
property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 's_p_b_bg').color
property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 's_n_b_fg').color
property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 's_h_b_fg').color
property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 's_p_b_fg').color
}
}