- Fix qt.conf for missing qml.
- Fix shortcuts and top menu.
- Fix depencies.
This commit is contained in:
Julien Wadel 2021-11-23 19:16:46 +01:00
parent 618edb10ab
commit 3f41aa2194
4 changed files with 52 additions and 77 deletions

View file

@ -171,11 +171,9 @@ elseif (APPLE)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/macos/Info.plist.in" "${CMAKE_CURRENT_BINARY_DIR}/../../Info.plist" @ONLY)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/macos/entitlements.xml.in" "${CMAKE_CURRENT_BINARY_DIR}/../../entitlements.xml" @ONLY)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/macos/linphone.icns" "${CMAKE_CURRENT_BINARY_DIR}/../../${EXECUTABLE_NAME}.icns" COPYONLY)
if(ENABLE_APP_PACKAGING)
set(APP_QT_CONF_PATH "[Paths]\nPlugins = PlugIns\nImports = Resources/qml\nQml2Imports = Resources/qml")
else()
set(APP_QT_CONF_PATH "")
endif()
set(APP_QT_CONF_PATH "[Paths]\nPlugins = PlugIns\nImports = Resources/qml\nQml2Imports = Resources/qml")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../../assets/qt.conf.in" "${CMAKE_CURRENT_BINARY_DIR}/../../qt.conf" @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/../../qt.conf" DESTINATION "${APPLICATION_NAME}.app/Contents/Resources/")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/../../Info.plist" DESTINATION "${APPLICATION_NAME}.app/Contents")

View file

@ -112,8 +112,8 @@ ApplicationWindow {
//: 'Hide Timeline' : Tooltip for a button that hide the timeline
tooltipText : (leftPanel.visible?qsTr('hideTimeline')
//: 'Open Timeline' : Tooltip for a button that open the timeline
:qsTr('openTimeline'))
//: 'Open Timeline' : Tooltip for a button that open the timeline
:qsTr('openTimeline'))
iconSize: MainWindowStyle.panelButtonSize
//autoIcon: true
onClicked: leftPanel.visible = !leftPanel.visible
@ -203,10 +203,10 @@ ApplicationWindow {
isCustom: true
backgroundRadius: 4
colorSet: MainWindowStyle.buttons.newChatGroup
//: 'Open Conference' : Tooltip to illustrate a button
tooltipText : qsTr('newChatRoom')
visible: SettingsModel.standardChatEnabled || SettingsModel.secureChatEnabled
visible: SettingsModel.standardChatEnabled || SettingsModel.secureChatEnabled
//autoIcon: true
onClicked: {
window.detachVirtualWindow()
@ -242,10 +242,7 @@ ApplicationWindow {
}
}
Loader{
active:Qt.platform.os === 'osx'
sourceComponent:MainWindowTopMenuBar{}
}
// -----------------------------------------------------------------------
// Content.
// -----------------------------------------------------------------------
@ -282,7 +279,7 @@ ApplicationWindow {
visible: SettingsModel.contactsEnabled
onSelected: {
timeline.model.unselectAll()
timeline.model.unselectAll()
setView('Contacts')
}
onClicked:{
@ -319,7 +316,7 @@ ApplicationWindow {
Layout.fillWidth: true
model: TimelineProxyModel{}
onEntrySelected:{
onEntrySelected:{
if( entry ) {
window.setView('Conversation', {
chatRoomModel:entry.chatRoomModel
@ -353,6 +350,12 @@ ApplicationWindow {
}
}
}
Loader{
id: customMenuBar
active:Qt.platform.os === 'osx'
sourceComponent:MainWindowTopMenuBar{}
}
Component.onCompleted: if(Qt.platform.os === 'osx') menuBar = customMenuBar
// ---------------------------------------------------------------------------
// Url handlers.
// ---------------------------------------------------------------------------

View file

@ -7,73 +7,47 @@ import Linphone 1.0
// =============================================================================
MenuBar {
function open () {
menu.open()
}
function open () {
menu.open()
}
// ---------------------------------------------------------------------------
// Shortcuts.
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// Menu.
// ---------------------------------------------------------------------------
Shortcut {
id: settingsShortcut
Menu {
id: menu
title: qsTr('settings')
sequence: 'Ctrl+P'
MenuItem {
text: qsTr('settings')
role: MenuItem.ApplicationSpecificRole //PreferencesRole doesn't seems to work with Qt 5.15.2
onTriggered: App.smartShowWindow(App.getSettingsWindow())
shortcut: StandardKey.Preferences
}
onActivated: App.smartShowWindow(App.getSettingsWindow())
}
MenuItem {
//: 'Check for updates' : Item menu for checking updates
text: qsTr('checkForUpdates')
role: MenuItem.ApplicationSpecificRole
onTriggered: App.checkForUpdates(true)
}
Shortcut {
id: quitShortcut
MenuItem {
text: qsTr('about')
context: Qt.ApplicationShortcut
sequence: StandardKey.Quit
onTriggered: {
window.detachVirtualWindow()
window.attachVirtualWindow(Qt.resolvedUrl('Dialogs/About.qml'))
}
shortcut: StandardKey.HelpContents
}
onActivated: Qt.quit()
}
MenuItem {
text: qsTr('quit')
Shortcut {
id: aboutShortcut
sequence: StandardKey.HelpContents
onActivated: {
window.detachVirtualWindow()
window.attachVirtualWindow(Qt.resolvedUrl('Dialogs/About.qml'))
}
}
// ---------------------------------------------------------------------------
// Menu.
// ---------------------------------------------------------------------------
Menu {
id: menu
title: qsTr('settings')
MenuItem {
text: qsTr('settings')
onTriggered: settingsShortcut.onActivated()
}
MenuItem {
//: 'Check for updates' : Item menu for checking updates
text: qsTr('checkForUpdates')
onTriggered: App.checkForUpdates(true)
}
MenuItem {
text: qsTr('about')
onTriggered: aboutShortcut.onActivated()
}
MenuItem {
text: qsTr('quit')
onTriggered: quitShortcut.onActivated()
}
}
onTriggered: Qt.quit()
shortcut: StandardKey.Quit
}
}
}

@ -1 +1 @@
Subproject commit d8865b2c81c471e802efc5fe4a9fa4e7ad3ea3a3
Subproject commit ec2a6452a7f17a5f0fe8fcba6ddca230c848a86c